| # Use official slim Python image | |
| FROM python:3.11-slim | |
| # Set working directory | |
| WORKDIR /app | |
| # Copy requirements and install | |
| COPY requirements.txt . | |
| RUN pip install --upgrade pip && pip install --no-cache-dir -r requirements.txt | |
| # Copy app.py | |
| COPY . . | |
| # Expose default HF port | |
| EXPOSE 7860 | |
| # Use Python to run uvicorn (avoids PATH issues) | |
| CMD ["python", "-m", "uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] | |