File size: 705 Bytes
6f9d8f6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
67adee2
6f9d8f6
 
 
 
67adee2
6f9d8f6
67adee2
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
FROM python:3.11-slim

WORKDIR /app

# Cài system deps cho underthesea + EasyOCR
RUN apt-get update && apt-get install -y \
    gcc g++ git libgl1 libglib2.0-0 \
    && rm -rf /var/lib/apt/lists/*

# Cài Python deps trước (cache layer)
COPY requirements.txt .
RUN pip install --no-cache-dir --trusted-host pypi.org --trusted-host files.pythonhosted.org --timeout 300 -r requirements.txt

# Copy source code
COPY src/ ./src/
COPY static/ ./static/
COPY api.py .

# Model sẽ được download tự động lần đầu chạy

# Qdrant storage và BM25 index mount từ volume
VOLUME ["/app/qdrant_storage", "/app/data"]

EXPOSE 7860

CMD ["uvicorn", "api:app", "--host", "0.0.0.0", "--port", "7860"]