casebinder / Dockerfile
SoumyajitSen94298's picture
Add qdrant-client to Dockerfile
e13981e
Raw
History Blame Contribute Delete
943 Bytes
FROM python:3.11-slim
WORKDIR /app
# Install uv
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /usr/local/bin/
# System deps for pymupdf
RUN apt-get update && apt-get install -y --no-install-recommends \
libmupdf-dev \
&& rm -rf /var/lib/apt/lists/*
# Install Python deps via uv (no venv, install to system)
COPY pyproject.toml .
RUN uv pip install --system --no-cache \
fastapi \
uvicorn \
pymupdf \
rank-bm25 \
openai \
python-dotenv \
huggingface_hub \
qdrant-client
# Copy app code and the pre-built page index
COPY rag/ ./rag/
# Downloads dir — populated at runtime from HF Dataset if HF_DATASET_ID is set
RUN mkdir -p /app/downloads
# Startup script: optionally pull PDFs from HF Dataset, then launch API
COPY entrypoint.sh .
RUN chmod +x entrypoint.sh
# HuggingFace Spaces requires port 7860
EXPOSE 7860
ENV DOWNLOADS_DIR=/app/downloads
ENV PORT=7860
ENTRYPOINT ["./entrypoint.sh"]