diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index 71634b76..56f73689 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -121,8 +121,10 @@ services: - "8000" # Surya OCR loads ~5GB of transformer models at startup; first request # triggers a further ~1GB Kraken model download into ocr-cache. - mem_limit: 12g - memswap_limit: 12g + # CX42+ (16 GB RAM) honours the default. On a CX32 (8 GB) override with + # OCR_MEM_LIMIT=6g (slower first-request, fits the host). + mem_limit: ${OCR_MEM_LIMIT:-12g} + memswap_limit: ${OCR_MEM_LIMIT:-12g} volumes: - ocr-models:/app/models - ocr-cache:/root/.cache