Skip to content

Commit

Permalink
Use CP_REPO_ACCESS_TIMEOUT_SEC to configure APT repositories connecti…
Browse files Browse the repository at this point in the history
…on timeouts

(cherry picked from commit aa55cef)
  • Loading branch information
sidoruka committed Oct 17, 2024
1 parent b1753ea commit 01367d6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions scripts/pipeline-launch/launch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -534,6 +534,11 @@ function configure_package_manager {
fi
done
elif [ "$CP_OS" == "debian" ] || [ "$CP_OS" == "ubuntu" ]; then
if [ "$CP_REPO_ACCESS_TIMEOUT_SEC" ]; then
mkdir -p /etc/apt/apt.conf.d
echo "Acquire::http::timeout \"$CP_REPO_ACCESS_TIMEOUT_SEC\";" >> /etc/apt/apt.conf.d/99cp_timeouts
echo "Acquire::https::timeout \"$CP_REPO_ACCESS_TIMEOUT_SEC\";" >> /etc/apt/apt.conf.d/99cp_timeouts
fi
for _CP_REPO_RETRY_ITER in $(seq 1 $CP_REPO_RETRY_COUNT); do
# Remove nvidia repositories, as they cause run initialization failure
rm -f /etc/apt/sources.list.d/cuda.list \
Expand Down

0 comments on commit 01367d6

Please sign in to comment.