Files
Scalper/Dockerfile
T
Vibe 82a6828597 feat: OCR (tesseract) + remplacement du texte dans les images (typesetting Pillow) — SCAL-17
- scalper ocr / scalper typeset + --with-ocr dans run et POST /run
- gate légal: legal.allows_derivatives — réservé domaine public/CC/contenu propre (mangadex exclu du traitement d'images)
- Dockerfile: tesseract-ocr + fonts-dejavu + extra [ocr] (pillow, pytesseract)
- 47 tests OK
2026-11-16 15:13:24 +00:00

24 lines
631 B
Docker

FROM python:3.12-slim
RUN apt-get update && apt-get install -y --no-install-recommends \
tesseract-ocr fonts-dejavu-core \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY pyproject.toml README.md ./
COPY src ./src
RUN pip install --no-cache-dir ".[ocr]"
RUN useradd -m scalper && mkdir -p /app/data /app/out && chown -R scalper:scalper /app
USER scalper
ENV PYTHONUNBUFFERED=1
EXPOSE 8000
HEALTHCHECK --interval=30s --timeout=5s --retries=3 \
CMD python -c "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8000/healthz')" || exit 1
CMD ["scalper", "serve", "--host", "0.0.0.0", "--port", "8000"]