File size: 955 Bytes
2408f3f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
FROM python:3.11-slim

WORKDIR /app

# ---------- System packages (curl for Qdrant health check) -------------------
RUN apt-get update && \
    apt-get install -y --no-install-recommends curl && \
    rm -rf /var/lib/apt/lists/*

# ---------- Python dependencies -----------------------------------------------
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# ---------- Application code --------------------------------------------------
COPY . .

# ---------- Pre-download sentence-transformers models -------------------------
RUN python -c "\
from sentence_transformers import SentenceTransformer, CrossEncoder; \
SentenceTransformer('paraphrase-multilingual-MiniLM-L12-v2'); \
CrossEncoder('cross-encoder/mmarco-mMiniLMv2-L12-H384-v1')"

# ---------- Entrypoint --------------------------------------------------------
RUN chmod +x scripts/docker-entrypoint.sh

EXPOSE 8000

CMD ["bash", "scripts/docker-entrypoint.sh"]