From da922c14419049716fd7eca0a484bc64001bd87a Mon Sep 17 00:00:00 2001 From: ocaisa Date: Tue, 5 Aug 2025 13:23:22 +0200 Subject: [PATCH 1/2] Find something to fix in `EESSI-extend` so we can deploy #45 --- EESSI-extend-easybuild.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EESSI-extend-easybuild.eb b/EESSI-extend-easybuild.eb index 2fc3deaf..0abb6ce9 100644 --- a/EESSI-extend-easybuild.eb +++ b/EESSI-extend-easybuild.eb @@ -70,7 +70,7 @@ modextravars = { # EASYBUILD_INSTALLPATH=${EESSI_PREFIX}/software/${EESSI_OS_TYPE}/${EESSI_SOFTWARE_SUBDIR} # EASYBUILD_SOURCEPATH=${WORKDIR}/easybuild/sources:${EESSI_SOURCEPATH} # -# And also some optional ones based on the kind of installation +# And also some optional ones based on the installation mode # EASYBUILD_SET_GID_BIT # EASYBUILD_GROUP_WRITABLE_INSTALLDIR # EASYBUILD_UMASK From bed1baf49892597ad96c79bc2e2f6874a760c6d8 Mon Sep 17 00:00:00 2001 From: ocaisa Date: Tue, 5 Aug 2025 13:45:59 +0200 Subject: [PATCH 2/2] Add CUDA under `host_injections` before loading `EESSI-extend` Since in 2023.06 it relies on EB 4 --- EESSI-install-software.sh | 45 ++++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/EESSI-install-software.sh b/EESSI-install-software.sh index bf5c59ca..48e03f94 100755 --- a/EESSI-install-software.sh +++ b/EESSI-install-software.sh @@ -247,6 +247,29 @@ if [ ! -f ${_lmod_sitepackage_file} ]; then python3 ${TOPDIR}/create_lmodsitepackage.py ${_eessi_software_path} fi +# Install full CUDA SDK and cu* libraries in host_injections +# (This is done *before* configuring EasyBuild as it may rely on an older EB version) +# 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 +# Allow skipping CUDA SDK install in e.g. CI environments +echo "Going to install full CUDA SDK and cu* libraries under host_injections if necessary" +temp_install_storage=${TMPDIR}/temp_install_storage +mkdir -p ${temp_install_storage} +if [ -z "${skip_cuda_install}" ] || [ ! "${skip_cuda_install}" ]; then + ${EESSI_PREFIX}/scripts/gpu_support/nvidia/install_cuda_and_libraries.sh \ + -t ${temp_install_storage} \ + --accept-cuda-eula \ + --accept-cudnn-eula +else + echo "Skipping installation of CUDA SDK and cu* libraries in host_injections, since the --skip-cuda-install flag was passed" +fi + +# Install NVIDIA drivers in host_injections (if they exist) +if nvidia_gpu_available; then + echo "Installing NVIDIA drivers for use in prefix shell..." + ${EESSI_PREFIX}/scripts/gpu_support/nvidia/link_nvidia_host_libraries.sh +fi + echo ">> Configuring EasyBuild..." # Make sure EESSI-extend is not loaded, and configure location variables for a @@ -293,28 +316,6 @@ echo "DEBUG: before loading EESSI-extend // EASYBUILD_INSTALLPATH='${EASYBUILD_I source $TOPDIR/load_eessi_extend_module.sh ${EESSI_VERSION} echo "DEBUG: after loading EESSI-extend // EASYBUILD_INSTALLPATH='${EASYBUILD_INSTALLPATH}'" -# Install full CUDA SDK and cu* libraries 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 -# Allow skipping CUDA SDK install in e.g. CI environments -echo "Going to install full CUDA SDK and cu* libraries under host_injections if necessary" -temp_install_storage=${TMPDIR}/temp_install_storage -mkdir -p ${temp_install_storage} -if [ -z "${skip_cuda_install}" ] || [ ! "${skip_cuda_install}" ]; then - ${EESSI_PREFIX}/scripts/gpu_support/nvidia/install_cuda_and_libraries.sh \ - -t ${temp_install_storage} \ - --accept-cuda-eula \ - --accept-cudnn-eula -else - echo "Skipping installation of CUDA SDK and cu* libraries in host_injections, since the --skip-cuda-install flag was passed" -fi - -# Install NVIDIA drivers in host_injections (if they exist) -if nvidia_gpu_available; then - echo "Installing NVIDIA drivers for use in prefix shell..." - ${EESSI_PREFIX}/scripts/gpu_support/nvidia/link_nvidia_host_libraries.sh -fi - if [ ! -z "${shared_fs_path}" ]; then shared_eb_sourcepath=${shared_fs_path}/easybuild/sources echo ">> Using ${shared_eb_sourcepath} as shared EasyBuild source path"