From cc886bd9f30da85fe8ec0a0f47f23b0fcb188001 Mon Sep 17 00:00:00 2001 From: Gil Forsyth Date: Mon, 5 May 2025 14:43:02 -0400 Subject: [PATCH 1/3] feat(rattler): port conda recipes from conda build to rattler build --- ci/build_python.sh | 18 ++++--- conda/recipes/rapids-xgboost/recipe.yaml | 46 +++++++++++++++++ conda/recipes/rapids/recipe.yaml | 63 ++++++++++++++++++++++++ 3 files changed, 119 insertions(+), 8 deletions(-) create mode 100644 conda/recipes/rapids-xgboost/recipe.yaml create mode 100644 conda/recipes/rapids/recipe.yaml diff --git a/ci/build_python.sh b/ci/build_python.sh index 45432959..53510d50 100755 --- a/ci/build_python.sh +++ b/ci/build_python.sh @@ -3,26 +3,28 @@ set -euo pipefail -rapids-configure-conda-channels - source rapids-configure-sccache source rapids-date-string +source rapids-rattler-channel-string + CONDA_CONFIG_FILE="conda/recipes/versions.yaml" rapids-print-env rapids-logger "Build rapids-xgboost" -rapids-conda-retry build \ - --variant-config-files "${CONDA_CONFIG_FILE}" \ - conda/recipes/rapids-xgboost +rattler-build build --recipe conda/recipes/rapids-xgboost \ + --variant-config "${CONDA_CONFIG_FILE}" \ + "${RATTLER_ARGS[@]}" \ + "${RATTLER_CHANNELS[@]}" rapids-logger "Build rapids" -rapids-conda-retry build \ - --variant-config-files "${CONDA_CONFIG_FILE}" \ - conda/recipes/rapids +rattler-build build --recipe conda/recipes/rapids \ + --variant-config "${CONDA_CONFIG_FILE}" \ + "${RATTLER_ARGS[@]}" \ + "${RATTLER_CHANNELS[@]}" rapids-upload-conda-to-s3 python diff --git a/conda/recipes/rapids-xgboost/recipe.yaml b/conda/recipes/rapids-xgboost/recipe.yaml new file mode 100644 index 00000000..277010a3 --- /dev/null +++ b/conda/recipes/rapids-xgboost/recipe.yaml @@ -0,0 +1,46 @@ +# Copyright (c) 2025, NVIDIA CORPORATION. +schema_version: 1 + +context: + rapids_version: ${{ env.get("GIT_DESCRIBE_TAG", default="0.0.0.dev") | replace("v", "")}} + cuda_version: ${{ (env.get("RAPIDS_CUDA_VERSION") | split("."))[:2] | join(".") }} + cuda_major: '${{ (env.get("RAPIDS_CUDA_VERSION") | split("."))[0] }}' + date_string: '${{ env.get("RAPIDS_DATE_STRING") }}' + py_version: ${{ env.get("RAPIDS_PY_VERSION") }} + py_buildstring: ${{ py_version | version_to_buildstring }} + head_rev: ${{ git.head_rev(".")[:8] }} + +package: + name: rapids-xgboost + version: ${{ rapids_version }} + +source: + path: ../../.. + +build: + string: cuda${{ cuda_major }}_py${{ py_buildstring }}_${{ date_string }}_${{ head_rev }} + +requirements: + host: + - cuda-version =${{ cuda_version }} + - pip + - python =${{ py_version }} + run: + - ${{ pin_compatible("cuda-version", upper_bound="x", lower_bound="x") }} + - nccl ${{ nccl_version }} + - python + - libxgboost ${{ xgboost_version }} rapidsai_h* + - xgboost ${{ xgboost_version }} rapidsai_py* + - if: cuda_major == "11" + then: cudatoolkit + ignore_run_exports: + by_name: + - python_abi + - if: cuda_major == "11" + then: cudatoolkit + +about: + homepage: https://rapids.ai + license: LicenseRef-Custom + license_file: LICENSE + summary: RAPIDS Suite - Open GPU Data Science diff --git a/conda/recipes/rapids/recipe.yaml b/conda/recipes/rapids/recipe.yaml new file mode 100644 index 00000000..ab70a4cd --- /dev/null +++ b/conda/recipes/rapids/recipe.yaml @@ -0,0 +1,63 @@ +# Copyright (c) 2025, NVIDIA CORPORATION. +schema_version: 1 + +context: + version: ${{ env.get("GIT_DESCRIBE_TAG", default="0.0.0.dev") | replace("v", "")}} + minor_version: ${{ (version | split("."))[:2] | join(".") }} + cuda_version: ${{ (env.get("RAPIDS_CUDA_VERSION") | split("."))[:2] | join(".") }} + cuda_major: '${{ (env.get("RAPIDS_CUDA_VERSION") | split("."))[0] }}' + date_string: '${{ env.get("RAPIDS_DATE_STRING") }}' + py_version: ${{ env.get("RAPIDS_PY_VERSION") }} + py_buildstring: ${{ py_version | version_to_buildstring }} + head_rev: ${{ git.head_rev(".")[:8] }} + linux64: ${{ linux and x86_64 }} + +package: + name: rapids + version: ${{ version }} + +source: + path: ../../.. + +build: + string: cuda${{ cuda_major }}_py${{ py_buildstring }}_${{ date_string }}_${{ head_rev }} + +requirements: + host: + - cuda-version =${{ cuda_version }} + - pip + - python =${{ py_version }} + run: + - ${{ pin_compatible("cuda-version", upper_bound="x", lower_bound="x") }} + - cupy ${{ cupy_version }} + - nccl ${{ nccl_version }} + - numpy ${{ numpy_version }} + - nvtx ${{ nvtx_version }} + - python + - cudf ${{ minor_version }}.* + - cudf-polars ${{ minor_version }}.* + - cuvs ${{ minor_version }}.* + - cugraph ${{ minor_version }}.* + - nx-cugraph ${{ minor_version }}.* + - cuml ${{ minor_version }}.* + - cucim ${{ minor_version }}.* + - cuspatial ${{ minor_version }}.* + - cuproj ${{ minor_version }}.* + - custreamz ${{ minor_version }}.* + - cuxfilter ${{ minor_version }}.* + - dask-cuda ${{ minor_version }}.* + - rapids-xgboost ${{ minor_version }}.* + - rmm ${{ minor_version }}.* + - pylibcugraph ${{ minor_version }}.* + - libcugraph_etl ${{ minor_version }}.* + - if: cuda_major == "11" + then: ptx-compiler + - conda-forge::ucx ${{ ucx_version }} + ignore_run_exports: + by_name: + - python_abi + +about: + homepage: https://rapids.ai + license: Apache-2.0 + summary: RAPIDS Suite - Open GPU Data Science From c4d45d6e3d54231be02cec6bf8143784a718fab8 Mon Sep 17 00:00:00 2001 From: Gil Forsyth Date: Tue, 27 May 2025 16:11:55 -0400 Subject: [PATCH 2/3] chore: remove conda-build meta.yaml --- conda/recipes/rapids-xgboost/meta.yaml | 54 ------------------- conda/recipes/rapids/meta.yaml | 72 -------------------------- 2 files changed, 126 deletions(-) delete mode 100644 conda/recipes/rapids-xgboost/meta.yaml delete mode 100644 conda/recipes/rapids/meta.yaml diff --git a/conda/recipes/rapids-xgboost/meta.yaml b/conda/recipes/rapids-xgboost/meta.yaml deleted file mode 100644 index cb7a4d4d..00000000 --- a/conda/recipes/rapids-xgboost/meta.yaml +++ /dev/null @@ -1,54 +0,0 @@ -# Copyright (c) 2019-2023, NVIDIA CORPORATION. - -{% set rapids_version = environ.get('GIT_DESCRIBE_TAG', '0.0.0.dev').lstrip('v') %} -{% set major_minor_version = rapids_version.split('.')[0] + '.' + rapids_version.split('.')[1] %} -{% set cuda_version = '.'.join(environ['RAPIDS_CUDA_VERSION'].split('.')[:2]) %} -{% set cuda_major = cuda_version.split('.')[0] %} -{% set py_version = environ['CONDA_PY'] %} -{% set date_string = environ['RAPIDS_DATE_STRING'] %} - -### -# Versions referenced below are set in `conda/recipe/*versions.yaml` except for -# those set above (e.g. `cuda_version`) -### - -package: - name: rapids-xgboost - version: {{ rapids_version }} - -source: - git_url: ../../.. - -build: - number: {{ GIT_DESCRIBE_NUMBER }} - string: cuda{{ cuda_major }}_py{{ py_version }}_{{ date_string }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} - -requirements: - host: - - python - - cuda-version ={{ cuda_version }} - run: - - {{ pin_compatible('cuda-version', max_pin='x', min_pin='x') }} - {% if cuda_major == "11" %} - - cudatoolkit - {% endif %} - - nccl {{ nccl_version }} - - python - - libxgboost {{ xgboost_version }} rapidsai_h* - - xgboost {{ xgboost_version }} rapidsai_py* - -test: - requires: - - cuda-version ={{ cuda_version }} - commands: - - exit 0 - -about: - home: https://rapids.ai/ - license: Custom - license_file: conda/recipes/rapids-xgboost/LICENSE - summary: 'RAPIDS + DMLC XGBoost Integration' - description: | - Meta-package for RAPIDS + DMLC XGBoost integration; version matched for RAPIDS releases. - doc_url: https://docs.rapids.ai/ - dev_url: https://github.com/rapidsai/xgboost diff --git a/conda/recipes/rapids/meta.yaml b/conda/recipes/rapids/meta.yaml deleted file mode 100644 index 6c62f8a0..00000000 --- a/conda/recipes/rapids/meta.yaml +++ /dev/null @@ -1,72 +0,0 @@ -# Copyright (c) 2019-2025, NVIDIA CORPORATION. - -{% set rapids_version = environ.get('GIT_DESCRIBE_TAG', '0.0.0.dev').lstrip('v') %} -{% set major_minor_version = rapids_version.split('.')[0] + '.' + rapids_version.split('.')[1] %} -{% set cuda_version = '.'.join(environ['RAPIDS_CUDA_VERSION'].split('.')[:2]) %} -{% set cuda_major = cuda_version.split('.')[0] %} -{% set py_version = environ['CONDA_PY'] %} -{% set date_string = environ['RAPIDS_DATE_STRING'] %} - -### -# Versions referenced below are set in `conda/recipe/*versions.yaml` except for -# those set above (e.g. `cuda_version`) -### - -package: - name: rapids - version: {{ rapids_version }} - -source: - git_url: ../../.. - -build: - number: {{ GIT_DESCRIBE_NUMBER }} - string: cuda{{ cuda_major }}_py{{ py_version }}_{{ date_string }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} - -requirements: - host: - - python - - cuda-version ={{ cuda_version }} - run: - - {{ pin_compatible('cuda-version', max_pin='x', min_pin='x') }} - - cupy {{ cupy_version }} - - nccl {{ nccl_version }} - - numpy {{ numpy_version }} - - nvtx {{ nvtx_version }} - - python - - cudf ={{ major_minor_version }}.* - - cudf-polars ={{ major_minor_version }}.* - - cuvs ={{ major_minor_version }}.* - - cugraph ={{ major_minor_version }}.* - - nx-cugraph ={{ major_minor_version }}.* - - cuml ={{ major_minor_version }}.* - - cucim ={{ major_minor_version }}.* - - custreamz ={{ major_minor_version }}.* - - cuxfilter ={{ major_minor_version }}.* - - dask-cuda ={{ major_minor_version }}.* - - rapids-xgboost ={{ major_minor_version }}.* - - rmm ={{ major_minor_version }}.* - - pylibcugraph ={{ major_minor_version }}.* - - libcugraph_etl ={{ major_minor_version }}.* - {% if cuda_major == "11" %} - - ptxcompiler # CUDA enhanced compat. See https://github.com/rapidsai/ptxcompiler - {% endif %} - - conda-forge::ucx {{ ucx_version }} - -test: - requires: - - cuda-version ={{ cuda_version }} - commands: - - exit 0 - -about: - home: https://rapids.ai/ - license: Custom - license_file: conda/recipes/rapids/LICENSE - summary: 'RAPIDS Suite - Open GPU Data Science' - description: | - Meta-package for the RAPIDS suite of software libraries. RAPIDS gives you the freedom to execute end-to-end data science - and analytics pipelines entirely on GPUs. It relies on NVIDIA® CUDA® primitives for low-level compute optimization, - but exposes that GPU parallelism and high-bandwidth memory speed through user-friendly Python interfaces. - doc_url: https://docs.rapids.ai/ - dev_url: https://github.com/rapidsai/ From 7aecc527f57bd09bef1fabee83b344835b2e55f7 Mon Sep 17 00:00:00 2001 From: Gil Forsyth Date: Tue, 3 Jun 2025 11:51:38 -0400 Subject: [PATCH 3/3] refactor: drop cuda 11 --- conda/recipes/rapids-xgboost/recipe.yaml | 4 ---- conda/recipes/rapids/recipe.yaml | 2 -- 2 files changed, 6 deletions(-) diff --git a/conda/recipes/rapids-xgboost/recipe.yaml b/conda/recipes/rapids-xgboost/recipe.yaml index 277010a3..22cfde26 100644 --- a/conda/recipes/rapids-xgboost/recipe.yaml +++ b/conda/recipes/rapids-xgboost/recipe.yaml @@ -31,13 +31,9 @@ requirements: - python - libxgboost ${{ xgboost_version }} rapidsai_h* - xgboost ${{ xgboost_version }} rapidsai_py* - - if: cuda_major == "11" - then: cudatoolkit ignore_run_exports: by_name: - python_abi - - if: cuda_major == "11" - then: cudatoolkit about: homepage: https://rapids.ai diff --git a/conda/recipes/rapids/recipe.yaml b/conda/recipes/rapids/recipe.yaml index ab70a4cd..85131eb4 100644 --- a/conda/recipes/rapids/recipe.yaml +++ b/conda/recipes/rapids/recipe.yaml @@ -50,8 +50,6 @@ requirements: - rmm ${{ minor_version }}.* - pylibcugraph ${{ minor_version }}.* - libcugraph_etl ${{ minor_version }}.* - - if: cuda_major == "11" - then: ptx-compiler - conda-forge::ucx ${{ ucx_version }} ignore_run_exports: by_name: