File size: 569 Bytes
e2f9a1d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
FROM python:3.11-slim

WORKDIR /app

COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

COPY . .

# HF Spaces expects the app on 7860. Cloud demo narrates via Claude (can't reach the local fleet);
# the ANTHROPIC_API_KEY is injected as a Space secret at runtime. MPLCONFIGDIR -> writable /tmp so
# matplotlib's font cache doesn't hit a read-only home on HF.
ENV PORT=7860 \
    INSIGHTS_LLM_BACKEND=claude \
    ANTHROPIC_MODEL=claude-haiku-4-5 \
    MPLCONFIGDIR=/tmp/matplotlib \
    PYTHONUNBUFFERED=1

EXPOSE 7860

CMD ["python", "app.py"]