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:
@@ -95,6 +95,8 @@ services:
|
|||||||
OCR_CONFIDENCE_THRESHOLD_KURRENT: "0.5"
|
OCR_CONFIDENCE_THRESHOLD_KURRENT: "0.5"
|
||||||
RECOGNITION_BATCH_SIZE: "16"
|
RECOGNITION_BATCH_SIZE: "16"
|
||||||
DETECTOR_BATCH_SIZE: "8"
|
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:
|
networks:
|
||||||
- archive-net
|
- archive-net
|
||||||
healthcheck:
|
healthcheck:
|
||||||
|
|||||||
@@ -3,10 +3,12 @@ FROM python:3.11.9-slim
|
|||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# curl for healthcheck; libgomp1 for PyTorch CPU threading; libvips for kraken PDF support
|
# 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 \
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
curl \
|
curl \
|
||||||
libgomp1 \
|
libgomp1 \
|
||||||
libvips42 \
|
libvips42 \
|
||||||
|
libglib2.0-0 \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# PyTorch CPU-only — separate layer; the whl/cpu index strips all CUDA variants (~2 GB saved)
|
# PyTorch CPU-only — separate layer; the whl/cpu index strips all CUDA variants (~2 GB saved)
|
||||||
|
|||||||
@@ -8,3 +8,4 @@ pillow>=10.2.0,<11.0.0
|
|||||||
pypdfium2==4.30.0
|
pypdfium2==4.30.0
|
||||||
pyvips>=2.2.0
|
pyvips>=2.2.0
|
||||||
httpx==0.28.1
|
httpx==0.28.1
|
||||||
|
opencv-python-headless==4.11.0.86
|
||||||
|
|||||||
Reference in New Issue
Block a user