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

Add dev.eessi.io support including project subdirectories #885

Draft
wants to merge 84 commits into
base: 2023.06-software.eessi.io
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
8a6cd13
Add EESSI_DEV_PROJET to prefix
Neves-P Nov 1, 2024
ee6aea9
Merge branch 'EESSI:2023.06-software.eessi.io' into feature/dev.eessi.io
Neves-P Nov 1, 2024
0e9402b
Print EESSI_CVMFS_REPO to debug
Neves-P Nov 1, 2024
8e628be
Merge branch 'feature/dev.eessi.io' of https://github.com/Neves-P/sof…
Neves-P Nov 1, 2024
888b874
Check if running in subshell is the cause of some variables being reset
Neves-P Nov 4, 2024
1af43f1
Revert to run minimal_eessi_env in subshell and add log line
Neves-P Nov 4, 2024
25e8a5f
Fix condition to build with subdir in prefix in dev.eessi.io
Neves-P Nov 4, 2024
3e5e2af
Add some logs to see where EESSI_CVMFS_REPO is being ovewritten
Neves-P Nov 4, 2024
722ca22
Add more log output for EESSI_DEV_PROJECT variable
Neves-P Nov 5, 2024
1c3f20a
export EESSI_DEV_PROJECT to compat layer env
Neves-P Nov 5, 2024
7c9dee8
Expose cvmfs and version override in eessi_defaults
Neves-P Nov 5, 2024
d5d1522
Also expose EESSI_CVMFS_REPO in defaults
Neves-P Nov 5, 2024
fb45d7e
Try exporting EESSI_CVMFS_INSTALL
Neves-P Nov 5, 2024
a1f11fe
Overwrite EASYBUILD_INSTALLPATH and use EESSI_CVMFS_REPO_OVERRIDE in …
Neves-P Nov 5, 2024
dd9fccd
Load $EASYBUILD_INSTALLPATH modules in dev.eessi.io
Neves-P Nov 5, 2024
821455b
Use EESSI_DEV_PROJECT for check instead of EESSI_CVMFS_REPO in EASYBU…
Neves-P Nov 5, 2024
a19c79c
Fix running install_scripts.sh only if not in dev.eessi.io
Neves-P Nov 6, 2024
afaa94f
Remove debug printing to log
Neves-P Nov 6, 2024
2c3e74e
Improved logging when $EESSI_DEV_PROJECT is set
Neves-P Nov 6, 2024
3d9424d
Fix tarball creations in dev.eessi.io
Neves-P Nov 8, 2024
028f935
Actually set install_prefix_dir
Neves-P Nov 8, 2024
4f06864
Log EESSI_DEV_PROJECT and export it
Neves-P Nov 8, 2024
9eca5e4
Fix test checking for ${install_prefix_dir}
Neves-P Nov 8, 2024
0e68f18
Look for installed software in the right directory
Neves-P Nov 10, 2024
82d36c7
Fix error reporting of input in create_tarball.sh
Neves-P Nov 19, 2024
3248438
Fix installpath to include cpu target
Neves-P Nov 19, 2024
d162ef3
Merge branch 'EESSI:2023.06-software.eessi.io' into feature/dev.eessi.io
Neves-P Nov 29, 2024
4db1083
Track EASYBUILD_EXPERIMENTAL set
Neves-P Nov 29, 2024
720d6e9
Fix typo in path
Neves-P Nov 29, 2024
e126f78
Use $TOPDIR to load_eessi_extend_module.sh
Neves-P Nov 29, 2024
5a7012c
Handle custom prefix in dev.eessi.io
Neves-P Nov 29, 2024
8dd50b0
create_tarball handles software_dir with eessi_dev_project
Neves-P Nov 29, 2024
1bec917
Fix merge conflict
Neves-P Jan 17, 2025
bbde6db
Merge pull request #2 from EESSI/2023.06-software.eessi.io
Neves-P Jan 17, 2025
bb06d25
Merge branch 'EESSI:2023.06-software.eessi.io' into feature/dev.eessi…
Neves-P Jan 20, 2025
e16e7bb
Merge branch 'EESSI:2023.06-software.eessi.io' into feature/dev.eessi…
Neves-P Jan 22, 2025
5b47737
Remove trailing `/`
Neves-P Jan 27, 2025
1ecd93b
Set EESSI_DEV_PROJECT via EESSI-extend's EESSI_PROJECT_INSTALL
Neves-P Jan 31, 2025
a4d61d6
Add some debugging infop
Neves-P Jan 31, 2025
35bd8a1
Fix syntax error
Neves-P Jan 31, 2025
72ba311
Unset EESSI_CVMFS_INSTALL on dev.eessi.io builds
Neves-P Jan 31, 2025
b3399f2
Shorten EESSI_PROJECT_INSTALL path
Neves-P Feb 1, 2025
9f0b2df
Remove more redundant parts of path
Neves-P Feb 1, 2025
3fc95e1
Restore right part of path
Neves-P Feb 1, 2025
28c6b7e
Use EESSI_SITE_INSTALL instead
Neves-P Feb 1, 2025
39d67eb
Try EESSI_PROJECT_INSTALL without minimal_eessi_env override
Neves-P Feb 2, 2025
a37ae0b
Set EESSI_PROJECT_INSTALL in minimal_eessi_env
Neves-P Feb 2, 2025
2145b93
Try full path
Neves-P Feb 2, 2025
145427f
Revert "Try full path"
Neves-P Feb 2, 2025
751aa89
Revert "Set EESSI_PROJECT_INSTALL in minimal_eessi_env"
Neves-P Feb 2, 2025
5759cd5
Revert "Try EESSI_PROJECT_INSTALL without minimal_eessi_env override"
Neves-P Feb 2, 2025
cc240d1
Revert "Use EESSI_SITE_INSTALL instead"
Neves-P Feb 2, 2025
2769b6c
Reapply "Use EESSI_SITE_INSTALL instead"
Neves-P Feb 2, 2025
1fead90
Reapply "Try EESSI_PROJECT_INSTALL without minimal_eessi_env override"
Neves-P Feb 2, 2025
13b2190
Reapply "Set EESSI_PROJECT_INSTALL in minimal_eessi_env"
Neves-P Feb 2, 2025
8b4b022
Reapply "Try full path"
Neves-P Feb 2, 2025
33a9d64
Revert "Try full path"
Neves-P Feb 2, 2025
228fe3b
Revert "Set EESSI_PROJECT_INSTALL in minimal_eessi_env"
Neves-P Feb 2, 2025
72395ea
Revert "Try EESSI_PROJECT_INSTALL without minimal_eessi_env override"
Neves-P Feb 2, 2025
b5b9916
Revert "Use EESSI_SITE_INSTALL instead"
Neves-P Feb 2, 2025
00fc025
Revert "Restore right part of path"
Neves-P Feb 2, 2025
cb41a85
Revert "Remove more redundant parts of path"
Neves-P Feb 2, 2025
ab7245a
Revert "Shorten EESSI_PROJECT_INSTALL path"
Neves-P Feb 2, 2025
d9bed4f
Revert "Unset EESSI_CVMFS_INSTALL on dev.eessi.io builds"
Neves-P Feb 2, 2025
2dd7650
Revert "Fix syntax error"
Neves-P Feb 2, 2025
5bb1c56
Revert "Add some debugging infop"
Neves-P Feb 2, 2025
dc95dbd
Revert "Set EESSI_DEV_PROJECT via EESSI-extend's EESSI_PROJECT_INSTALL"
Neves-P Feb 2, 2025
e5517b6
Try again EESSI_PROJECT_INSTALL; temp override EESSI_CVMFS_REPO
Neves-P Feb 3, 2025
6c9e295
Also unset $EESSI_CVMFS_INSTALL
Neves-P Feb 3, 2025
b71e2f9
Fix typo in `unset`
Neves-P Feb 3, 2025
9211451
Need to export EESSI_PROJECT_INSTALL
Neves-P Feb 3, 2025
48c61ef
Again, use previous apprach
Neves-P Feb 12, 2025
ee2bcb1
Handle dev.eessi.io via EESSI_extend-easybuild.eb
Neves-P Feb 14, 2025
e012bd4
Try installing to dev.eessi.io/project/version
Neves-P Feb 17, 2025
367e30b
Unset EESSI_CVMFS_INSTALL
Neves-P Feb 17, 2025
e17d4f3
Create installdir if it doesn't exist
Neves-P Feb 18, 2025
2b96be5
Correct place for eessi_dev_project in software_dir in create_tarball.sh
Neves-P Feb 18, 2025
2e0bc48
Merge branch 'feature/dev.eessi.io-merge' of https://github.com/Neves…
Neves-P Feb 18, 2025
82da386
Restore project_install definition
Neves-P Feb 20, 2025
acb896a
Add $EESSI_DEV_PROJECT to CVMFS_REPO_OVERRIDE if available
Neves-P Feb 20, 2025
4a8bcee
No longer need EESSI_DEV_PROJECT in minimal_eessi_env
Neves-P Feb 20, 2025
50937f7
EESSI_PROJECT_INSTALL should now be EESSI_CVMFS_REPO_OVERRIDE
Neves-P Feb 20, 2025
a5c2cf3
In dev.eessi.io EESSI_CVMFS_REPO now contains project subdir
Neves-P Feb 20, 2025
d0c0630
Fix input checking
Neves-P Feb 20, 2025
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
24 changes: 14 additions & 10 deletions EESSI-install-software.sh
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ export PYTHONPYCACHEPREFIX=$TMPDIR/pycache
# - .lmod/lmodrc.lua
# - .lmod/SitePackage.lua
_eessi_software_path=${EESSI_PREFIX}/software/${EESSI_OS_TYPE}/${EESSI_SOFTWARE_SUBDIR_OVERRIDE}
echo "_eessi_software_path: ${_eessi_software_path}"
_lmod_cfg_dir=${_eessi_software_path}/.lmod
_lmod_rc_file=${_lmod_cfg_dir}/lmodrc.lua
if [ ! -f ${_lmod_rc_file} ]; then
Expand All @@ -225,8 +226,8 @@ fi
# 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

# Only run install_scripts.sh if not dev.eessi.io for security
if [[ "${EESSI_CVMFS_REPO}" != /cvmfs/dev.eessi.io ]]; then
# 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

Expand All @@ -251,7 +252,17 @@ export EESSI_CVMFS_INSTALL=1
# NOTE 3, we have to set a default for EASYBUILD_INSTALLPATH here in cases the
# EESSI-extend module itself needs to be installed.
export EASYBUILD_INSTALLPATH=${EESSI_PREFIX}/software/${EESSI_OS_TYPE}/${EESSI_SOFTWARE_SUBDIR_OVERRIDE}
source load_eessi_extend_module.sh ${EESSI_VERSION}

# If in dev.eessi.io, allow building on top of software.eessi.io via EESSI-extend
if [[ ! -z ${EESSI_DEV_PROJECT} ]]; then
# Need to unset $EESSI_CVMFS_INSTALL to use $EESSI_SITE_INSTALL
unset EESSI_CVMFS_INSTALL
export EESSI_PROJECT_INSTALL=${EESSI_CVMFS_REPO_OVERRIDE}
echo ">> \$EESSI_PROJECT_INSTALL set to ${EESSI_PROJECT_INSTALL}"
mkdir -p ${EESSI_PROJECT_INSTALL}
fi

source $TOPDIR/load_eessi_extend_module.sh ${EESSI_VERSION}

# Install full CUDA SDK and cu* libraries in host_injections
# Hardcode this for now, see if it works
Expand Down Expand Up @@ -292,13 +303,6 @@ if [ ! -z ${EESSI_ACCELERATOR_TARGET} ]; then
fi
fi

# If in dev.eessi.io, allow building on top of software.eessi.io
if [[ "${EESSI_CVMFS_REPO}" == /cvmfs/dev.eessi.io ]]; then
module use /cvmfs/software.eessi.io/versions/$EESSI_VERSION/software/${EESSI_OS_TYPE}/${EESSI_SOFTWARE_SUBDIR_OVERRIDE}/modules/all
fi

module use $EASYBUILD_INSTALLPATH/modules/all

if [[ -z ${MODULEPATH} ]]; then
fatal_error "Failed to set up \$MODULEPATH?!"
else
Expand Down
6 changes: 5 additions & 1 deletion bot/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ echo "bot/build.sh: EESSI_VERSION_OVERRIDE='${EESSI_VERSION_OVERRIDE}'"
# determine CVMFS repo to be used from .repository.repo_name in ${JOB_CFG_FILE}
# here, just set EESSI_CVMFS_REPO_OVERRIDE, a bit further down
# "source init/eessi_defaults" via sourcing init/minimal_eessi_env
export EESSI_CVMFS_REPO_OVERRIDE=/cvmfs/${REPOSITORY_NAME}
export EESSI_CVMFS_REPO_OVERRIDE=/cvmfs/${REPOSITORY_NAME}${EESSI_DEV_PROJECT:+/$EESSI_DEV_PROJECT}
echo "bot/build.sh: EESSI_CVMFS_REPO_OVERRIDE='${EESSI_CVMFS_REPO_OVERRIDE}'"

# determine CPU architecture to be used from entry .architecture in ${JOB_CFG_FILE}
Expand Down Expand Up @@ -292,6 +292,10 @@ timestamp=$(date +%s)
source $software_layer_dir/init/eessi_defaults
export TGZ=$(printf "eessi-%s-software-%s-%s-%d.tar.gz" ${EESSI_VERSION} ${EESSI_OS_TYPE} ${EESSI_SOFTWARE_SUBDIR_OVERRIDE//\//-} ${timestamp})

# Export EESSI_DEV_PROJECT to use it (if needed) when making tarball
echo "bot/build.sh: EESSI_DEV_PROJECT='${EESSI_DEV_PROJECT}'"
export EESSI_DEV_PROJECT=${EESSI_DEV_PROJECT}

# value of first parameter to create_tarball.sh - TMP_IN_CONTAINER - needs to be
# synchronised with setting of TMP_IN_CONTAINER in eessi_container.sh
# TODO should we make this a configurable parameter of eessi_container.sh using
Expand Down
6 changes: 6 additions & 0 deletions bot/check-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,12 @@ if [[ ! -z ${TARBALL} ]]; then
accelerator=$(cfg_get_value "architecture" "accelerator")
prefix="${repo_version}/software/${os_type}/${software_subdir}"

# if building for dev.eessi.io is set, the prefix is different
# it needs the project name in the path
if [ ! -z ${EESSI_DEV_PROJECT} ]; then
prefix="${repo_version}/${EESSI_DEV_PROJECT}/software/${os_type}/${software_subdir}"
fi

# if we build for an accelerator, the prefix is different
if [[ ! -z ${accelerator} ]]; then
prefix="${prefix}/accel/${accelerator}"
Expand Down
1 change: 1 addition & 0 deletions create_tarball.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ source ${base_dir}/init/eessi_defaults
cvmfs_repo=${EESSI_CVMFS_REPO}

software_dir="${cvmfs_repo}/versions/${eessi_version}/software/${os}/${cpu_arch_subdir}"

if [ ! -d ${software_dir} ]; then
echo "Software directory ${software_dir} does not exist?!" >&2
exit 2
Expand Down
2 changes: 2 additions & 0 deletions init/minimal_eessi_env
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ EESSI_INIT_DIR_PATH=$(dirname $(readlink -f $BASH_SOURCE))
# script takes *_OVERRIDEs into account
source ${EESSI_INIT_DIR_PATH}/eessi_defaults


export EESSI_PREFIX=$EESSI_CVMFS_REPO/versions/$EESSI_VERSION


if [[ $(uname -s) == 'Linux' ]]; then
export EESSI_OS_TYPE='linux'
else
Expand Down
3 changes: 3 additions & 0 deletions run_in_compat_layer_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ fi
if [ ! -z ${EESSI_CVMFS_REPO_OVERRIDE} ]; then
INPUT="export EESSI_CVMFS_REPO_OVERRIDE=${EESSI_CVMFS_REPO_OVERRIDE}; ${INPUT}"
fi
if [ ! -z ${EESSI_DEV_PROJECT} ]; then
INPUT="export EESSI_DEV_PROJECT=${EESSI_DEV_PROJECT}; ${INPUT}"
fi
if [ ! -z ${EESSI_VERSION_OVERRIDE} ]; then
INPUT="export EESSI_VERSION_OVERRIDE=${EESSI_VERSION_OVERRIDE}; ${INPUT}"
fi
Expand Down