| FROM python:3.12-slim | |
| WORKDIR /code | |
| # Copy requirements and install | |
| COPY ./requirements.txt /code/requirements.txt | |
| RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt | |
| # Copy all files (including dataset if present locally) | |
| COPY . /code | |
| # Set permissions for user 1000 (Hugging Face Spaces runs as user 1000) | |
| RUN chmod -R 777 /code | |
| # Start uvicorn on port 7860 (Hugging Face standard) | |
| CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] | |