@@ -247,6 +247,29 @@ if [ ! -f ${_lmod_sitepackage_file} ]; then
247247 python3 ${TOPDIR} /create_lmodsitepackage.py ${_eessi_software_path}
248248fi
249249
250+ # Install full CUDA SDK and cu* libraries in host_injections
251+ # (This is done *before* configuring EasyBuild as it may rely on an older EB version)
252+ # Hardcode this for now, see if it works
253+ # TODO: We should make a nice yaml and loop over all CUDA versions in that yaml to figure out what to install
254+ # Allow skipping CUDA SDK install in e.g. CI environments
255+ echo " Going to install full CUDA SDK and cu* libraries under host_injections if necessary"
256+ temp_install_storage=${TMPDIR} /temp_install_storage
257+ mkdir -p ${temp_install_storage}
258+ if [ -z " ${skip_cuda_install} " ] || [ ! " ${skip_cuda_install} " ]; then
259+ ${EESSI_PREFIX} /scripts/gpu_support/nvidia/install_cuda_and_libraries.sh \
260+ -t ${temp_install_storage} \
261+ --accept-cuda-eula \
262+ --accept-cudnn-eula
263+ else
264+ echo " Skipping installation of CUDA SDK and cu* libraries in host_injections, since the --skip-cuda-install flag was passed"
265+ fi
266+
267+ # Install NVIDIA drivers in host_injections (if they exist)
268+ if nvidia_gpu_available; then
269+ echo " Installing NVIDIA drivers for use in prefix shell..."
270+ ${EESSI_PREFIX} /scripts/gpu_support/nvidia/link_nvidia_host_libraries.sh
271+ fi
272+
250273echo " >> Configuring EasyBuild..."
251274
252275# 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
293316source $TOPDIR /load_eessi_extend_module.sh ${EESSI_VERSION}
294317echo " DEBUG: after loading EESSI-extend // EASYBUILD_INSTALLPATH='${EASYBUILD_INSTALLPATH} '"
295318
296- # Install full CUDA SDK and cu* libraries in host_injections
297- # Hardcode this for now, see if it works
298- # TODO: We should make a nice yaml and loop over all CUDA versions in that yaml to figure out what to install
299- # Allow skipping CUDA SDK install in e.g. CI environments
300- echo " Going to install full CUDA SDK and cu* libraries under host_injections if necessary"
301- temp_install_storage=${TMPDIR} /temp_install_storage
302- mkdir -p ${temp_install_storage}
303- if [ -z " ${skip_cuda_install} " ] || [ ! " ${skip_cuda_install} " ]; then
304- ${EESSI_PREFIX} /scripts/gpu_support/nvidia/install_cuda_and_libraries.sh \
305- -t ${temp_install_storage} \
306- --accept-cuda-eula \
307- --accept-cudnn-eula
308- else
309- echo " Skipping installation of CUDA SDK and cu* libraries in host_injections, since the --skip-cuda-install flag was passed"
310- fi
311-
312- # Install NVIDIA drivers in host_injections (if they exist)
313- if nvidia_gpu_available; then
314- echo " Installing NVIDIA drivers for use in prefix shell..."
315- ${EESSI_PREFIX} /scripts/gpu_support/nvidia/link_nvidia_host_libraries.sh
316- fi
317-
318319if [ ! -z " ${shared_fs_path} " ]; then
319320 shared_eb_sourcepath=${shared_fs_path} /easybuild/sources
320321 echo " >> Using ${shared_eb_sourcepath} as shared EasyBuild source path"
0 commit comments