Skip to content
28 changes: 14 additions & 14 deletions EESSI-install-software.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions init/modules/EESSI/2023.06.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions init/modules/EESSI/2025.06.lua
29 changes: 21 additions & 8 deletions install_scripts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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))
Expand All @@ -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[@]}"

Expand All @@ -199,13 +213,12 @@ nvidia_files=(
)
copy_files_by_list ${TOPDIR}/scripts/gpu_support/nvidia ${INSTALL_PREFIX}/scripts/gpu_support/nvidia "${nvidia_files[@]}"

# Easystacks to be used to install software in host injections
host_injections_easystacks=(
eessi-2023.06-eb-4.9.4-2023a-CUDA-host-injections.yml
eessi-2023.06-eb-4.9.4-2023b-CUDA-host-injections.yml
)
copy_files_by_list ${TOPDIR}/scripts/gpu_support/nvidia/easystacks \
${INSTALL_PREFIX}/scripts/gpu_support/nvidia/easystacks "${host_injections_easystacks[@]}"
# Easystacks to be used to install software in host injections for this EESSI version
host_injections_easystacks_dir=${TOPDIR}/scripts/gpu_support/nvidia/easystacks/${EESSI_VERSION}
if [[ -d ${host_injections_easystacks_dir} ]]; then
host_injections_easystacks=$(find ${host_injections_easystacks_dir} -name eessi-${EESSI_VERSION}-*-CUDA-host-injections.yml -exec basename {} \;)
copy_files_by_list ${host_injections_easystacks_dir} ${INSTALL_PREFIX}/scripts/gpu_support/nvidia/easystacks "${host_injections_easystacks[@]}"
fi

# Copy over EasyBuild hooks file used for installations
hook_files=(
Expand Down