From 7493d5b01f8be60294afeffdfb54a62bb74bcc92 Mon Sep 17 00:00:00 2001 From: Michele Dolfi <97102151+dolfim-ibm@users.noreply.github.com> Date: Thu, 13 Feb 2025 14:19:50 +0100 Subject: [PATCH] docs: update example Dockerfile with download CLI (#929) update example Dockerfile with download CLI Signed-off-by: Michele Dolfi --- Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index c863f1c..d210b5a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,8 +16,7 @@ ENV TORCH_HOME=/tmp/ COPY docs/examples/minimal.py /root/minimal.py -RUN python -c 'from deepsearch_glm.utils.load_pretrained_models import load_pretrained_nlp_models; load_pretrained_nlp_models(verbose=True);' -RUN python -c 'from docling.pipeline.standard_pdf_pipeline import StandardPdfPipeline; StandardPdfPipeline.download_models_hf(force=True);' +RUN docling-tools models download # On container environments, always set a thread budget to avoid undesired thread congestion. ENV OMP_NUM_THREADS=4 @@ -25,3 +24,6 @@ ENV OMP_NUM_THREADS=4 # On container shell: # > cd /root/ # > python minimal.py + +# Running as `docker run -e DOCLING_ARTIFACTS_PATH=/root/.cache/docling/models` will use the +# model weights included in the container image.