Samyak Chanekar
Claude Sonnet 4.6
fix: pre-bake model+data into Docker image, non-blocking startup
a391d6d Download Dockerfile from SERG4NT/NexusRAG: direct link, hf CLI and curl.
- Browser
- Download file 846 Bytes
-
https://huggingface.co/spaces/SERG4NT/NexusRAG/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/SERG4NT/NexusRAG/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/SERG4NT/NexusRAG/resolve/main/Dockerfile
846 Bytes
| FROM python:3.11-slim | |
| # System deps for ChromaDB / sentence-transformers | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| build-essential gcc \ | |
| && rm -rf /var/lib/apt/lists/* | |
| WORKDIR /app | |
| # Install Python deps first (layer cache) | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy source | |
| COPY . . | |
| # Pre-download embedding model (public, no token needed) — bakes into image | |
| RUN python -c "from sentence_transformers import SentenceTransformer; SentenceTransformer('all-MiniLM-L6-v2')" | |
| # Pre-ingest all data into ChromaDB — bakes into image, zero startup delay | |
| RUN python ingest_all.py | |
| # HF Spaces injects secrets as env vars — do not bake them in | |
| ENV PYTHONUNBUFFERED=1 | |
| EXPOSE 7860 | |
| CMD ["python", "-m", "chainlit", "run", "app.py", "--host", "0.0.0.0", "--port", "7860"] | |