File size: 482 Bytes
89d6753
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# 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"]