Spaces:
Runtime error
Runtime error
Download Dockerfile from Lokiiparihar/SampleBackend: direct link, hf CLI and curl.
- Browser
- Download file 709 Bytes
-
https://huggingface.co/spaces/Lokiiparihar/SampleBackend/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Lokiiparihar/SampleBackend/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Lokiiparihar/SampleBackend/resolve/main/Dockerfile
709 Bytes
| FROM python:3.9-slim | |
| # Set the working directory inside the container | |
| WORKDIR /app | |
| # Copy all files from the current directory to the container's working directory | |
| COPY . . | |
| # Install dependencies from the requirements file without using cache to reduce image size | |
| RUN pip install --no-cache-dir --upgrade -r requirements.txt | |
| #Define the command to run the Flask application on port 7860 and make it accessible externally | |
| # - '-w 4' : Uses 4 worker processes to handle requests. | |
| # - '-b 0.0.0.0:7860': Binds the Flask app to the specified host and port. | |
| # - 'app:sales_prediction_api': Specifies the entry point of the Flask app. | |
| CMD ["gunicorn", "w", "1", "-b", "0.0.0.0:7860", "app:sales_prediction_api"] |