Skip to content

Commit

Permalink
Set pipefail in wheel build scripts (#34)
Browse files Browse the repository at this point in the history
This PR fixes up some CI scripts to actually fail if something goes
wrong, as well as some other minor cleanup.

Closes #32

---------

Co-authored-by: Bradley Dice <[email protected]>
  • Loading branch information
brandon-b-miller and bdice authored Jan 5, 2024
1 parent 2e7e967 commit ce20b81
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 10 deletions.
11 changes: 3 additions & 8 deletions ci/build_wheel.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
#!/bin/bash
# Copyright (c) 2023, NVIDIA CORPORATION
# Copyright (c) 2023-2024, NVIDIA CORPORATION

set -euo pipefail

rapids-logger "Install CUDA Toolkit"
yum update
yum install -y epel-release
yum install -y nvidia-driver-latest-dkms
yum install -y cuda-toolkit-12-3

rapids-logger "Check conda environment"
conda list
source "$(dirname "$0")/install_latest_cuda_toolkit.sh"

rapids-logger "Build wheel"
mkdir -p ./wheel-build
Expand Down
20 changes: 20 additions & 0 deletions ci/install_latest_cuda_toolkit.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash
# Copyright (c) 2024, NVIDIA CORPORATION

# Installs the latest CUDA Toolkit.
# Supports CentOS 7 and Rocky Linux 8.

yum update -y
yum install -y epel-release

OS_ID=$(. /etc/os-release; echo $ID)
if [ "${OS_ID}" == "centos" ]; then
yum install -y nvidia-driver-latest-dkms
elif [ "${OS_ID}" == "rocky" ]; then
yum install -y nvidia-driver
else
echo "Error: OS not detected as CentOS or Rocky Linux. Exiting."
exit 1
fi

yum install -y cuda-toolkit-12-3
4 changes: 2 additions & 2 deletions ci/test_wheel.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
# Copyright (c) 2023, NVIDIA CORPORATION
# Copyright (c) 2023-2024, NVIDIA CORPORATION

set -e
set -euo pipefail

rapids-logger "Download Wheel"
RAPIDS_PY_WHEEL_NAME="pynvjitlink-cu12" rapids-download-wheels-from-s3 ./wheel-build/
Expand Down

0 comments on commit ce20b81

Please sign in to comment.