From d76912ab15e7ece478cd25089f0e29bcad011055 Mon Sep 17 00:00:00 2001 From: LGRY <48902505+LGRY@users.noreply.github.com> Date: Tue, 13 Jan 2026 11:48:42 +0800 Subject: [PATCH] Fix: Use uv pip install for Docling installation (#12567) Fixes #12440 ### What problem does this PR solve? The current implementation uses `python3 -m pip` which can fail in certain environments. This change leverages `uv pip install` instead, which aligns with the project's existing tooling. ### Type of change - Removed the ensurepip line (not needed since uv manages pip) - Changed python3 to "$PY" for consistency with the rest of the script - Changed python3 -m pip install to uv pip install Co-authored-by: Gongzi --- docker/entrypoint.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index 62e0ed848..7770ab8d0 100755 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -195,10 +195,9 @@ function start_mcp_server() { function ensure_docling() { [[ "${USE_DOCLING}" == "true" ]] || { echo "[docling] disabled by USE_DOCLING"; return 0; } - python3 -c 'import pip' >/dev/null 2>&1 || python3 -m ensurepip --upgrade || true DOCLING_PIN="${DOCLING_VERSION:-==2.58.0}" - python3 -c "import importlib.util,sys; sys.exit(0 if importlib.util.find_spec('docling') else 1)" \ - || python3 -m pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --extra-index-url https://pypi.org/simple --no-cache-dir "docling${DOCLING_PIN}" + "$PY" -c "import importlib.util,sys; sys.exit(0 if importlib.util.find_spec('docling') else 1)" \ + || uv pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --extra-index-url https://pypi.org/simple --no-cache-dir "docling${DOCLING_PIN}" } # -----------------------------------------------------------------------------