28 lines
565 B
Docker
28 lines
565 B
Docker
FROM python:3.12-slim
|
|
|
|
# Dépendances système (Tesseract OCR + données de langues)
|
|
RUN apt-get update && apt-get install -y \
|
|
tesseract-ocr \
|
|
tesseract-ocr-fra \
|
|
tesseract-ocr-eng \
|
|
libgl1 \
|
|
libglib2.0-0 \
|
|
curl \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
WORKDIR /app
|
|
|
|
# Dépendances Python
|
|
COPY requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# Code source
|
|
COPY . .
|
|
|
|
# Répertoires de données
|
|
RUN mkdir -p data/uploads data/thumbnails
|
|
|
|
EXPOSE 8000
|
|
|
|
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]
|