Skip to content

Commit

Permalink
Create Conda CI test env in one step (#2580)
Browse files Browse the repository at this point in the history
Issue: rapidsai/build-planning#22

Authors:
  - Kyle Edwards (https://github.com/KyleFromNVIDIA)

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

URL: #2580
  • Loading branch information
KyleFromNVIDIA authored Feb 12, 2025
1 parent 9345860 commit 21e943d
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 26 deletions.
3 changes: 3 additions & 0 deletions ci/release/update-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ DEPENDENCIES=(
pylibraft
rmm
rapids-dask-dependency
libraft-headers
raft-dask
libraft-tests
)
UCXX_DEPENDENCIES=(
ucx-py
Expand Down
18 changes: 6 additions & 12 deletions ci/test_cpp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,17 @@ cd "$(dirname "$(realpath "${BASH_SOURCE[0]}")")"/../

. /opt/conda/etc/profile.d/conda.sh

RAPIDS_VERSION="$(rapids-version)"
CPP_CHANNEL=$(rapids-download-conda-from-s3 cpp)
RAPIDS_TESTS_DIR=${RAPIDS_TESTS_DIR:-"${PWD}/test-results"}/
mkdir -p "${RAPIDS_TESTS_DIR}"

rapids-logger "Generate C++ testing dependencies"
rapids-dependency-file-generator \
--output conda \
--file-key test_cpp \
--matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch)" | tee env.yaml
--matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch)" \
--prepend-channel "${CPP_CHANNEL}" \
| tee env.yaml

rapids-mamba-retry env create --yes -f env.yaml -n test

Expand All @@ -23,18 +27,8 @@ set +u
conda activate test
set -u

CPP_CHANNEL=$(rapids-download-conda-from-s3 cpp)
RAPIDS_TESTS_DIR=${RAPIDS_TESTS_DIR:-"${PWD}/test-results"}/
mkdir -p "${RAPIDS_TESTS_DIR}"

rapids-print-env

rapids-mamba-retry install \
--channel "${CPP_CHANNEL}" \
"libraft-headers=${RAPIDS_VERSION}" \
"libraft=${RAPIDS_VERSION}" \
"libraft-tests=${RAPIDS_VERSION}"

rapids-logger "Check GPU usage"
nvidia-smi

Expand Down
21 changes: 7 additions & 14 deletions ci/test_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,18 @@ cd "$(dirname "$(realpath "${BASH_SOURCE[0]}")")"/../

. /opt/conda/etc/profile.d/conda.sh

RAPIDS_VERSION="$(rapids-version)"
rapids-logger "Downloading artifacts from previous jobs"
CPP_CHANNEL=$(rapids-download-conda-from-s3 cpp)
PYTHON_CHANNEL=$(rapids-download-conda-from-s3 python)

rapids-logger "Generate Python testing dependencies"
rapids-dependency-file-generator \
--output conda \
--file-key test_python \
--matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch);py=${RAPIDS_PY_VERSION}" | tee env.yaml
--matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch);py=${RAPIDS_PY_VERSION}" \
--prepend-channel "${CPP_CHANNEL}" \
--prepend-channel "${PYTHON_CHANNEL}" \
| tee env.yaml

rapids-mamba-retry env create --yes -f env.yaml -n test

Expand All @@ -23,24 +28,12 @@ set +u
conda activate test
set -u

rapids-logger "Downloading artifacts from previous jobs"
CPP_CHANNEL=$(rapids-download-conda-from-s3 cpp)
PYTHON_CHANNEL=$(rapids-download-conda-from-s3 python)

RAPIDS_TESTS_DIR=${RAPIDS_TESTS_DIR:-"${PWD}/test-results"}
RAPIDS_COVERAGE_DIR=${RAPIDS_COVERAGE_DIR:-"${PWD}/coverage-results"}
mkdir -p "${RAPIDS_TESTS_DIR}" "${RAPIDS_COVERAGE_DIR}"

rapids-print-env

rapids-mamba-retry install \
--channel "${CPP_CHANNEL}" \
--channel "${PYTHON_CHANNEL}" \
"libraft=${RAPIDS_VERSION}" \
"libraft-headers=${RAPIDS_VERSION}" \
"pylibraft=${RAPIDS_VERSION}" \
"raft-dask=${RAPIDS_VERSION}"

rapids-logger "Check GPU usage"
nvidia-smi

Expand Down
30 changes: 30 additions & 0 deletions dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ files:
includes:
- cuda_version
- test_libraft
- depends_on_libraft_headers
- depends_on_libraft
- depends_on_libraft_tests
test_python:
output: none
includes:
Expand All @@ -37,6 +40,10 @@ files:
- py_version
- test_pylibraft
- test_python_common
- depends_on_libraft
- depends_on_libraft_headers
- depends_on_pylibraft
- depends_on_raft_dask
checks:
output: none
includes:
Expand Down Expand Up @@ -545,6 +552,9 @@ dependencies:
# pip recognizes the index as a global option for the requirements.txt file
- --extra-index-url=https://pypi.nvidia.com
- --extra-index-url=https://pypi.anaconda.org/rapidsai-wheels-nightly/simple
- output_types: conda
packages:
- libraft==25.4.*,>=0.0.0a0
specific:
- output_types: [requirements, pyproject]
matrices:
Expand All @@ -561,6 +571,26 @@ dependencies:
- matrix:
packages:
- libraft==25.4.*,>=0.0.0a0
depends_on_libraft_headers:
common:
- output_types: conda
packages:
- libraft-headers==25.4.*,>=0.0.0a0
depends_on_pylibraft:
common:
- output_types: conda
packages:
- pylibraft==25.4.*,>=0.0.0a0
depends_on_raft_dask:
common:
- output_types: conda
packages:
- raft-dask==25.4.*,>=0.0.0a0
depends_on_libraft_tests:
common:
- output_types: conda
packages:
- libraft-tests==25.4.*,>=0.0.0a0
depends_on_librmm:
common:
- output_types: conda
Expand Down

0 comments on commit 21e943d

Please sign in to comment.