| FROM python:3.11-slim | |
| WORKDIR /app | |
| # Light deps only (Gradio + matplotlib + numpy). The Space serves precomputed | |
| # results and renders charts; it does no live training or inference, so torch / | |
| # pennylane / qroute are intentionally absent and the image stays small. | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| COPY app.py . | |
| COPY safety.py . | |
| COPY assets/ ./assets/ | |
| COPY precomputed/ ./precomputed/ | |
| # HuggingFace Spaces expect the app on 0.0.0.0:7860. No SYSTEM=spaces: this Space | |
| # has no OAuth (fully open), so Gradio never takes the OAuth path. | |
| ENV GRADIO_SERVER_NAME=0.0.0.0 \ | |
| GRADIO_SERVER_PORT=7860 \ | |
| PYTHONUNBUFFERED=1 | |
| EXPOSE 7860 | |
| CMD ["python", "-u", "app.py"] | |