File tree Expand file tree Collapse file tree 2 files changed +15
-7
lines changed Expand file tree Collapse file tree 2 files changed +15
-7
lines changed Original file line number Diff line number Diff line change @@ -457,6 +457,12 @@ if [[ ${SETUP_NVIDIA} -eq 1 ]]; then
457457 mkdir -p ${EESSI_USR_LOCAL_CUDA}
458458 BIND_PATHS=" ${BIND_PATHS} ,${EESSI_VAR_LOG} :/var/log,${EESSI_USR_LOCAL_CUDA} :/usr/local/cuda"
459459 [[ ${VERBOSE} -eq 1 ]] && echo " BIND_PATHS=${BIND_PATHS} "
460+ if [[ " ${NVIDIA_MODE} " == " install" ]] ; then
461+ # We need to "trick" our LMOD_RC file to allow us to load CUDA modules even without a CUDA driver
462+ # (this works because we build within a container and the LMOD_RC recognises that)
463+ touch ${EESSI_TMPDIR} /libcuda.so
464+ export SINGULARITY_CONTAINLIBS=" ${EESSI_TMPDIR} /libcuda.so"
465+ fi
460466 fi
461467fi
462468
Original file line number Diff line number Diff line change @@ -50,6 +50,15 @@ if [ -d $EESSI_PREFIX ]; then
5050
5151 show_msg "Using ${EESSI_SOFTWARE_SUBDIR} as software subdirectory."
5252 export EESSI_SOFTWARE_PATH=$EESSI_PREFIX/software/$EESSI_OS_TYPE/$EESSI_SOFTWARE_SUBDIR
53+
54+ # Configure our LMOD_RC file
55+ export LMOD_RC="$EESSI_SOFTWARE_PATH/.lmod/lmodrc.lua"
56+ if [ -f $LMOD_RC ]; then
57+ show_msg "Found Lmod configuration file at $LMOD_RC"
58+ else
59+ error "Lmod configuration file not found at $LMOD_RC"
60+ fi
61+
5362 if [ ! -z $EESSI_BASIC_ENV ]; then
5463 show_msg "Only setting up basic environment, so we're done"
5564 elif [ -d $EESSI_SOFTWARE_PATH ]; then
@@ -76,13 +85,6 @@ if [ -d $EESSI_PREFIX ]; then
7685 false
7786 fi
7887
79- export LMOD_RC="$EESSI_SOFTWARE_PATH/.lmod/lmodrc.lua"
80- if [ -f $LMOD_RC ]; then
81- show_msg "Found Lmod configuration file at $LMOD_RC"
82- else
83- error "Lmod configuration file not found at $LMOD_RC"
84- fi
85-
8688 else
8789 error "EESSI software layer at $EESSI_SOFTWARE_PATH not found!"
8890 fi
You can’t perform that action at this time.
0 commit comments