Skip to content

Commit

Permalink
Avoid --find-links in wheel jobs (#4509)
Browse files Browse the repository at this point in the history
Contributes to rapidsai/build-planning#69
Contributes to rapidsai/build-planning#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 rapidsai/rmm#1586 and rapidsai/build-planning#69 (comment) for details on how I tested this approach.

Authors:
  - James Lamb (https://github.com/jameslamb)

Approvers:
  - Mike Sarahan (https://github.com/msarahan)

URL: #4509
  • Loading branch information
jameslamb authored Jul 3, 2024
1 parent a7e47c3 commit b9001f9
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions ci/build_wheel_cugraph.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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))")
Expand Down

0 comments on commit b9001f9

Please sign in to comment.