Skip to content

Commit

Permalink
Use rapids-dependency-file-generator.
Browse files Browse the repository at this point in the history
  • Loading branch information
bdice committed Jun 3, 2024
1 parent a30f018 commit 0e36b7a
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 33 deletions.
15 changes: 13 additions & 2 deletions ci/check_style.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
#!/bin/bash
# Copyright (c) 2023, NVIDIA CORPORATION
# Copyright (c) 2023-2024, NVIDIA CORPORATION

set -euo pipefail

pip install pre-commit
rapids-logger "Create checks conda environment"
. /opt/conda/etc/profile.d/conda.sh

ENV_YAML_DIR="$(mktemp -d)"

rapids-dependency-file-generator \
--output conda \
--file_key checks \
--matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch);py=${RAPIDS_PY_VERSION}" | tee "${ENV_YAML_DIR}/env.yaml"

rapids-mamba-retry env create --yes -f "${ENV_YAML_DIR}/env.yaml" -n checks
conda activate checks

# Run pre-commit checks
pre-commit run --all-files --show-diff-on-failure
22 changes: 9 additions & 13 deletions ci/test_conda.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,15 @@ set -euo pipefail
. /opt/conda/etc/profile.d/conda.sh

rapids-logger "Install testing dependencies"
# TODO: Replace with rapids-dependency-file-generator
rapids-mamba-retry create -n test \
c-compiler \
cxx-compiler \
cuda-nvcc \
cuda-nvrtc \
cuda-python \
cuda-version=${RAPIDS_CUDA_VERSION%.*} \
"numba>=0.58" \
make \
psutil \
pytest \
python=${RAPIDS_PY_VERSION}

ENV_YAML_DIR="$(mktemp -d)"

rapids-dependency-file-generator \
--output conda \
--file_key test \
--matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch);py=${RAPIDS_PY_VERSION}" | tee "${ENV_YAML_DIR}/env.yaml"

rapids-mamba-retry env create --yes -f "${ENV_YAML_DIR}/env.yaml" -n test

# Temporarily allow unbound variables for conda activation.
set +u
Expand Down
18 changes: 9 additions & 9 deletions ci/test_patch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ set -euo pipefail
. /opt/conda/etc/profile.d/conda.sh

rapids-logger "Install testing dependencies"
# TODO: Replace with rapids-dependency-file-generator
rapids-mamba-retry create -n test \
cuda-nvcc \
cuda-nvrtc \
cuda-python \
cuda-version=${RAPIDS_CUDA_VERSION%.*} \
"numba>=0.58" \
psutil \
python=${RAPIDS_PY_VERSION}

ENV_YAML_DIR="$(mktemp -d)"

rapids-dependency-file-generator \
--output conda \
--file_key test \
--matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch);py=${RAPIDS_PY_VERSION}" | tee "${ENV_YAML_DIR}/env.yaml"

rapids-mamba-retry env create --yes -f "${ENV_YAML_DIR}/env.yaml" -n test

# Temporarily allow unbound variables for conda activation.
set +u
Expand Down
10 changes: 1 addition & 9 deletions ci/test_wheel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,6 @@

set -euo pipefail

rapids-logger "Install testing dependencies"
# TODO: Replace with rapids-dependency-file-generator
python -m pip install \
"numba>=0.58" \
psutil \
cuda-python \
pytest

rapids-logger "Download Wheel"
RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})"
RAPIDS_PY_WHEEL_NAME="pynvjitlink_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 ./dist/
Expand All @@ -19,7 +11,7 @@ RAPIDS_TESTS_DIR=${RAPIDS_TESTS_DIR:-"${PWD}/test-results"}/
mkdir -p "${RAPIDS_TESTS_DIR}"

rapids-logger "Install wheel"
python -m pip install $(echo ./dist/pynvjitlink_${RAPIDS_PY_CUDA_SUFFIX}*.whl)
python -m pip install $(echo ./dist/pynvjitlink_${RAPIDS_PY_CUDA_SUFFIX}*.whl)[test]

rapids-logger "Build Tests"
pushd test_binary_generation
Expand Down

0 comments on commit 0e36b7a

Please sign in to comment.