Skip to content

Commit

Permalink
Merge pull request #528 from casparvl/skip_cuda_sdk_host_injections_i…
Browse files Browse the repository at this point in the history
…nstall

skip installation of CUDA into host_injections when testing `install_software_layer.sh` script
  • Loading branch information
boegel authored Apr 2, 2024
2 parents 3bca5b7 + c92ceb2 commit e479236
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/tests_scripts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ jobs:
export SINGULARITY_BIND="${PWD}:/software-layer"
# force using x86_64/generic, to avoid triggering an installation from scratch
sed -i "s@./EESSI-install-software.sh@\"export EESSI_SOFTWARE_SUBDIR_OVERRIDE='x86_64/generic'; ./EESSI-install-software.sh\"@g" install_software_layer.sh
# skip installation of CUDA SDKs, since this is too heavy for CI
sed -i "s@./EESSI-install-software.sh@./EESSI-install-software.sh --skip-cuda-install@g" install_software_layer.sh
./eessi_container.sh --mode run --verbose /software-layer/install_software_layer.sh
- name: test create_directory_tarballs.sh script
Expand Down
12 changes: 11 additions & 1 deletion EESSI-install-software.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ display_help() {
echo " -x | --http-proxy URL - provides URL for the environment variable http_proxy"
echo " -y | --https-proxy URL - provides URL for the environment variable https_proxy"
echo " --shared-fs-path - path to directory on shared filesystem that can be used"
echo " --skip-cuda-install - disable installing a full CUDA SDK in the host_injections prefix (e.g. in CI)"
}

function copy_build_log() {
Expand Down Expand Up @@ -76,6 +77,10 @@ while [[ $# -gt 0 ]]; do
export shared_fs_path="${2}"
shift 2
;;
--skip-cuda-install)
export skip_cuda_install=True
shift 1
;;
-*|--*)
echo "Error: Unknown option: $1" >&2
exit 1
Expand Down Expand Up @@ -195,7 +200,12 @@ ${TOPDIR}/install_scripts.sh --prefix ${EESSI_PREFIX}
# Install full CUDA SDK in host_injections
# Hardcode this for now, see if it works
# TODO: We should make a nice yaml and loop over all CUDA versions in that yaml to figure out what to install
${EESSI_PREFIX}/scripts/gpu_support/nvidia/install_cuda_host_injections.sh -c 12.1.1 --accept-cuda-eula
# Allow skipping CUDA SDK install in e.g. CI environments
if [ -z "${skip_cuda_install}" ] || [ ! "${skip_cuda_install}" ]; then
${EESSI_PREFIX}/scripts/gpu_support/nvidia/install_cuda_host_injections.sh -c 12.1.1 --accept-cuda-eula
else
echo "Skipping installation of CUDA SDK in host_injections, since the --skip-cuda-install flag was passed"
fi

# Install drivers in host_injections
# TODO: this is commented out for now, because the script assumes that nvidia-smi is available and works;
Expand Down
4 changes: 0 additions & 4 deletions install_apptainer_ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@ set -e
# see https://github.com/apptainer/singularity/issues/5390#issuecomment-899111181
sudo apt-get install alien
alien --version
# stick to Apptainer < 1.3.0 by downloading from EPEL 8.8 archive,
# since CI workflow for testing scripts hangs/fails when using Apptainer 1.3.0
# cfr. https://github.com/EESSI/software-layer/pull/514
epel_subdir="pub/epel/8"
epel_subdir="pub/archive/epel/8.8"
apptainer_rpm=$(curl --silent -L https://dl.fedoraproject.org/${epel_subdir}/Everything/x86_64/Packages/a/ | grep 'apptainer-[0-9]' | sed 's/.*\(apptainer[0-9._a-z-]*.rpm\).*/\1/g')
curl -OL https://dl.fedoraproject.org/${epel_subdir}/Everything/x86_64/Packages/a/${apptainer_rpm}
sudo alien -d ${apptainer_rpm}
Expand Down

0 comments on commit e479236

Please sign in to comment.