Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use rapids-build-backend. #15245

Merged
merged 81 commits into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
f4c4701
Update dependency lists to use rapids_builder
vyasr Mar 6, 2024
d1cfa34
Update conda recipes
vyasr Mar 6, 2024
ad0d201
Remove all excess metadata specifications from build_wheel.sh
vyasr Mar 6, 2024
d1793d3
Add installation logic for CI testing
vyasr Mar 6, 2024
a496610
Skip checks altogether
vyasr Mar 6, 2024
e3595e7
Set all the right builders
vyasr Mar 7, 2024
084ee5d
Just install into env because we build without isolation
vyasr Mar 7, 2024
15f5c29
Remove now superfluous commit writes
vyasr Mar 7, 2024
e121ac7
One more fix
vyasr Mar 7, 2024
fa54206
Some cleanup
vyasr Mar 7, 2024
77f8400
Add missing deps
vyasr Mar 7, 2024
f128f39
Try removing the space
vyasr Mar 7, 2024
d4eb294
Add tomli to remaining recipes
vyasr Mar 7, 2024
a645bd2
More dependencies
vyasr Mar 7, 2024
709305b
Fix pyproject.toml files
vyasr Mar 7, 2024
1140a4e
Make sure nvcc is available to infer the CUDA version
vyasr Mar 7, 2024
7f3e456
Handle CUDA version appropriately
vyasr Mar 7, 2024
8b7958d
Fix version check
vyasr Mar 7, 2024
ef3cf25
Adjust cupy dependency
vyasr Mar 7, 2024
96b23fc
Merge remote-tracking branch 'upstream/branch-24.06' into feat/rapids…
bdice Mar 18, 2024
2759bd2
Update to rapids-build-backend.
bdice Mar 18, 2024
288af48
Use GIT_COMMIT file.
bdice Mar 19, 2024
3daebc1
merge branch-24.06
jameslamb May 8, 2024
78a9d09
merge branch-24.06, get rapids-build-backend from GitHub
jameslamb May 8, 2024
dffb148
remove cuda-python rewriting from scripts
jameslamb May 9, 2024
f4e4c87
fix rmm wheel dep, git commit location
jameslamb May 9, 2024
16dddd3
add alpha specs
jameslamb May 9, 2024
4215222
Merge branch 'branch-24.06' of github.com:rapidsai/cudf into feat/rap…
jameslamb May 9, 2024
d2cfeec
remove more redundant catch-all matrices
jameslamb May 9, 2024
2dde9cc
fix conda recipe deps, comment out conda tests to save some CI capacity
jameslamb May 9, 2024
b2eca5d
fix conflicts, merge latest branch-24.06
jameslamb May 9, 2024
0e4e18d
skip conda tests
jameslamb May 9, 2024
c4b5c0a
use rapids-build-backend packages
jameslamb May 9, 2024
e7faacc
remove spaces
jameslamb May 9, 2024
c996076
Merge branch 'branch-24.06' of github.com:rapidsai/cudf into feat/rap…
jameslamb May 9, 2024
a5c602a
Merge branch 'branch-24.06' of github.com:rapidsai/cudf into feat/rap…
jameslamb May 10, 2024
0865bc5
fallbacks need to all be unsuffixed
jameslamb May 10, 2024
92cb9af
test
jameslamb May 10, 2024
b8cfed0
Merge branch 'branch-24.06' of github.com:rapidsai/cudf into feat/rap…
jameslamb May 10, 2024
00c7e53
specify dependencies-file
jameslamb May 10, 2024
499a1cc
building cudf would be useful smh
jameslamb May 10, 2024
227ff6e
Merge branch 'branch-24.06' into feat/rapids_builder
jameslamb May 13, 2024
d1b495e
uncomment all CI, simplify tests
jameslamb May 13, 2024
46a1641
keep scikit-build-core dependencies together
jameslamb May 13, 2024
33cf3f7
devcontainers expect wheel build dependencies to be defined for outpu…
jameslamb May 13, 2024
738374a
Merge branch 'branch-24.06' into feat/rapids_builder
jameslamb May 13, 2024
d4bd761
cudf_polars exists now
jameslamb May 13, 2024
03857c0
formatting changes for cudf_polars
jameslamb May 13, 2024
9abbc16
put back 'wheel' dependency
jameslamb May 13, 2024
68c38c4
Merge branch 'branch-24.06' into feat/rapids_builder
jameslamb May 13, 2024
eaff10c
Merge branch 'branch-24.06' of github.com:rapidsai/cudf into feat/rap…
jameslamb May 14, 2024
132b42c
add ceiling on rapids-build-backend
jameslamb May 14, 2024
3d11192
Merge branch 'feat/rapids_builder' of github.com:vyasr/cudf into feat…
jameslamb May 14, 2024
8e1b13e
merge branch-24.06
jameslamb May 16, 2024
6755741
use rapids-build-backend 0.2.0
jameslamb May 16, 2024
00df35e
merge in branch-24.08
jameslamb May 21, 2024
7f6878a
update rapids-build-backend
jameslamb May 21, 2024
3a2e1e1
fix one lingering 24.06 dependency left behind from merge
jameslamb May 21, 2024
d041aaf
merge branch-24.08
jameslamb May 22, 2024
209cc86
remove unnecessary diff
jameslamb May 22, 2024
4f79d09
Merge branch 'branch-24.08' into feat/rapids_builder
jameslamb May 23, 2024
8e11bf3
add alpha specs, bump to rapids-build-backend 0.3.0, disable-cuda in …
jameslamb May 23, 2024
aecfbc7
revert unnecessary changes to conda deps
jameslamb May 23, 2024
081629b
Merge branch 'branch-24.08' into feat/rapids_builder
vyasr May 23, 2024
19db0dd
Merge branch 'branch-24.08' into feat/rapids_builder
jameslamb May 24, 2024
d6114c8
standardize rapids-build-backend constraint, revert build_cpp.sh changes
jameslamb May 24, 2024
c80f560
Merge branch 'branch-24.08' into feat/rapids_builder
jameslamb May 24, 2024
92a6043
config-settings
jameslamb May 24, 2024
f677493
Merge branch 'branch-24.08' of github.com:rapidsai/cudf into feat/rap…
jameslamb May 24, 2024
63ddb5a
Update python/cudf_polars/cudf_polars/_version.py
jameslamb May 28, 2024
d424a9d
Merge branch 'branch-24.08' of github.com:rapidsai/cudf into feat/rap…
jameslamb May 28, 2024
390ebe0
Update dependencies.yaml
jameslamb May 28, 2024
b3529ff
Merge branch 'feat/rapids_builder' of github.com:vyasr/cudf into feat…
jameslamb May 28, 2024
e719a40
use cuda-nvcc instead of cuda-nvvc-impl, remove cudatoolkit
jameslamb May 28, 2024
1f95e32
simplify dependencies.yaml ... just include alpha specs for conda
jameslamb May 28, 2024
5a90fa5
consolidate rapids-build-backend
jameslamb May 28, 2024
8b76240
remove nvcc from conda recipes
jameslamb May 28, 2024
9be3551
Merge branch 'branch-24.08' into feat/rapids_builder
jameslamb May 29, 2024
d4670b1
Merge branch 'branch-24.08' of github.com:rapidsai/cudf into feat/rap…
jameslamb May 29, 2024
57b9935
retain alpha spec in update-version.sh
jameslamb May 29, 2024
e0c71e2
Merge branch 'feat/rapids_builder' of github.com:vyasr/cudf into feat…
jameslamb May 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ repos:
^CHANGELOG.md$
)
- repo: https://github.com/rapidsai/dependency-file-generator
rev: v1.13.4
rev: v1.13.11
hooks:
- id: rapids-dependency-file-generator
args: ["--clean"]
Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ BUILD_PER_THREAD_DEFAULT_STREAM=OFF
BUILD_REPORT_METRICS=OFF
BUILD_REPORT_INCL_CACHE_STATS=OFF
USE_PROPRIETARY_NVCOMP=ON
PYTHON_ARGS_FOR_INSTALL="-m pip install --no-build-isolation --no-deps"
PYTHON_ARGS_FOR_INSTALL="-m pip install --no-build-isolation --no-deps --config-settings rapidsai.disable-cuda=true"

# Set defaults for vars that may not have been defined externally
# FIXME: if INSTALL_PREFIX is not set, check PREFIX, then check
Expand Down
17 changes: 5 additions & 12 deletions ci/build_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,7 @@ export CMAKE_GENERATOR=Ninja

rapids-print-env

package_dir="python"
version=$(rapids-generate-version)
commit=$(git rev-parse HEAD)

echo "${version}" > VERSION
for package_name in cudf dask_cudf cudf_kafka custreamz; do
sed -i "/^__git_commit__/ s/= .*/= \"${commit}\"/g" ${package_dir}/${package_name}/${package_name}/_version.py
done
rapids-generate-version > ./VERSION

rapids-logger "Begin py build"

Expand All @@ -29,24 +22,24 @@ CPP_CHANNEL=$(rapids-download-conda-from-s3 cpp)
# TODO: Remove `--no-test` flag once importing on a CPU
# node works correctly
# With boa installed conda build forwards to the boa builder
RAPIDS_PACKAGE_VERSION=${version} rapids-conda-retry mambabuild \
RAPIDS_PACKAGE_VERSION=$(head -1 ./VERSION) rapids-conda-retry mambabuild \
--no-test \
--channel "${CPP_CHANNEL}" \
conda/recipes/cudf

RAPIDS_PACKAGE_VERSION=${version} rapids-conda-retry mambabuild \
RAPIDS_PACKAGE_VERSION=$(head -1 ./VERSION) rapids-conda-retry mambabuild \
--no-test \
--channel "${CPP_CHANNEL}" \
--channel "${RAPIDS_CONDA_BLD_OUTPUT_DIR}" \
conda/recipes/dask-cudf

RAPIDS_PACKAGE_VERSION=${version} rapids-conda-retry mambabuild \
RAPIDS_PACKAGE_VERSION=$(head -1 ./VERSION) rapids-conda-retry mambabuild \
--no-test \
--channel "${CPP_CHANNEL}" \
--channel "${RAPIDS_CONDA_BLD_OUTPUT_DIR}" \
conda/recipes/cudf_kafka

RAPIDS_PACKAGE_VERSION=${version} rapids-conda-retry mambabuild \
RAPIDS_PACKAGE_VERSION=$(head -1 ./VERSION) rapids-conda-retry mambabuild \
--no-test \
--channel "${CPP_CHANNEL}" \
--channel "${RAPIDS_CONDA_BLD_OUTPUT_DIR}" \
Expand Down
46 changes: 2 additions & 44 deletions ci/build_wheel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,54 +3,12 @@

set -euo pipefail

package_name=$1
package_dir=$2
package_dir=$1

source rapids-configure-sccache
source rapids-date-string

version=$(rapids-generate-version)
commit=$(git rev-parse HEAD)

RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})"

# This is the version of the suffix with a preceding hyphen. It's used
# everywhere except in the final wheel name.
PACKAGE_CUDA_SUFFIX="-${RAPIDS_PY_CUDA_SUFFIX}"

# Patch project metadata files to include the CUDA version suffix and version override.
pyproject_file="${package_dir}/pyproject.toml"

sed -i "s/^name = \"${package_name}\"/name = \"${package_name}${PACKAGE_CUDA_SUFFIX}\"/g" ${pyproject_file}
echo "${version}" > VERSION
sed -i "/^__git_commit__/ s/= .*/= \"${commit}\"/g" "${package_dir}/${package_name//-/_}/_version.py"

# For nightlies we want to ensure that we're pulling in alphas as well. The
# easiest way to do so is to augment the spec with a constraint containing a
# min alpha version that doesn't affect the version bounds but does allow usage
# of alpha versions for that dependency without --pre
alpha_spec=''
if ! rapids-is-release-build; then
alpha_spec=',>=0.0.0a0'
fi

if [[ ${package_name} == "dask-cudf" ]]; then
sed -r -i "s/cudf==(.*)\"/cudf${PACKAGE_CUDA_SUFFIX}==\1${alpha_spec}\"/g" ${pyproject_file}
sed -r -i "s/dask-cuda==(.*)\"/dask-cuda==\1${alpha_spec}\"/g" ${pyproject_file}
sed -r -i "s/rapids-dask-dependency==(.*)\"/rapids-dask-dependency==\1${alpha_spec}\"/g" ${pyproject_file}
else
sed -r -i "s/rmm(.*)\"/rmm${PACKAGE_CUDA_SUFFIX}\1${alpha_spec}\"/g" ${pyproject_file}
# ptxcompiler and cubinlinker aren't version constrained
sed -r -i "s/ptxcompiler\"/ptxcompiler${PACKAGE_CUDA_SUFFIX}\"/g" ${pyproject_file}
sed -r -i "s/cubinlinker\"/cubinlinker${PACKAGE_CUDA_SUFFIX}\"/g" ${pyproject_file}
fi

if [[ $PACKAGE_CUDA_SUFFIX == "-cu12" ]]; then
sed -i "s/cuda-python[<=>\.,0-9a]*/cuda-python>=12.0,<13.0a0/g" ${pyproject_file}
sed -i "s/cupy-cuda11x/cupy-cuda12x/g" ${pyproject_file}
sed -i "s/ptxcompiler/pynvjitlink/g" ${pyproject_file}
sed -i "/cubinlinker/d" ${pyproject_file}
fi
rapids-generate-version > ./VERSION

cd "${package_dir}"

Expand Down
2 changes: 1 addition & 1 deletion ci/build_wheel_cudf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ package_dir="python/cudf"

export SKBUILD_CMAKE_ARGS="-DUSE_LIBARROW_FROM_PYARROW=ON"

./ci/build_wheel.sh cudf ${package_dir}
./ci/build_wheel.sh ${package_dir}

python -m auditwheel repair -w ${package_dir}/final_dist ${package_dir}/dist/*

Expand Down
2 changes: 1 addition & 1 deletion ci/build_wheel_dask_cudf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -euo pipefail

package_dir="python/dask_cudf"

./ci/build_wheel.sh dask-cudf ${package_dir}
./ci/build_wheel.sh ${package_dir}

RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})"
RAPIDS_PY_WHEEL_NAME="dask_cudf_${RAPIDS_PY_CUDA_SUFFIX}" RAPIDS_PY_WHEEL_PURE="1" rapids-upload-wheels-to-s3 ${package_dir}/dist
4 changes: 2 additions & 2 deletions ci/release/update-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ DEPENDENCIES=(
)
for DEP in "${DEPENDENCIES[@]}"; do
for FILE in dependencies.yaml conda/environments/*.yaml; do
sed_runner "/-.* ${DEP}\(-cu[[:digit:]]\{2\}\)\{0,1\}==/ s/==.*/==${NEXT_SHORT_TAG_PEP440}.*/g" "${FILE}"
sed_runner "/-.* ${DEP}\(-cu[[:digit:]]\{2\}\)\{0,1\}==/ s/==.*/==${NEXT_SHORT_TAG_PEP440}.*,>=0.0.0a0/g" "${FILE}"
done
for FILE in python/*/pyproject.toml; do
sed_runner "/\"${DEP}==/ s/==.*\"/==${NEXT_SHORT_TAG_PEP440}.*\"/g" ${FILE}
sed_runner "/\"${DEP}==/ s/==.*\"/==${NEXT_SHORT_TAG_PEP440}.*,>=0.0.0a0\"/g" ${FILE}
done
done

Expand Down
6 changes: 4 additions & 2 deletions conda/environments/all_cuda-118_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ dependencies:
- cxx-compiler
- cython>=3.0.3
- dask-cuda==24.8.*
- dask-cuda==24.8.*,>=0.0.0a0
- dlpack>=0.8,<1.0
- doxygen=1.9.1
- fastavro>=0.22.9
Expand Down Expand Up @@ -76,9 +77,10 @@ dependencies:
- python-confluent-kafka>=1.9.0,<1.10.0a0
- python>=3.9,<3.12
- pytorch>=2.1.0
- rapids-dask-dependency==24.8.*
- rapids-build-backend>=0.3.0,<0.4.0.dev0
- rapids-dask-dependency==24.8.*,>=0.0.0a0
- rich
- rmm==24.8.*
- rmm==24.8.*,>=0.0.0a0
- s3fs>=2022.3.0
- scikit-build-core>=0.7.0
- scipy
Expand Down
6 changes: 4 additions & 2 deletions conda/environments/all_cuda-122_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ dependencies:
- cxx-compiler
- cython>=3.0.3
- dask-cuda==24.8.*
- dask-cuda==24.8.*,>=0.0.0a0
- dlpack>=0.8,<1.0
- doxygen=1.9.1
- fastavro>=0.22.9
Expand Down Expand Up @@ -74,9 +75,10 @@ dependencies:
- python-confluent-kafka>=1.9.0,<1.10.0a0
- python>=3.9,<3.12
- pytorch>=2.1.0
- rapids-dask-dependency==24.8.*
- rapids-build-backend>=0.3.0,<0.4.0.dev0
- rapids-dask-dependency==24.8.*,>=0.0.0a0
- rich
- rmm==24.8.*
- rmm==24.8.*,>=0.0.0a0
- s3fs>=2022.3.0
- scikit-build-core>=0.7.0
- scipy
Expand Down
1 change: 1 addition & 0 deletions conda/recipes/cudf/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ requirements:
host:
- python
- cython >=3.0.3
- rapids-build-backend >=0.3.0,<0.4.0.dev0
- scikit-build-core >=0.7.0
- dlpack >=0.8,<1.0
- numpy 1.23
Expand Down
1 change: 1 addition & 0 deletions conda/recipes/cudf_kafka/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ requirements:
- cuda-version ={{ cuda_version }}
- cudf ={{ version }}
- libcudf_kafka ={{ version }}
- rapids-build-backend >=0.3.0,<0.4.0.dev0
- scikit-build-core >=0.7.0
{% if cuda_major != "11" %}
- cuda-cudart-dev
Expand Down
4 changes: 3 additions & 1 deletion conda/recipes/custreamz/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2018-2023, NVIDIA CORPORATION.
# Copyright (c) 2018-2024, NVIDIA CORPORATION.

{% set version = environ['RAPIDS_PACKAGE_VERSION'].lstrip('v') %}
{% set minor_version = version.split('.')[0] + '.' + version.split('.')[1] %}
Expand Down Expand Up @@ -37,6 +37,8 @@ build:
requirements:
host:
- python
- rapids-build-backend >=0.3.0,<0.4.0.dev0
- setuptools
- python-confluent-kafka >=1.9.0,<1.10.0a0
- cudf_kafka ={{ version }}
- cuda-version ={{ cuda_version }}
Expand Down
4 changes: 3 additions & 1 deletion conda/recipes/dask-cudf/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2018-2023, NVIDIA CORPORATION.
# Copyright (c) 2018-2024, NVIDIA CORPORATION.

{% set version = environ['RAPIDS_PACKAGE_VERSION'].lstrip('v') %}
{% set minor_version = version.split('.')[0] + '.' + version.split('.')[1] %}
Expand Down Expand Up @@ -37,6 +37,8 @@ build:
requirements:
host:
- python
- rapids-build-backend >=0.3.0,<0.4.0.dev0
- setuptools
- cuda-version ={{ cuda_version }}
run:
- python
Expand Down
Loading
Loading