File size: 717 Bytes
a4f8c46
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
FROM python:3.12-slim

RUN apt-get update && apt-get install -y gcc g++ git && rm -rf /var/lib/apt/lists/*

WORKDIR /app

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

COPY . .

RUN python3 build_spacy.py

# /data = HuggingFace persistent storage bucket (mounted at runtime)
# Everything user-related lives here and NEVER gets deleted on restart
RUN mkdir -p /data/db /data/chroma /data/backups

ENV PORT=7860
ENV HOST=0.0.0.0
ENV WORKERS=1
ENV SPACY_MODEL=/app/en_model
ENV NEUROCHECK_DB=/data/db/neurocheck.db
ENV CHROMA_DB_PATH=/data/chroma
ENV PYTHONPATH=/app

EXPOSE 7860

CMD ["python3", "-m", "uvicorn", "api.main:app", "--host", "0.0.0.0", "--port", "7860", "--app-dir", "/app"]