mirror of
https://github.com/wassname/ray.git
synced 2026-06-27 20:22:39 +08:00
[RLlib] Retry pip installs (after waiting n seconds) in install-dependencies.sh (#8354)
This commit is contained in:
@@ -216,7 +216,20 @@ install_dependencies() {
|
||||
# These packages aren't Windows-compatible
|
||||
pip_packages+=(blist) # https://github.com/DanielStutzbach/blist/issues/81#issue-391460716
|
||||
fi
|
||||
CC=gcc pip install "${pip_packages[@]}"
|
||||
|
||||
# Try n times; we often encounter OpenSSL.SSL.WantReadError (or others)
|
||||
# that break the entire CI job: Simply retry installation in this case
|
||||
# after n seconds.
|
||||
local status="0";
|
||||
local errmsg="";
|
||||
for i in {1..3};
|
||||
do
|
||||
errmsg=$(CC=gcc pip install "${pip_packages[@]}" 2>&1) && break;
|
||||
status=$errmsg && echo "'pip install ...' failed, will retry after n seconds!" && sleep 30;
|
||||
done
|
||||
if [ "$status" != "0" ]; then
|
||||
echo "${status}" && return 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "${LINT-}" = 1 ]; then
|
||||
|
||||
Reference in New Issue
Block a user