-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (24 loc) · 782 Bytes
/
Copy pathDockerfile
File metadata and controls
31 lines (24 loc) · 782 Bytes
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
30
31
# Dockerfile
FROM python:3.11-slim
# System deps for Docling (PDF rendering) and sentence-transformers
RUN apt-get update && apt-get install -y \
libgl1 \
libglib2.0-0 \
libgomp1 \
curl \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Install Python deps first (layer caching)
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
RUN python -c "from docling.document_converter import DocumentConverter; DocumentConverter()"
# Copy source
COPY src/ ./src/
COPY api/ ./api/
# Create directories expected at runtime
RUN mkdir -p chroma_db mlruns
# Expose FastAPI port
EXPOSE 8000
# Run from api/ with src/ on the path
ENV PYTHONPATH="/app/src"
CMD ["uvicorn", "api.main:app", "--host", "0.0.0.0", "--port", "8000", "--log-level", "info"]