From b9001f934be1ba3b2d5a6eb479dc2bfb9adb3214 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Wed, 3 Jul 2024 12:17:33 -0500 Subject: [PATCH] Avoid --find-links in wheel jobs (#4509) Contributes to https://github.com/rapidsai/build-planning/issues/69 Contributes to https://github.com/rapidsai/build-planning/issues/33 Proposes a stricter pattern for passing a `pylibcugraph` wheel from the `wheel-build-cpp` job that produced it into the `wheel-build-python` job wanting to use it (as a build dependency of `cugraph`). This change improves the likelihood that issues with the `pylibcugraph` wheels will be caught in CI. ## Notes for Reviewers See https://github.com/rapidsai/rmm/pull/1586 and https://github.com/rapidsai/build-planning/issues/69#issuecomment-2174556118 for details on how I tested this approach. Authors: - James Lamb (https://github.com/jameslamb) Approvers: - Mike Sarahan (https://github.com/msarahan) URL: https://github.com/rapidsai/cugraph/pull/4509 --- ci/build_wheel_cugraph.sh | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/ci/build_wheel_cugraph.sh b/ci/build_wheel_cugraph.sh index 6545ee3eca0..6f1b23923ff 100755 --- a/ci/build_wheel_cugraph.sh +++ b/ci/build_wheel_cugraph.sh @@ -6,11 +6,16 @@ set -euo pipefail RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})" # Download the pylibcugraph wheel built in the previous step and make it -# available for pip to find. We must use PIP_FIND_LINKS because the package -# must be made available to the isolated build step, and there is no way to -# manually install it into that environment. -RAPIDS_PY_WHEEL_NAME=pylibcugraph_${RAPIDS_PY_CUDA_SUFFIX} rapids-download-wheels-from-s3 ./local-pylibcugraph -export PIP_FIND_LINKS=$(pwd)/local-pylibcugraph +# available for pip to find. +# +# ensure 'cugraph' wheel builds always use the 'pylibcugraph' just built in the same CI run +# +# using env variable PIP_CONSTRAINT is necessary to ensure the constraints +# are used when creating the isolated build environment +CPP_WHEELHOUSE=$(RAPIDS_PY_WHEEL_NAME="pylibcugraph_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 /tmp/pylibcugraph_dist) + +echo "pylibcugraph-${RAPIDS_PY_CUDA_SUFFIX} @ file://$(echo ${CPP_WHEELHOUSE}/pylibcugraph_*.whl)" > ./constraints.txt +export PIP_CONSTRAINT="${PWD}/constraints.txt" PARALLEL_LEVEL=$(python -c \ "from math import ceil; from multiprocessing import cpu_count; print(ceil(cpu_count()/4))")