Spaces:
Running
Running
| # Hugging Face Spaces runs this on port 7860. | |
| FROM python:3.11-slim | |
| ENV PYTHONUNBUFFERED=1 \ | |
| PIP_NO_CACHE_DIR=1 \ | |
| PORT=7860 \ | |
| POLIS_BUDGET_USD=1.00 | |
| WORKDIR /app | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| COPY . . | |
| # Pre-generate the mock demo at build time so the Space plays instantly, | |
| # even before anyone supplies an API key. | |
| RUN python -m scripts.generate_demo --ticks 40 || true | |
| EXPOSE 7860 | |
| CMD ["python", "-m", "backend.main"] | |