Skip to content

Commit

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

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

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

URL: #684
  • Loading branch information
KyleFromNVIDIA authored Feb 13, 2025
1 parent 4e07e66 commit 211deb5
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 21 deletions.
2 changes: 2 additions & 0 deletions ci/release/update-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ echo "${NEXT_FULL_TAG}" > VERSION
DEPENDENCIES=(
dask-cuda
cuvs
cuvs-bench
libcuvs
libcuvs-tests
libraft
librmm
pylibraft
Expand Down
12 changes: 4 additions & 8 deletions ci/test_cpp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@ set -euo pipefail

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

RAPIDS_VERSION="$(rapids-version)"
CPP_CHANNEL=$(rapids-download-conda-from-s3 cpp)

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 @@ -20,17 +22,11 @@ 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}" \
"libcuvs=${RAPIDS_VERSION}" \
"libcuvs-tests=${RAPIDS_VERSION}"

rapids-logger "Check GPU usage"
nvidia-smi

Expand Down
20 changes: 7 additions & 13 deletions ci/test_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,18 @@ set -euo pipefail

. /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 @@ -20,23 +25,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}" \
"libcuvs=${RAPIDS_VERSION}" \
"cuvs=${RAPIDS_VERSION}" \
"cuvs-bench=${RAPIDS_VERSION}"

rapids-logger "Check GPU usage"
nvidia-smi

Expand Down
20 changes: 20 additions & 0 deletions dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ files:
includes:
- cuda_version
- test_libcuvs
- depends_on_libcuvs
- depends_on_libcuvs_tests
test_python:
output: none
includes:
Expand All @@ -57,6 +59,9 @@ files:
- py_version
- test_python_common
- test_py_cuvs
- depends_on_libcuvs
- depends_on_cuvs
- depends_on_cuvs_bench
checks:
output: none
includes:
Expand Down Expand Up @@ -566,6 +571,16 @@ dependencies:
- output_types: [requirements, pyproject]
packages:
- matplotlib
depends_on_cuvs:
common:
- output_types: conda
packages:
- cuvs==25.4.*,>=0.0.0a0
depends_on_cuvs_bench:
common:
- output_types: conda
packages:
- cuvs-bench==25.4.*,>=0.0.0a0
depends_on_libcuvs:
common:
- output_types: conda
Expand All @@ -590,6 +605,11 @@ dependencies:
packages:
- libcuvs-cu11==25.4.*,>=0.0.0a0
- {matrix: null, packages: [*libcuvs_unsuffixed]}
depends_on_libcuvs_tests:
common:
- output_types: conda
packages:
- libcuvs-tests==25.4.*,>=0.0.0a0
depends_on_libraft:
common:
- output_types: conda
Expand Down

0 comments on commit 211deb5

Please sign in to comment.