Skip to content

Commit 6d5a6ae

Browse files
author
Caspar van Leeuwen
committed
Add option to skip CUDA SDK installation, e.g. for CI environments
1 parent dc986ad commit 6d5a6ae

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

EESSI-install-software.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ display_help() {
1414
echo " -x | --http-proxy URL - provides URL for the environment variable http_proxy"
1515
echo " -y | --https-proxy URL - provides URL for the environment variable https_proxy"
1616
echo " --shared-fs-path - path to directory on shared filesystem that can be used"
17+
echo " --skip-cuda-install - disable installing a full CUDA SDK in the host_injections prefix (e.g. in CI)"
1718
}
1819

1920
function copy_build_log() {
@@ -76,6 +77,10 @@ while [[ $# -gt 0 ]]; do
7677
export shared_fs_path="${2}"
7778
shift 2
7879
;;
80+
--skip-cuda-install)
81+
export skip_cuda_install=True
82+
shift 1
83+
;;
7984
-*|--*)
8085
echo "Error: Unknown option: $1" >&2
8186
exit 1
@@ -195,7 +200,10 @@ ${TOPDIR}/install_scripts.sh --prefix ${EESSI_PREFIX}
195200
# Install full CUDA SDK in host_injections
196201
# Hardcode this for now, see if it works
197202
# TODO: We should make a nice yaml and loop over all CUDA versions in that yaml to figure out what to install
198-
${EESSI_PREFIX}/scripts/gpu_support/nvidia/install_cuda_host_injections.sh -c 12.1.1 --accept-cuda-eula
203+
# Allow skipping CUDA SDK install in e.g. CI environments
204+
if [ ! -z "${skip_cuda_install}" ] && [ ! "${skip_cuda_install}" ]; then
205+
${EESSI_PREFIX}/scripts/gpu_support/nvidia/install_cuda_host_injections.sh -c 12.1.1 --accept-cuda-eula
206+
fi
199207

200208
# Install drivers in host_injections
201209
# TODO: this is commented out for now, because the script assumes that nvidia-smi is available and works;

0 commit comments

Comments
 (0)