fix(ocr): persist model cache across container restarts
Some checks failed
CI / Unit & Component Tests (push) Failing after 1s
CI / Backend Unit Tests (push) Failing after 1s
CI / Unit & Component Tests (pull_request) Failing after 0s
CI / Backend Unit Tests (pull_request) Failing after 1s

Surya downloads models from HuggingFace to /root/.cache on first use.
Without a volume, every container restart re-downloads ~73MB+.
Added ocr_cache volume to persist the cache.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-04-12 23:21:51 +02:00
parent 2cc7dcd5e3
commit 1b7540143e

View File

@@ -82,6 +82,7 @@ services:
memswap_limit: 8g
volumes:
- ocr_models:/app/models
- ocr_cache:/root/.cache
environment:
KRAKEN_MODEL_PATH: /app/models/german_kurrent.mlmodel
OCR_CONFIDENCE_THRESHOLD: "0.3"
@@ -186,3 +187,4 @@ volumes:
frontend_node_modules:
maven_cache:
ocr_models:
ocr_cache: