Skip to content

Commit

Permalink
Create Conda CI test env in one step
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleFromNVIDIA committed Feb 13, 2025
1 parent 5a0fed4 commit d17e1ab
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 19 deletions.
15 changes: 5 additions & 10 deletions ci/test_notebooks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,16 @@ set -euo pipefail

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

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

rapids-logger "Generate notebook testing dependencies"
rapids-dependency-file-generator \
--output conda \
--file-key test_notebooks \
--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 "${PYTHON_CHANNEL}" \
| tee env.yaml

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

Expand All @@ -22,14 +25,6 @@ set -u

rapids-print-env

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

rapids-mamba-retry install \
--channel "${PYTHON_CHANNEL}" \
"cuxfilter=${RAPIDS_VERSION}"


NBTEST="$(realpath "$(dirname "$0")/utils/nbtest.sh")"
pushd notebooks

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

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

RAPIDS_VERSION="$(rapids-version)"
rapids-logger "Downloading artifacts from previous jobs"
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 "${PYTHON_CHANNEL}" \
| tee env.yaml

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

Expand All @@ -20,19 +23,12 @@ set +u
conda activate test
set -u

rapids-logger "Downloading artifacts from previous jobs"
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 "${PYTHON_CHANNEL}" \
"cuxfilter=${RAPIDS_VERSION}"

rapids-logger "Check GPU usage"
nvidia-smi

Expand Down
7 changes: 7 additions & 0 deletions dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,14 @@ files:
- cuda_version
- py_version
- test_python
- depends_on_cuxfilter
test_notebooks:
output: none
includes:
- cuda_version
- notebook
- py_version
- depends_on_cuxfilter
checks:
output: none
includes:
Expand Down Expand Up @@ -137,6 +139,11 @@ dependencies:
- output_types: [conda, requirements]
packages:
- pre-commit
depends_on_cuxfilter:
common:
- output_types: conda
packages:
- cuxfilter==25.4.*,>=0.0.0a0
docs:
common:
- output_types: [conda, requirements]
Expand Down

0 comments on commit d17e1ab

Please sign in to comment.