Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion EESSI-extend-easybuild.eb
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,11 @@ easybuild_version = os.getenv("EBVERSIONEASYBUILD") or easybuild_version
eessi_version = os.getenv("EESSI_VERSION") or "2023.06"

-- Set environment variables that are EasyBuild version specific
if convertToCanonical(easybuild_version) > convertToCanonical("4") then
-- Do unload unconditionally, so that even if EB versions were switched in the meantime, this gets unset
-- This avoids issues where EESSI-extend is first loaded with EB => 5.1 (which set these vars)
-- but then EB is swapped for a version < 5.1 and then EESSI-extend is unloaded (which would not unset
-- these vars if we did it conditional on the EB version)
if convertToCanonical(easybuild_version) >= convertToCanonical("5.1") or mode() == "unload" then
setenv ("EASYBUILD_STRICT_RPATH_SANITY_CHECK", "1")
setenv ("EASYBUILD_CUDA_SANITY_CHECK_ERROR_ON_FAILED_CHECKS", "1")
setenv ("EASYBUILD_FAIL_ON_MOD_FILES_GCCCORE", "1")
Expand Down
47 changes: 24 additions & 23 deletions EESSI-install-software.sh
Original file line number Diff line number Diff line change
Expand Up @@ -247,29 +247,6 @@ 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
Expand Down Expand Up @@ -316,6 +293,30 @@ 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
# (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


if [ ! -z "${shared_fs_path}" ]; then
shared_eb_sourcepath=${shared_fs_path}/easybuild/sources
echo ">> Using ${shared_eb_sourcepath} as shared EasyBuild source path"
Expand Down
Loading