Spaces:
Running
Running
| # Use official Python base image | |
| FROM python:3.12-slim | |
| # Set working directory | |
| WORKDIR /app | |
| # Copy project files | |
| COPY . /app | |
| # Install dependencies | |
| RUN pip install --no-cache-dir --upgrade pip | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Expose the port (Spaces expects 7860 or 5000) | |
| EXPOSE 7860 | |
| # Start the FastAPI app with uvicorn | |
| CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] | |