From 31519af1a4d32c9b73191678930569846b01fc4b Mon Sep 17 00:00:00 2001 From: Marcel Date: Sun, 12 Apr 2026 20:11:14 +0200 Subject: [PATCH] fix(ocr): add pyvips for kraken PDF input support Kraken 7 requires pyvips (optional dep) for -f pdf mode. Added libvips42 system package and pyvips Python package. Co-Authored-By: Claude Sonnet 4.6 --- ocr-service/Dockerfile | 3 ++- ocr-service/requirements.txt | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ocr-service/Dockerfile b/ocr-service/Dockerfile index 99ac88fc..0c90503c 100644 --- a/ocr-service/Dockerfile +++ b/ocr-service/Dockerfile @@ -2,10 +2,11 @@ FROM python:3.11-slim WORKDIR /app -# curl for healthcheck; libgomp1 for PyTorch CPU threading +# curl for healthcheck; libgomp1 for PyTorch CPU threading; libvips for kraken PDF support RUN apt-get update && apt-get install -y --no-install-recommends \ curl \ libgomp1 \ + libvips42 \ && rm -rf /var/lib/apt/lists/* # PyTorch CPU-only — separate layer; the whl/cpu index strips all CUDA variants (~2 GB saved) diff --git a/ocr-service/requirements.txt b/ocr-service/requirements.txt index 7ee1d67a..5c3023d8 100644 --- a/ocr-service/requirements.txt +++ b/ocr-service/requirements.txt @@ -6,4 +6,5 @@ torchvision==0.22.1 transformers>=4.56.1,<5.0.0 pillow>=10.2.0,<11.0.0 pypdfium2==4.30.0 +pyvips>=2.2.0 httpx==0.28.1