docling-studio/embedding-service/Dockerfile
Pier-Jean Malandrino 73e9c66ea6 fix(ci): install curl in embedding-service image for healthcheck
python:3.12-slim does not include curl — every healthcheck attempt failed
silently, causing the container to be declared unhealthy after all retries.
2026-04-10 22:22:50 +02:00

19 lines
549 B
Docker

FROM python:3.12-slim
WORKDIR /app
RUN apt-get update && apt-get install -y --no-install-recommends curl && rm -rf /var/lib/apt/lists/*
# Install dependencies first (cache layer)
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Pre-download default model into the image
ARG EMBEDDING_MODEL=all-MiniLM-L6-v2
RUN python -c "from sentence_transformers import SentenceTransformer; SentenceTransformer('${EMBEDDING_MODEL}')"
COPY main.py .
EXPOSE 8001
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8001"]