Skip to content

Commit b263215

Browse files
author
Damien
committed
fix(runtime): tesseract languages + raise nsjail memory limit
Two fixes surfaced during PDF skill testing: 1. tesseract-ocr-{fra,deu,spa,ita}: the base tesseract-ocr package only ships English. OCR on French/German/Spanish/Italian PDFs needs the language packs installed in the image (pytesseract.image_to_string accepts lang="fra+eng" but cannot use a language that isn't present). Added to the existing apt install layer. 2. rlimit_as 512 → 1024 MiB: 512 MiB is too tight for PDF OCR workflows (pdf2image renders pages at 200+ DPI which can momentarily allocate 400-700 MiB per page; tesseract on top adds 100-200 MiB working set). Skill consistently OOM-killed at 512 MiB even with del+gc.collect() between pages. 1024 MiB is sufficient with page-by-page processing and remains conservative for the trusted-tenant model.
1 parent 51365ef commit b263215

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
4848
libjpeg-dev libpng-dev libtiff-dev libopenjp2-7-dev \
4949
libfreetype6-dev liblcms2-dev libwebp-dev \
5050
tcl8.6-dev tk8.6-dev \
51-
poppler-utils tesseract-ocr pandoc \
51+
poppler-utils tesseract-ocr tesseract-ocr-fra tesseract-ocr-deu \
52+
tesseract-ocr-spa tesseract-ocr-ita pandoc \
5253
portaudio19-dev flac ffmpeg \
5354
libpulse-dev libsdl2-dev libsdl2-mixer-dev libsdl2-image-dev libsdl2-ttf-dev \
5455
antiword unrtf \

docker/nsjail-base.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ clone_newcgroup: true
2929

3030
# Virtual memory limit (MB) — matches HARD rlimit
3131
rlimit_as_type: HARD
32-
rlimit_as: 512
32+
rlimit_as: 1024
3333

3434
# Max output file size (MB)
3535
rlimit_fsize: 100

0 commit comments

Comments
 (0)