File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,24 @@ export DOCROOT
1717# PADDLE_WHL is defined in ci_start.sh
1818if ! pip3 list --disable-pip-version-check | grep paddlepaddle; then
1919 echo " Paddle is not found, attempting to install from ${PADDLE_WHL} ..."
20- pip3 install --no-cache-dir -q --progress-bar off -i https://pypi.tuna.tsinghua.edu.cn/simple ${PADDLE_WHL}
20+
21+ # Install logic:
22+ # - If PADDLE_WHL is a .whl file URL: download and install locally
23+ # - Otherwise: install directly via pip (supports package names and other URLs)
24+ if [[ " ${PADDLE_WHL} " == * .whl ]]; then
25+ echo " Downloading wheel file: ${PADDLE_WHL} "
26+ wget -q ${PADDLE_WHL} -O /tmp/paddle.whl
27+ if [ $? -ne 0 ]; then
28+ echo -e " \e[31mError: Failed to download wheel file from ${PADDLE_WHL} \e[0m"
29+ exit 1
30+ fi
31+ echo " Installing local wheel file..."
32+ pip3 install --no-cache-dir -q --progress-bar off /tmp/paddle.whl
33+ else
34+ echo " Using pip install directly..."
35+ pip3 install --no-cache-dir -q --progress-bar off -i https://pypi.tuna.tsinghua.edu.cn/simple ${PADDLE_WHL}
36+ fi
37+
2138 if [ $? -ne 0 ]; then
2239 echo -e " \e[31mError: Failed to install paddle from ${PADDLE_WHL} \e[0m"
2340 exit 1
You can’t perform that action at this time.
0 commit comments