From 29bcdf941b4656816218275a7698ce834208fb5c Mon Sep 17 00:00:00 2001 From: Gil Forsyth Date: Wed, 5 Feb 2025 14:50:42 -0500 Subject: [PATCH] Use `rapids-pip-retry` in CI jobs that might need retries (#1533) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Uses a retry wrapper for `pip` commands to try to alleviate CI failures due to hash mismatches that result from network hiccups xref rapidsai/build-planning#148 This will retry failures that show up in CI like: ``` Collecting nvidia-cublas-cu12 (from libraft-cu12==25.2.*,>=0.0.0a0) Downloading https://pypi.nvidia.com/nvidia-cublas-cu12/nvidia_cublas_cu12-12.8.3.14-py3-none-manylinux_2_27_aarch64.whl (604.9 MB) ━━━━━━━━━━━━━━━━━━━━━ 350.2/604.9 MB 229.2 MB/s eta 0:00:02 ERROR: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the package versions, please update the hashes. Otherwise, examine the package contents carefully; someone may have tampered with them. nvidia-cublas-cu12 from https://pypi.nvidia.com/nvidia-cublas-cu12/nvidia_cublas_cu12-12.8.3.14-py3-none-manylinux_2_27_aarch64.whl#sha256=93a4e0e386cc7f6e56c822531396de8170ed17068a1e18f987574895044cd8c3 (from libraft-cu12==25.2.*,>=0.0.0a0): Expected sha256 93a4e0e386cc7f6e56c822531396de8170ed17068a1e18f987574895044cd8c3 Got 849c88d155cb4b4a3fdfebff9270fb367c58370b4243a2bdbcb1b9e7e940b7be ``` Authors: - Gil Forsyth (https://github.com/gforsyth) Approvers: - Michael Wang (https://github.com/isVoid) - Bradley Dice (https://github.com/bdice) URL: https://github.com/rapidsai/cuspatial/pull/1533 --- ci/build_wheel.sh | 2 +- ci/build_wheel_libcuspatial.sh | 4 ++-- ci/test_wheel_cuproj.sh | 2 +- ci/test_wheel_cuspatial.sh | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ci/build_wheel.sh b/ci/build_wheel.sh index b742baf0a..2d435500d 100755 --- a/ci/build_wheel.sh +++ b/ci/build_wheel.sh @@ -36,7 +36,7 @@ RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen "${RAPIDS_CUDA_VERSION}")" cd "${package_dir}" rapids-logger "Building '${package_name}' wheel" -python -m pip wheel \ +rapids-pip-retry wheel \ -w dist \ -v \ --no-deps \ diff --git a/ci/build_wheel_libcuspatial.sh b/ci/build_wheel_libcuspatial.sh index b6582d87f..767c3b0e4 100755 --- a/ci/build_wheel_libcuspatial.sh +++ b/ci/build_wheel_libcuspatial.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) 2024, NVIDIA CORPORATION. +# Copyright (c) 2024-2025, NVIDIA CORPORATION. set -euo pipefail @@ -17,7 +17,7 @@ rapids-dependency-file-generator \ | tee /tmp/requirements-build.txt rapids-logger "Installing build requirements" -python -m pip install \ +rapids-pip-retry install \ -v \ --prefer-binary \ -r /tmp/requirements-build.txt diff --git a/ci/test_wheel_cuproj.sh b/ci/test_wheel_cuproj.sh index a5ccf0dbb..648b09817 100755 --- a/ci/test_wheel_cuproj.sh +++ b/ci/test_wheel_cuproj.sh @@ -12,7 +12,7 @@ RAPIDS_PY_WHEEL_NAME="cuspatial_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels RAPIDS_PY_WHEEL_NAME="libcuspatial_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 cpp ./dist # echo to expand wildcard before adding `[extra]` requires for pip -python -m pip install \ +rapids-pip-retry install \ "$(echo ./dist/cuspatial*.whl)" \ "$(echo ./dist/cuproj*.whl)[test]" \ "$(echo ./dist/libcuspatial*.whl)" diff --git a/ci/test_wheel_cuspatial.sh b/ci/test_wheel_cuspatial.sh index f669a02b9..86256cb72 100755 --- a/ci/test_wheel_cuspatial.sh +++ b/ci/test_wheel_cuspatial.sh @@ -11,7 +11,7 @@ RAPIDS_PY_WHEEL_NAME="cuspatial_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels RAPIDS_PY_WHEEL_NAME="libcuspatial_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 cpp ./dist # echo to expand wildcard before adding `[extra]` requires for pip -python -m pip install \ +rapids-pip-retry install \ "$(echo ./dist/cuspatial*.whl)[test]" \ "$(echo ./dist/libcuspatial*.whl)"