Spaces:
Sleeping
Sleeping
| FROM python:3.10-slim | |
| # Environment settings | |
| ENV PYTHONDONTWRITEBYTECODE=1 | |
| ENV PYTHONUNBUFFERED=1 | |
| # Working directory | |
| WORKDIR /app | |
| # Copy requirements first (Docker cache optimization) | |
| COPY requirements.txt . | |
| # Install Python dependencies | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy project files | |
| COPY . . | |
| # Expose port (HF uses 7860) | |
| EXPOSE 7860 | |
| # Run FastAPI app | |
| CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] | |