From 3b95d65e2da64cfa5b7ac7c95d4f0f57a7eefc08 Mon Sep 17 00:00:00 2001 From: MangoPig Date: Sat, 21 Feb 2026 23:10:24 +0000 Subject: [PATCH] Increase Health Check Start Period --- Code/docker-compose.yaml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/Code/docker-compose.yaml b/Code/docker-compose.yaml index 25d7a87..dbb404e 100644 --- a/Code/docker-compose.yaml +++ b/Code/docker-compose.yaml @@ -17,25 +17,25 @@ services: entrypoint: ["/bin/sh", "-c"] command: - | - # Download Chinese OCR models if missing (first run only) - # Note: ch_sim and ch_tra are mutually exclusive, must download separately - if [ ! -f /opt/app-root/src/.cache/docling/models/EasyOcr/zh_sim_g2.pth ]; then - echo "Downloading Simplified Chinese OCR model..." - python3 -c "import easyocr; easyocr.Reader(['en','ch_sim'], gpu=False)" - cp -n /opt/app-root/src/.EasyOCR/model/*.pth /opt/app-root/src/.cache/docling/models/EasyOcr/ 2>/dev/null || true - fi - if [ ! -f /opt/app-root/src/.cache/docling/models/EasyOcr/zh_tra_g2.pth ]; then - echo "Downloading Traditional Chinese OCR model..." - python3 -c "import easyocr; easyocr.Reader(['en','ch_tra'], gpu=False)" - cp -n /opt/app-root/src/.EasyOCR/model/*.pth /opt/app-root/src/.cache/docling/models/EasyOcr/ 2>/dev/null || true - fi - exec uvicorn docling_serve.app:app --host 0.0.0.0 --port 5001 + # Download Chinese OCR models if missing (first run only) + # Note: ch_sim and ch_tra are mutually exclusive, must download separately + if [ ! -f /opt/app-root/src/.cache/docling/models/EasyOcr/zh_sim_g2.pth ]; then + echo "Downloading Simplified Chinese OCR model..." + python3 -c "import easyocr; easyocr.Reader(['en','ch_sim'], gpu=False)" + cp -n /opt/app-root/src/.EasyOCR/model/*.pth /opt/app-root/src/.cache/docling/models/EasyOcr/ 2>/dev/null || true + fi + if [ ! -f /opt/app-root/src/.cache/docling/models/EasyOcr/zh_tra_g2.pth ]; then + echo "Downloading Traditional Chinese OCR model..." + python3 -c "import easyocr; easyocr.Reader(['en','ch_tra'], gpu=False)" + cp -n /opt/app-root/src/.EasyOCR/model/*.pth /opt/app-root/src/.cache/docling/models/EasyOcr/ 2>/dev/null || true + fi + exec uvicorn docling_serve.app:app --host 0.0.0.0 --port 5001 healthcheck: test: ["CMD", "curl", "-sf", "http://localhost:5001/health"] interval: 30s timeout: 10s - retries: 3 - start_period: 120s + retries: 5 + start_period: 500s # Ollama ollama: