Spaces:
Runtime error
Runtime error
Download backend_files/Dockerfile from RoopaST/Sales-Prediction-Backend: direct link, hf CLI and curl.
- Browser
- Download file 707 Bytes
-
https://huggingface.co/spaces/RoopaST/Sales-Prediction-Backend/resolve/main/backend_files/Dockerfile
- Command line
-
hf download hf://spaces/RoopaST/Sales-Prediction-Backend/backend_files/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/RoopaST/Sales-Prediction-Backend/resolve/main/backend_files/Dockerfile
707 Bytes
| # Use a lightweight Python base image | |
| FROM python:3.9-slim-buster | |
| # Set the working directory in the container | |
| WORKDIR /app | |
| # Copy the requirements file into the container (now directly in the root of the build context) | |
| COPY requirements.txt . | |
| # Install the Python dependencies | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy the application code and the trained model into the container (now directly in the root of the build context) | |
| COPY app.py . | |
| COPY tuned_random_forest_model.joblib . | |
| # Expose the port that the Flask app will run on | |
| EXPOSE 5000 | |
| # Define the command to run the Flask application using gunicorn | |
| CMD ["gunicorn", "-w", "4", "-b", "0.0.0.0:5000", "app:predict_sales_api"] | |