Skip to content
This repository has been archived by the owner on Nov 25, 2024. It is now read-only.

make conda installations in CI stricter #228

Merged
merged 7 commits into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions ci/build_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ set -euo pipefail
rapids-logger "Create test conda environment"
. /opt/conda/etc/profile.d/conda.sh

RAPIDS_VERSION="$(rapids-version)"

rapids-dependency-file-generator \
--output conda \
--file-key docs \
Expand All @@ -22,12 +24,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}"

rapids-logger "Build Doxygen docs"
pushd cpp
Expand All @@ -38,4 +39,4 @@ popd

rapids-logger "Output temp dir: ${RAPIDS_DOCS_DIR}"

rapids-upload-docs
RAPIDS_VERSION_NUMBER="$(rapids-verion-major-minor)" rapids-upload-docs
jameslamb marked this conversation as resolved.
Show resolved Hide resolved
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
1 change: 0 additions & 1 deletion ci/release/update-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,3 @@ for FILE in .github/workflows/*.yaml; do
sed_runner "/shared-workflows/ s/@.*/@branch-${NEXT_SHORT_TAG}/g" "${FILE}"

done
sed_runner "s/RAPIDS_VERSION_NUMBER=\".*/RAPIDS_VERSION_NUMBER=\"${NEXT_SHORT_TAG}\"/g" ci/build_docs.sh
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="$(rapids-version)"

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_VERSION}" \
"libwholegraph-tests=${RAPIDS_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="$(rapids-version)"

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_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
Loading