Spaces:
Sleeping
Sleeping
File size: 792 Bytes
6f6c5b9 | 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 30 | 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 /data/sessions
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 SESSION_DIR=/data/sessions
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"]
|