diff --git a/EESSI-install-software.sh b/EESSI-install-software.sh index 53e45e936c..23d7a7c051 100755 --- a/EESSI-install-software.sh +++ b/EESSI-install-software.sh @@ -252,6 +252,10 @@ if command_exists "nvidia-smi"; then ${EESSI_PREFIX}/scripts/gpu_support/nvidia/link_nvidia_host_libraries.sh fi +# Don't run the Lmod GPU driver check when doing builds (may not have a GPU, and it's not relevant for vanilla builds anyway) +echo "EESSI_OVERRIDE_GPU_CHECK='${EESSI_OVERRIDE_GPU_CHECK}'" +export EESSI_OVERRIDE_GPU_CHECK=1 + # use PR patch file to determine in which easystack files stuff was added changed_easystacks=$(cat ${pr_diff} | grep '^+++' | cut -f2 -d' ' | sed 's@^[a-z]/@@g' | grep '^easystacks/.*yml$' | egrep -v 'known-issues|missing') if [ -z "${changed_easystacks}" ]; then diff --git a/bot/build.sh b/bot/build.sh index ac50f0e655..dcc61c19d4 100755 --- a/bot/build.sh +++ b/bot/build.sh @@ -223,7 +223,7 @@ mkdir -p ${TARBALL_TMP_BUILD_STEP_DIR} BUILD_STEP_ARGS+=("--save" "${TARBALL_TMP_BUILD_STEP_DIR}") BUILD_STEP_ARGS+=("--storage" "${STORAGE}") # add options required to handle NVIDIA support -BUILD_STEP_ARGS+=("--nvidia" "install") +BUILD_STEP_ARGS+=("--nvidia" "all") if [[ ! -z ${SHARED_FS_PATH} ]]; then BUILD_STEP_ARGS+=("--host-injections" "${SHARED_FS_PATH}/host-injections") fi diff --git a/eessi_container.sh b/eessi_container.sh index a95a2c87c9..2d0238cb5d 100755 --- a/eessi_container.sh +++ b/eessi_container.sh @@ -467,6 +467,11 @@ if [[ ${SETUP_NVIDIA} -eq 1 ]]; then # No GPU so we need to "trick" Lmod to allow us to load CUDA modules even without a CUDA driver # (this variable means EESSI_OVERRIDE_GPU_CHECK=1 will be set inside the container) export SINGULARITYENV_EESSI_OVERRIDE_GPU_CHECK=1 + # We need to "trick" our LMOD_RC file to allow us to load CUDA modules even without a CUDA driver + # (this works because we build within a container and the LMOD_RC recognises that) + touch ${EESSI_TMPDIR}/libcuda.so + export SINGULARITY_CONTAINLIBS="${EESSI_TMPDIR}/libcuda.so" + echo "Applied hacks to trick Lmod to allow us to load CUDA modules" fi fi fi