Spaces:
Sleeping
Sleeping
| # Hugging Face Spaces (Docker SDK) — listens on port 7860 | |
| FROM python:3.10-slim-bookworm | |
| WORKDIR /app | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| build-essential \ | |
| libgomp1 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| COPY app/ ./app/ | |
| COPY models/ ./models/ | |
| # Bundled seed for FAISS + markdown docs (copied to DATA_DIR on first boot) | |
| COPY data/ ./data_seed/ | |
| COPY entrypoint.sh . | |
| RUN chmod +x entrypoint.sh | |
| ENV PYTHONUNBUFFERED=1 \ | |
| DATA_DIR=/data \ | |
| PORT=7860 \ | |
| TRANSFORMERS_CACHE=/data/.cache/huggingface \ | |
| SENTENCE_TRANSFORMERS_HOME=/data/.cache/sentence-transformers | |
| EXPOSE 7860 | |
| ENTRYPOINT ["./entrypoint.sh"] | |