Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DON'T MERGE {2023.06}[foss/2023b] ~wget v1.21.4~ -> py-cpuinfo v9.0.0 #74

Open
wants to merge 7 commits into
base: nessi.no-2023.06
Choose a base branch
from
Open
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
easyconfigs:
# wget got ingested already
# - wget-1.21.4-GCCcore-13.2.0.eb
- py-cpuinfo-9.0.0-GCCcore-13.2.0.eb:
options:
# see https://github.com/easybuilders/easybuild-easyconfigs/pull/20125
from-commit: 6515b44cd84a20fe7876cb4bdaf3c0080e688566
27 changes: 27 additions & 0 deletions scripts/gpu_support/nvidia/install_cuda_host_injections.sh
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,24 @@ else
fatal_error "${error}"
fi

# need to temporarily overwrite arch-specific SitePackage.lua or installation
# might fail in sanity check
mkdir -p ${cuda_install_parent}/.lmod
if [ -f ${cuda_install_parent}/.lmod/SitePackage.lua ]; then
mv ${cuda_install_parent}/.lmod/SitePackage.lua bkup-xyz-SitePackage.lua
fi
cat <<EOF > ${cuda_install_parent}/.lmod/SitePackage.lua
require("strict")
local hook = require("Hook")
local open = io.open

function arch_specific_load_hook(t)
LmodMessage("Ignoring ${EESSI_SOFTWARE_PATH}/.lmod/SitePackage.lua to allow for installing CUDA/12.1.1 under host_injections")
end

hook.register("load", arch_specific_load_hook)
EOF

# We need the --rebuild option, as the CUDA module may or may not be on the
# `MODULEPATH` yet. Even if it is, we still want to redo this installation
# since it will provide the symlinked targets for the parts of the CUDA
Expand All @@ -199,6 +217,15 @@ else
# shellcheck disable=SC2086 # Intended splitting of extra_args
eb --prefix="$tmpdir" ${extra_args} --accept-eula-for=CUDA --hooks="$tmpdir"/none.py --installpath="${cuda_install_parent}"/ "${cuda_easyconfig}"
ret=$?

# remove temporary SitePackage.lua
rm ${cuda_install_parent}/.lmod/SitePackage.lua

# restore original arch-specific SitePackage.lua if any was present
if [ -f bkup-xyz-SitePackage.lua ]; then
mv bkup-xyz-SitePackage.lua ${cuda_install_parent}/.lmod/SitePackage.lua
fi

if [ $ret -ne 0 ]; then
eb_last_log=$(unset EB_VERBOSE; eb --last-log)
cp -a ${eb_last_log} .
Expand Down
Loading