Spaces:
Running
Running
Download Dockerfile from erichier/finalcapstone: direct link, hf CLI and curl.
- Browser
- Download file 664 Bytes
-
https://huggingface.co/spaces/erichier/finalcapstone/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/erichier/finalcapstone/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/erichier/finalcapstone/resolve/main/Dockerfile
664 Bytes
| # Use official Python runtime as base image | |
| FROM python:3.12-slim | |
| # Set working directory in container | |
| WORKDIR /app | |
| # Copy requirements first (optimizes caching) | |
| COPY requirements.txt . | |
| # Install dependencies | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy the rest of the application code | |
| COPY . . | |
| # Expose port 7860 (Hugging Face Spaces default) | |
| EXPOSE 7860 | |
| # Set environment variables (optional, adjust as needed) | |
| ENV FLASK_ENV=production | |
| ENV PORT=7860 | |
| # Command to run the app with Gunicorn (adjust workers/threads as needed) | |
| CMD ["gunicorn", "--bind", "0.0.0.0:7860", "--workers", "1", "--threads", "8", "--timeout", "0", "recommend_app:app"] |