Skip to content

Commit

Permalink
Pin wheel dependencies to same RAPIDS release (#1200)
Browse files Browse the repository at this point in the history
Now that wheel CI is enabled, the nightly index will contain next release wheels, so we need to ensure those don't get installed while still building this release.

Also tests a new mechanism (`local-wheelhouse`) for cibuildwheel to prefer local wheels.

Authors:
  - Sevag H (https://github.com/sevagh)
  - Vyas Ramasubramani (https://github.com/vyasr)

Approvers:
  - AJ Schmidt (https://github.com/ajschmidt8)
  - Corey J. Nolet (https://github.com/cjnolet)

URL: #1200
  • Loading branch information
sevagh authored Jan 31, 2023
1 parent 4f33aab commit dc4e8f0
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 11 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,7 @@ jobs:
build_type: pull-request
package-name: raft_dask
package-dir: python/raft-dask
before-wheel: "RAPIDS_PY_WHEEL_NAME=pylibraft_cu11 rapids-download-wheels-from-s3 ./local-pylibraft-dep"
cibw-before-build: "pip install --no-deps ./local-pylibraft-dep/pylibraft*.whl"
before-wheel: "RAPIDS_PY_WHEEL_NAME=pylibraft_cu11 rapids-download-wheels-from-s3 ./local-wheelhouse"
skbuild-configure-options: "-DRAFT_BUILD_WHEELS=ON -DDETECT_CONDA_ENV=OFF -DFIND_RAFT_CPP=OFF"
wheel-tests-raft-dask:
needs: wheel-build-raft-dask
Expand Down
15 changes: 14 additions & 1 deletion ci/release/update-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,14 @@ CURRENT_MAJOR=$(echo $CURRENT_TAG | awk '{split($0, a, "."); print a[1]}')
CURRENT_MINOR=$(echo $CURRENT_TAG | awk '{split($0, a, "."); print a[2]}')
CURRENT_PATCH=$(echo $CURRENT_TAG | awk '{split($0, a, "."); print a[3]}')
CURRENT_SHORT_TAG=${CURRENT_MAJOR}.${CURRENT_MINOR}
CURRENT_UCX_PY_VERSION="$(curl -sL https://version.gpuci.io/rapids/${CURRENT_SHORT_TAG}).*"

#Get <major>.<minor> for next version
NEXT_MAJOR=$(echo $NEXT_FULL_TAG | awk '{split($0, a, "."); print a[1]}')
NEXT_MINOR=$(echo $NEXT_FULL_TAG | awk '{split($0, a, "."); print a[2]}')
NEXT_SHORT_TAG=${NEXT_MAJOR}.${NEXT_MINOR}
NEXT_UCX_PY_VERSION="$(curl -sL https://version.gpuci.io/rapids/${NEXT_SHORT_TAG}).*"
NEXT_UCX_PY_SHORT_TAG="$(curl -sL https://version.gpuci.io/rapids/${NEXT_SHORT_TAG})"
NEXT_UCX_PY_VERSION="${NEXT_UCX_PY_SHORT_TAG}.*"

echo "Preparing release $CURRENT_TAG => $NEXT_FULL_TAG"

Expand Down Expand Up @@ -56,3 +58,14 @@ sed_runner "/^ucx_py_version:$/ {n;s/.*/ - \"${NEXT_UCX_PY_VERSION}\"/}" conda/

# Wheel builds install dask-cuda from source, update its branch
sed_runner "s/dask-cuda.git@branch-[^\"\s]\+/dask-cuda.git@branch-${NEXT_SHORT_TAG}/g" .github/workflows/*.yaml

# Need to distutils-normalize the original version
NEXT_SHORT_TAG_PEP440=$(python -c "from setuptools.extern import packaging; print(packaging.version.Version('${NEXT_SHORT_TAG}'))")
NEXT_UCX_PY_SHORT_TAG_PEP440=$(python -c "from setuptools.extern import packaging; print(packaging.version.Version('${NEXT_UCX_PY_SHORT_TAG}'))")

# Wheel builds install intra-RAPIDS dependencies from same release
sed_runner "s/{cuda_suffix}[^\"].*\",/{cuda_suffix}==${NEXT_SHORT_TAG_PEP440}.*\",/g" python/pylibraft/setup.py
sed_runner "s/{cuda_suffix}.*\"\]/{cuda_suffix}==${NEXT_SHORT_TAG_PEP440}.*\"\]/g" python/pylibraft/_custom_build/backend.py
sed_runner "s/dask-cuda==.*\",/dask-cuda==${NEXT_SHORT_TAG_PEP440}.*\",/g" python/raft-dask/setup.py
sed_runner "s/pylibraft{cuda_suffix}.*\",/pylibraft{cuda_suffix}==${NEXT_SHORT_TAG_PEP440}.*\",/g" python/raft-dask/setup.py
sed_runner "s/ucx-py{cuda_suffix}.*\",/ucx-py{cuda_suffix}==${NEXT_UCX_PY_SHORT_TAG_PEP440}.*\",/g" python/raft-dask/setup.py
7 changes: 3 additions & 4 deletions python/pylibraft/_custom_build/backend.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2022, NVIDIA CORPORATION.
# Copyright (c) 2022-2023, NVIDIA CORPORATION.

"""Custom build backend for pylibraft to get versioned requirements.
Expand All @@ -18,9 +18,8 @@ def replace_requirements(func):
@wraps(func)
def wrapper(config_settings=None):
orig_list = getattr(_orig, func.__name__)(config_settings)
append_list = [
f"rmm{os.getenv('RAPIDS_PY_WHEEL_CUDA_SUFFIX', default='')}"
]
cuda_suffix = os.getenv("RAPIDS_PY_WHEEL_CUDA_SUFFIX", default="")
append_list = [f"rmm{cuda_suffix}==23.2.*"]
return orig_list + append_list

return wrapper
Expand Down
4 changes: 2 additions & 2 deletions python/pylibraft/setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2022, NVIDIA CORPORATION.
# Copyright (c) 2022-2023, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -25,7 +25,7 @@
install_requires = [
"numpy",
"cuda-python>=11.7.1,<12.0",
f"rmm{cuda_suffix}",
f"rmm{cuda_suffix}==23.2.*",
]

extras_require = {
Expand Down
4 changes: 2 additions & 2 deletions python/raft-dask/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
"joblib>=0.11",
"dask-cuda==23.2.*",
"dask>=2022.12.0",
f"ucx-py{cuda_suffix}",
f"ucx-py{cuda_suffix}==0.30.*",
"distributed>=2022.12.0",
f"pylibraft{cuda_suffix}",
f"pylibraft{cuda_suffix}==23.2.*",
]

extras_require = {
Expand Down

0 comments on commit dc4e8f0

Please sign in to comment.