28 lines
558 B
Docker
28 lines
558 B
Docker
FROM python:3.11-slim
|
|
|
|
# Dépendencies système
|
|
RUN apt update && apt install -y --no-install-recommends \
|
|
tesseract-ocr \
|
|
libmagic1 \
|
|
ghostscript \
|
|
libgl1 \
|
|
libglib2.0-0 \
|
|
libsm6 \
|
|
libxext6 \
|
|
libxrender1 \
|
|
poppler-utils \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
WORKDIR /app
|
|
|
|
# Install dependencies first (cache optimization)
|
|
COPY requirements.txt requirements.txt
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# Copy application
|
|
COPY . .
|
|
|
|
EXPOSE 8006
|
|
|
|
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8006"]
|