diff --git a/easystacks/pilot.nessi.no/2023.06/eessi-2023.06-eb-4.9.1-2023b.yml b/easystacks/pilot.nessi.no/2023.06/eessi-2023.06-eb-4.9.1-2023b.yml new file mode 100644 index 0000000000..333331e51c --- /dev/null +++ b/easystacks/pilot.nessi.no/2023.06/eessi-2023.06-eb-4.9.1-2023b.yml @@ -0,0 +1,7 @@ +easyconfigs: + # wget got ingested already + # - wget-1.21.4-GCCcore-13.2.0.eb + - py-cpuinfo-9.0.0-GCCcore-13.2.0.eb: + options: + # see https://github.com/easybuilders/easybuild-easyconfigs/pull/20125 + from-commit: 6515b44cd84a20fe7876cb4bdaf3c0080e688566 diff --git a/scripts/gpu_support/nvidia/install_cuda_host_injections.sh b/scripts/gpu_support/nvidia/install_cuda_host_injections.sh index a9310d817a..ed3132e2eb 100755 --- a/scripts/gpu_support/nvidia/install_cuda_host_injections.sh +++ b/scripts/gpu_support/nvidia/install_cuda_host_injections.sh @@ -186,6 +186,24 @@ else fatal_error "${error}" fi + # need to temporarily overwrite arch-specific SitePackage.lua or installation + # might fail in sanity check + mkdir -p ${cuda_install_parent}/.lmod + if [ -f ${cuda_install_parent}/.lmod/SitePackage.lua ]; then + mv ${cuda_install_parent}/.lmod/SitePackage.lua bkup-xyz-SitePackage.lua + fi + cat < ${cuda_install_parent}/.lmod/SitePackage.lua +require("strict") +local hook = require("Hook") +local open = io.open + +function arch_specific_load_hook(t) + LmodMessage("Ignoring ${EESSI_SOFTWARE_PATH}/.lmod/SitePackage.lua to allow for installing CUDA/12.1.1 under host_injections") +end + +hook.register("load", arch_specific_load_hook) +EOF + # We need the --rebuild option, as the CUDA module may or may not be on the # `MODULEPATH` yet. Even if it is, we still want to redo this installation # since it will provide the symlinked targets for the parts of the CUDA @@ -199,6 +217,15 @@ else # shellcheck disable=SC2086 # Intended splitting of extra_args eb --prefix="$tmpdir" ${extra_args} --accept-eula-for=CUDA --hooks="$tmpdir"/none.py --installpath="${cuda_install_parent}"/ "${cuda_easyconfig}" ret=$? + + # remove temporary SitePackage.lua + rm ${cuda_install_parent}/.lmod/SitePackage.lua + + # restore original arch-specific SitePackage.lua if any was present + if [ -f bkup-xyz-SitePackage.lua ]; then + mv bkup-xyz-SitePackage.lua ${cuda_install_parent}/.lmod/SitePackage.lua + fi + if [ $ret -ne 0 ]; then eb_last_log=$(unset EB_VERBOSE; eb --last-log) cp -a ${eb_last_log} .