Spaces:
Runtime error
Runtime error
Download Dockerfile from 12ongo/backendproject: direct link, hf CLI and curl.
- Browser
- Download file 692 Bytes
-
https://huggingface.co/spaces/12ongo/backendproject/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/12ongo/backendproject/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/12ongo/backendproject/resolve/main/Dockerfile
692 Bytes
| FROM python:3.11-slim | |
| ENV PYTHONDONTWRITEBYTECODE=1 | |
| ENV PYTHONUNBUFFERED=1 | |
| WORKDIR /app | |
| # Install dependencies | |
| COPY requirements.txt /app/requirements.txt | |
| RUN pip install --no-cache-dir -r /app/requirements.txt | |
| # Copy application code | |
| COPY app.py /app/app.py | |
| # Copy model artifact | |
| RUN mkdir -p /app/deployment_files | |
| COPY deployment_files/sales_predictor.joblib /app/deployment_files/sales_predictor.joblib | |
| # Expose default port used by Spaces if PORT is not provided | |
| EXPOSE 7860 | |
| # Start the API using gunicorn, binding to the dynamic PORT provided by HF Spaces | |
| ENV PORT=7860 | |
| CMD ["sh", "-c", "gunicorn -w 1 -k gthread -b 0.0.0.0:$PORT app:sales_predictor_api"] | |