diff --git a/EESSI-install-software.sh b/EESSI-install-software.sh index c491819..f568c35 100755 --- a/EESSI-install-software.sh +++ b/EESSI-install-software.sh @@ -183,6 +183,20 @@ else fatal_error "Failed to initialize Lmod?! (see output in ${ml_version_out}" fi +# install any additional required scripts +# order is important: these are needed to install a full CUDA SDK in host_injections +# for now, this just reinstalls all scripts. Note the most elegant, but works + +# the install_scripts.sh script relies on knowing the location of the PR diff +# assume there's only one diff file that corresponds to the PR patch file +pr_diff=$(ls [0-9]*.diff | head -1) +export PR_DIFF="$PWD/$pr_diff" + +# Only run install_scripts.sh if not in dev.eessi.io for security +if [[ -z ${EESSI_DEV_PROJECT} ]]; then + ${TOPDIR}/install_scripts.sh --prefix ${EESSI_CVMFS_REPO}/versions/${EESSI_VERSION} --eessi-version ${EESSI_VERSION} +fi + # Make sure we start with no modules and clean $MODULEPATH echo ">> Setting up \$MODULEPATH..." module --force purge @@ -238,20 +252,6 @@ if [ ! -f ${_lmod_sitepackage_file} ]; then python3 ${TOPDIR}/create_lmodsitepackage.py ${_eessi_software_path} fi -# install any additional required scripts -# order is important: these are needed to install a full CUDA SDK in host_injections -# for now, this just reinstalls all scripts. Note the most elegant, but works - -# the install_scripts.sh script relies on knowing the location of the PR diff -# assume there's only one diff file that corresponds to the PR patch file -pr_diff=$(ls [0-9]*.diff | head -1) -export PR_DIFF="$PWD/$pr_diff" - -# Only run install_scripts.sh if not in dev.eessi.io for security -if [[ -z ${EESSI_DEV_PROJECT} ]]; then - ${TOPDIR}/install_scripts.sh --prefix ${EESSI_PREFIX} -fi - echo ">> Configuring EasyBuild..." # Make sure EESSI-extend is not loaded, and configure location variables for a diff --git a/init/modules/EESSI/2023.06.lua b/init/modules/EESSI/2023.06.lua index 7ebb26a..0d82090 100644 --- a/init/modules/EESSI/2023.06.lua +++ b/init/modules/EESSI/2023.06.lua @@ -10,6 +10,7 @@ More information whatis("Description: The European Environment for Scientific Software Installations (EESSI, pronounced as easy) is a collaboration between different European partners in HPC community. The goal of this project is to build a common stack of scientific software installations for HPC systems and beyond, including laptops, personal workstations and cloud infrastructure.") whatis("URL: https://www.eessi.io/docs/") conflict("EESSI") +-- this is a version-agnostic module file, works for EESSI/2023.06, EESSI/2025.06, etc. local eessi_version = myModuleVersion() local eessi_repo = "/cvmfs/software.eessi.io" if (subprocess("uname -m"):gsub("\n$","") == "riscv64") then diff --git a/init/modules/EESSI/2025.06.lua b/init/modules/EESSI/2025.06.lua new file mode 120000 index 0000000..cbf80d1 --- /dev/null +++ b/init/modules/EESSI/2025.06.lua @@ -0,0 +1 @@ +2023.06.lua \ No newline at end of file diff --git a/install_scripts.sh b/install_scripts.sh index cbe9bdb..b366df1 100755 --- a/install_scripts.sh +++ b/install_scripts.sh @@ -129,6 +129,10 @@ POSITIONAL_ARGS=() while [[ $# -gt 0 ]]; do case $1 in + --eessi-version) + EESSI_VERSION="$2" + shift 2 + ;; -p|--prefix) INSTALL_PREFIX="$2" shift 2 @@ -149,6 +153,16 @@ while [[ $# -gt 0 ]]; do esac done +if [ -z "${INSTALL_PREFIX}" ]; then + echo "EESSI prefix not specified, you must use --prefix" >&2 + exit 2 +fi + +if [ -z "${EESSI_VERSION}" ]; then + echo "EESSI version not specified, you must use --eessi-version" >&2 + exit 3 +fi + set -- "${POSITIONAL_ARGS[@]}" TOPDIR=$(dirname $(realpath $0)) @@ -175,7 +189,7 @@ copy_files_by_list ${TOPDIR}/init/Magic_Castle ${INSTALL_PREFIX}/init/Magic_Cast # Copy for init/modules/EESSI directory mc_files=( - 2023.06.lua + ${EESSI_VERSION}.lua ) copy_files_by_list ${TOPDIR}/init/modules/EESSI ${INSTALL_PREFIX}/init/modules/EESSI "${mc_files[@]}"