| FROM python:3.10 | |
| # Set the working directory | |
| WORKDIR /app | |
| # Copy requirements and install | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy the rest of the backend files | |
| COPY . . | |
| # Expose the port Hugging Face uses | |
| EXPOSE 7860 | |
| # Run the application | |
| # We use --host 0.0.0.0 and port 7860 as required by HF | |
| CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] | |