Spaces:
Running
Running
| FROM python:3.11-slim | |
| WORKDIR /app | |
| # Install dependencies | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Pre-download the embedding model (~420MB, cached in Docker layer) | |
| RUN python -c "from sentence_transformers import SentenceTransformer; SentenceTransformer('paraphrase-multilingual-mpnet-base-v2')" | |
| # Copy application code and data | |
| COPY . . | |
| # Build ChromaDB at image build time (no binary files in git) | |
| RUN python -c "import sys; sys.path.insert(0, 'src'); from rag.build_vector_db import build_vector_database; build_vector_database()" | |
| # HF Spaces expects port 7860 | |
| EXPOSE 7860 | |
| CMD ["streamlit", "run", "src/web/app.py", "--server.port=7860", "--server.address=0.0.0.0", "--server.headless=true"] | |