Skip to content

Commit

Permalink
Merge pull request #315 from trz42/nessi.no-2023.06
Browse files Browse the repository at this point in the history
skip installation of CUDA into host_injections when testing `install_software_layer.sh`
  • Loading branch information
poksumdo authored Apr 10, 2024
2 parents cc6c6a6 + ca0a358 commit ef3543d
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 @@ -82,6 +82,8 @@ jobs:
# run wrapper script + capture & check output
out="${PWD}/eb-${EB_VERSION}.out"
export EESSI_REPOS_CFG_DIR_OVERRIDE=${PWD}/repos
# 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 --access rw --mode run --verbose --repository nessi.no-2023.06-software /software-layer/run_in_compat_layer_env.sh /software-layer/eb-${EB_VERSION}.sh 2>&1 | tee ${out}
pattern="^This is EasyBuild ${EB_VERSION} "
grep "${pattern}" ${out} || (echo "Pattern '${pattern}' not found in output!" && exit 1)
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 ef3543d

Please sign in to comment.