| FROM python:3.11-slim | |
| WORKDIR /src | |
| # Copy requirements first for cache efficiency | |
| COPY requirements.txt . | |
| #Install dependencies | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy the backend application code | |
| COPY src ./src | |
| # Expose the port expected by HF Spaces (7860) and uvicorn | |
| EXPOSE 7860 | |
| # Run the application | |
| CMD ["python", "-m", "src.main", "--host", "0.0.0.0", "--port", "7860"] |