Increase Health Check Start Period

This commit is contained in:
MangoPig
2026-02-21 23:10:24 +00:00
parent 3b52c2ba02
commit 3b95d65e2d
+15 -15
View File
@@ -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: