Skip to content

Commit

Permalink
make package installations in CI stricter
Browse files Browse the repository at this point in the history
  • Loading branch information
jameslamb committed Oct 9, 2024
1 parent fb16a0d commit 26fffb9
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 17 deletions.
6 changes: 4 additions & 2 deletions ci/build_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ set -euo pipefail
rapids-logger "Create test conda environment"
. /opt/conda/etc/profile.d/conda.sh

RAPIDS_VERSION_MAJOR_MINOR="$(rapids-version-major-minor)"
export RAPIDS_VERSION_NUMBER="${RAPIDS_VERSION_MAJOR_MINOR}"

rapids-dependency-file-generator \
--output conda \
--file-key docs \
Expand All @@ -22,12 +25,11 @@ rapids-print-env
rapids-logger "Downloading artifacts from previous jobs"

CPP_CHANNEL=$(rapids-download-conda-from-s3 cpp)
export RAPIDS_VERSION_NUMBER="24.12"
export RAPIDS_DOCS_DIR="$(mktemp -d)"

rapids-mamba-retry install \
--channel "${CPP_CHANNEL}" \
libwholegraph
"libwholegraph=${RAPIDS_VERSION_MAJOR_MINOR}"

rapids-logger "Build Doxygen docs"
pushd cpp
Expand Down
2 changes: 0 additions & 2 deletions ci/build_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ export CMAKE_GENERATOR=Ninja

rapids-print-env

PACKAGES="libwholegraph"

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

rapids-generate-version > ./VERSION
Expand Down
7 changes: 4 additions & 3 deletions ci/test_cpp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ cd "$(dirname "$(realpath "${BASH_SOURCE[0]}")")"/../

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

RAPIDS_VERSION_MAJOR_MINOR="$(rapids-version-major-minor)"

rapids-logger "Generate C++ testing dependencies"
rapids-dependency-file-generator \
--output conda \
Expand All @@ -27,11 +29,10 @@ mkdir -p "${RAPIDS_TESTS_DIR}"

rapids-print-env

PACKAGES="libwholegraph libwholegraph-tests"

rapids-mamba-retry install \
--channel "${CPP_CHANNEL}" \
"${PACKAGES}"
"libwholegraph=${RAPIDS_MAJOR_MINOR_VERSION}" \
"libwholegraph-tests=${RAPIDS_MAJOR_MINOR_VERSION}"

rapids-logger "Check GPU usage"
nvidia-smi
Expand Down
6 changes: 3 additions & 3 deletions ci/test_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ cd "$(dirname "$(realpath "${BASH_SOURCE[0]}")")"/../

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

RAPIDS_VERSION_MAJOR_MINOR="$(rapids-version-major-minor)"

ARCH=$(arch)
EXITCODE=0

Expand Down Expand Up @@ -44,13 +46,11 @@ mkdir -p "${RAPIDS_TESTS_DIR}" "${RAPIDS_COVERAGE_DIR}"

rapids-print-env

PACKAGES="pylibwholegraph"

rapids-mamba-retry install \
--channel "${CPP_CHANNEL}" \
--channel "${PYTHON_CHANNEL}" \
'mkl<2024.1.0' \
"${PACKAGES}"
"pylibwholegraph=${RAPIDS_MAJOR_MINOR_VERSION}"

rapids-logger "Check GPU usage"
nvidia-smi
Expand Down
21 changes: 14 additions & 7 deletions ci/test_wheel.sh
Original file line number Diff line number Diff line change
@@ -1,31 +1,38 @@
#!/bin/bash
# Copyright (c) 2023, NVIDIA CORPORATION.
# Copyright (c) 2023-2024, NVIDIA CORPORATION.

set -e # abort the script on error
set -o pipefail # piped commands propagate their error
set -E # ERR traps are inherited by subcommands

mkdir -p ./dist
RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})"
RAPIDS_PY_WHEEL_NAME="pylibwholegraph_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 ./dist

# echo to expand wildcard before adding `[extra]` requires for pip
python -m pip install $(echo ./dist/pylibwholegraph*.whl)
RAPIDS_PY_WHEEL_NAME="pylibwholegraph_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 python ./dist

# determine pytorch source
PKG_CUDA_VER="$(echo ${CUDA_VERSION} | cut -d '.' -f1,2 | tr -d '.')"
PKG_CUDA_VER_MAJOR=${PKG_CUDA_VER:0:2}
if [[ "${PKG_CUDA_VER_MAJOR}" == "12" ]]; then
INDEX_URL="https://download.pytorch.org/whl/cu121"
else
INDEX_URL="https://download.pytorch.org/whl/cu${PKG_CUDA_VER}"
fi

# echo to expand wildcard before adding `[extra]` requires for pip
python -m pip install \
-v \
--extra-index-url "${INDEX_URL}" \
"$(echo ./dist/pylibwholegraph*.whl)" \
numpy \
pytest \
pytest-forked \
'torch>=2.0.0a0'

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-logger "Installing PyTorch"
rapids-retry python -m pip install --pre torch --index-url ${INDEX_URL}
rapids-retry python -m pip install pytest pytest-forked numpy
rapids-logger "pytest pylibwholegraph"
cd python/pylibwholegraph/pylibwholegraph/tests
python -m pytest \
Expand Down

0 comments on commit 26fffb9

Please sign in to comment.