FROM python:3.12-slim WORKDIR /app # System deps RUN apt-get update -qq && apt-get install -y -qq --no-install-recommends \ build-essential && \ rm -rf /var/lib/apt/lists/* # Python deps (no torch — fastembed uses ONNX) COPY requirements-hf.txt . RUN pip install --no-cache-dir -r requirements-hf.txt # Copy app COPY web.py startup.py startup_progress.py providers.py retrieve.py embedder.py personas.py benchmark.py chat.py test_models.py captcha.py ./ COPY static/ static/ COPY db/ db/ COPY data/ data/ # Create logs dir RUN mkdir -p logs # HF Spaces expects port 7860 ENV PORT=7860 EXPOSE 7860 # Run with startup.py (loading screen + benchmark) CMD ["python", "startup.py"]