deepa / Dockerfile
grvelight's picture
Update Dockerfile
2360384 verified
Raw History Blame Contribute Delete
689 Bytes
# ── Dockerfile β€” CovidKosha RAG API ──────────────────────
FROM python:3.11-slim
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
libgomp1 \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy app and data files
COPY api.py chunks.json index.faiss ./
# Pre-download the embedding model at build time
RUN python -c "from sentence_transformers import SentenceTransformer; SentenceTransformer('all-MiniLM-L6-v2')"
EXPOSE 7860
CMD ["uvicorn", "api:app", "--host", "0.0.0.0", "--port", "7860"]