File size: 961 Bytes
6ad2801
84d580c
6ad2801
 
 
84d580c
6ad2801
 
 
 
 
 
84d580c
 
 
6ad2801
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
FROM ghcr.io/docling-project/docling-serve-cu128:main

ENV DOCLING_SERVE_ENABLE_UI=false \
    UVICORN_PORT=7860 \
    OMP_NUM_THREADS=4

# Pre-seed EasyOCR models into Docling cache to avoid download issues
RUN mkdir -p /opt/app-root/src/.cache/docling/models/EasyOcr && \
    curl -L --fail --retry 5 --retry-connrefused -o /opt/app-root/src/.cache/docling/models/EasyOcr/craft_mlt_25k.pth \
      https://github.com/JaidedAI/EasyOCR/releases/download/v1.3/craft_mlt_25k.pth && \
    curl -L --fail --retry 5 --retry-connrefused -o /opt/app-root/src/.cache/docling/models/EasyOcr/english_g2.pth \
      https://github.com/JaidedAI/EasyOCR/releases/download/v1.6.2/english_g2.pth

EXPOSE 7860

# Healthcheck on API docs
HEALTHCHECK --interval=20s --timeout=5s --start-period=15s --retries=5 \
  CMD sh -lc 'curl -fsS http://127.0.0.1:${UVICORN_PORT}/docs >/dev/null || exit 1'

ENTRYPOINT []
CMD ["docling-serve", "run", "--host", "0.0.0.0", "--port", "7860"]