chore(ocr): add opencv-python-headless, libglib2.0-0, and CLAHE env vars

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-04-17 14:14:47 +02:00
parent 7183fc4428
commit 615d404ba9
3 changed files with 5 additions and 0 deletions

View File

@@ -95,6 +95,8 @@ services:
OCR_CONFIDENCE_THRESHOLD_KURRENT: "0.5"
RECOGNITION_BATCH_SIZE: "16"
DETECTOR_BATCH_SIZE: "8"
OCR_CLAHE_CLIP_LIMIT: "2.0" # CLAHE contrast limit (multiplier of average histogram frequency)
OCR_CLAHE_TILE_SIZE: "8" # CLAHE tile grid size (NxN tiles per page)
networks:
- archive-net
healthcheck:

View File

@@ -3,10 +3,12 @@ FROM python:3.11.9-slim
WORKDIR /app
# curl for healthcheck; libgomp1 for PyTorch CPU threading; libvips for kraken PDF support
# libglib2.0-0 is required by opencv-python-headless on Debian slim
RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
libgomp1 \
libvips42 \
libglib2.0-0 \
&& rm -rf /var/lib/apt/lists/*
# PyTorch CPU-only — separate layer; the whl/cpu index strips all CUDA variants (~2 GB saved)

View File

@@ -8,3 +8,4 @@ pillow>=10.2.0,<11.0.0
pypdfium2==4.30.0
pyvips>=2.2.0
httpx==0.28.1
opencv-python-headless==4.11.0.86