From bbd8d2eab8ac9af104aca63cd9db9e84bb6cc73a Mon Sep 17 00:00:00 2001 From: ooooo <3164076421@qq.com> Date: Wed, 29 Oct 2025 23:45:23 +0800 Subject: [PATCH 1/3] ci: explicit exit when pip install whl_url failed --- ci_scripts/gendoc.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ci_scripts/gendoc.sh b/ci_scripts/gendoc.sh index f7377d0d3bc..7858cc27f93 100755 --- a/ci_scripts/gendoc.sh +++ b/ci_scripts/gendoc.sh @@ -15,9 +15,14 @@ export DOCROOT # install paddle if not installed yet. # PADDLE_WHL is defined in ci_start.sh -pip3 list --disable-pip-version-check | grep paddlepaddle > /dev/null -if [ $? -ne 0 ] ; then +if ! pip3 list --disable-pip-version-check | grep paddlepaddle; then + echo "Paddle is not found, attempting to install from ${PADDLE_WHL}..." pip3 install --no-cache-dir -q --progress-bar off -i https://pypi.tuna.tsinghua.edu.cn/simple ${PADDLE_WHL} + if [ $? -ne 0 ]; then + echo -e "\e[31mError: Failed to install paddle from ${PADDLE_WHL}\e[0m" + exit 1 + fi + echo "Paddle installed successfully." fi From 1ec9f1b9efc09434c75d3bdbc74aa7d4ca18b10a Mon Sep 17 00:00:00 2001 From: ooooo <3164076421@qq.com> Date: Thu, 30 Oct 2025 03:19:42 +0000 Subject: [PATCH 2/3] refine code --- ci_scripts/gendoc.sh | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/ci_scripts/gendoc.sh b/ci_scripts/gendoc.sh index 7858cc27f93..1a5bad315da 100755 --- a/ci_scripts/gendoc.sh +++ b/ci_scripts/gendoc.sh @@ -17,7 +17,24 @@ export DOCROOT # PADDLE_WHL is defined in ci_start.sh if ! pip3 list --disable-pip-version-check | grep paddlepaddle; then echo "Paddle is not found, attempting to install from ${PADDLE_WHL}..." - pip3 install --no-cache-dir -q --progress-bar off -i https://pypi.tuna.tsinghua.edu.cn/simple ${PADDLE_WHL} + + # Install logic: + # - If PADDLE_WHL is a .whl file URL: download and install locally + # - Otherwise: install directly via pip (supports package names and other URLs) + if [[ "${PADDLE_WHL}" == *.whl ]]; then + echo "Downloading wheel file: ${PADDLE_WHL}" + wget -q ${PADDLE_WHL} -O /tmp/paddle.whl + if [ $? -ne 0 ]; then + echo -e "\e[31mError: Failed to download wheel file from ${PADDLE_WHL}\e[0m" + exit 1 + fi + echo "Installing local wheel file..." + pip3 install --no-cache-dir -q --progress-bar off /tmp/paddle.whl + else + echo "Using pip install directly..." + pip3 install --no-cache-dir -q --progress-bar off -i https://pypi.tuna.tsinghua.edu.cn/simple ${PADDLE_WHL} + fi + if [ $? -ne 0 ]; then echo -e "\e[31mError: Failed to install paddle from ${PADDLE_WHL}\e[0m" exit 1 From 89feafa80dce41e2df112ef178c890f0e02f063d Mon Sep 17 00:00:00 2001 From: ooooo <3164076421@qq.com> Date: Thu, 30 Oct 2025 04:06:04 +0000 Subject: [PATCH 3/3] refine code --- ci_scripts/gendoc.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci_scripts/gendoc.sh b/ci_scripts/gendoc.sh index 1a5bad315da..a3874f1dac5 100755 --- a/ci_scripts/gendoc.sh +++ b/ci_scripts/gendoc.sh @@ -29,7 +29,7 @@ if ! pip3 list --disable-pip-version-check | grep paddlepaddle; then exit 1 fi echo "Installing local wheel file..." - pip3 install --no-cache-dir -q --progress-bar off /tmp/paddle.whl + pip3 install --no-cache-dir -q --progress-bar off -i https://pypi.tuna.tsinghua.edu.cn/simple /tmp/paddle.whl else echo "Using pip install directly..." pip3 install --no-cache-dir -q --progress-bar off -i https://pypi.tuna.tsinghua.edu.cn/simple ${PADDLE_WHL}