Skip to content

Commit f331263

Browse files
committed
Merge branch 'nessi.no-2023.06' of github-trz:NorESSI/software-layer into split_lmod_hooks
2 parents 811dd7f + 5325fda commit f331263

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

eessi_container.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff 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
461467
fi
462468

0 commit comments

Comments
 (0)