File size: 492 Bytes
2c88096
 
 
 
 
 
 
 
 
 
 
 
 
2e2d5c9
2c88096
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# Hugging Face Space (Docker SDK) — serves FastAPI on port 7860.
FROM python:3.12-slim

ENV PYTHONUNBUFFERED=1 \
    PIP_NO_CACHE_DIR=1 \
    DATA_DIR=/data

WORKDIR /code

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

COPY app ./app
COPY seed.json ./seed.json

# Writable data dir (ephemeral on free Spaces — see README storage note).
RUN mkdir -p /data && chmod 777 /data

EXPOSE 7860
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]