Spaces:
Sleeping
Sleeping
| # Use an official Python 3.10 runtime as a parent image | |
| FROM python:3.10-slim | |
| # Set the working directory in the container | |
| WORKDIR /app | |
| # Cache dependencies | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy the current directory contents into the container at /app | |
| COPY . /app | |
| # Expose port (HF Spaces uses 7860) | |
| EXPOSE 7860 | |
| # Environment variable for the HF token (can be overridden at runtime) | |
| ENV HF_TOKEN="" | |
| # Run the FastAPI server | |
| CMD ["uvicorn", "server.app:app", "--host", "0.0.0.0", "--port", "7860"] | |