Spaces:
Sleeping
Sleeping
| # Use Python 3.11-slim-bookworm (more secure) | |
| FROM python:3.11-slim-bookworm | |
| # Set working directory | |
| WORKDIR /app | |
| # Copy requirements first (better caching) | |
| COPY requirements.txt . | |
| # Install dependencies | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy the entire project | |
| COPY . . | |
| # Expose the port Hugging Face expects | |
| EXPOSE 7860 | |
| # Command to run the FastAPI app | |
| CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"] |