fix: remove warmup OCR call — causes OOM on 6G container
Some checks failed
Deploy to Coolify / deploy (push) Failing after 2s
Some checks failed
Deploy to Coolify / deploy (push) Failing after 2s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -48,13 +48,6 @@ def _load_model():
|
||||
logger.info(f"PaddleOCR init strategy {i} failed: {e}")
|
||||
else:
|
||||
raise RuntimeError("All PaddleOCR init strategies failed")
|
||||
# Warmup: run a dummy OCR to trigger JIT compilation
|
||||
# Without this, the first real request takes minutes on CPU
|
||||
logger.info("Running warmup OCR (JIT compilation)...")
|
||||
dummy = np.ones((50, 200, 3), dtype=np.uint8) * 255
|
||||
_engine.ocr(dummy)
|
||||
logger.info("Warmup complete")
|
||||
|
||||
_ready = True
|
||||
logger.info("PaddleOCR model loaded successfully — ready to serve")
|
||||
except Exception as e:
|
||||
|
||||
Reference in New Issue
Block a user