Add a script that can install EESSI-extend if it doesn't exist#76
Add a script that can install EESSI-extend if it doesn't exist#76ocaisa wants to merge 2 commits intotrz42:easystacks_arg_and_bootstrap_fixesfrom
Conversation
trz42
left a comment
There was a problem hiding this comment.
One can do it like that, but should we? Looks like a "lot" of code that just installs a single module. Only difference to the original change/workaround in my PR is that it doesn't need to set --experimental because it doesn't use an easystack file.
If we were to pack the test for existence, installation and load into a single script, can't we simply test if there is an EasyBuild available (does it make any sense to install EESSI-extend without having any EasyBuild module already ingested?), if so use that to install the extend module and load it.
| # EESSI-extend is the thing that sets EASYBUILD_INSTALLPATH so we have a chicken/egg situation to resolve | ||
| export EASYBUILD_INSTALLPATH=${EESSI_PREFIX}/software/${EESSI_OS_TYPE}/${EESSI_SOFTWARE_SUBDIR_OVERRIDE} | ||
| export EASYBUILD_EXPERIMENTAL=1 | ||
| source load_eessi_extend_module.sh ${EESSI_VERSION} |
There was a problem hiding this comment.
Because the new script checks if the module exists, the whole block starting at line 282 and ending at line 292 could be replaced with the source load_eessi_extend...?
There was a problem hiding this comment.
Almost, issue is that the script relies on $EASYBUILD_INSTALLPATH ... so setting this plus sourcing the script could be sufficient.
| echo ">> Using temporary installation of EasyBuild (in ${EB_TMPDIR})..." | ||
| pip_install_out=${TMPDIR}/pip_install.out | ||
| pip3 install --prefix ${EB_TMPDIR} easybuild &> ${pip_install_out} | ||
|
|
||
| # keep track of original $PATH and $PYTHONPATH values, so we can restore them | ||
| ORIG_PATH=${PATH} | ||
| ORIG_PYTHONPATH=${PYTHONPATH} | ||
|
|
||
| echo ">> Final installation in ${EASYBUILD_INSTALLPATH}..." | ||
| export PATH=${EB_TMPDIR}/bin:${PATH} | ||
| export PYTHONPATH=$(ls -d ${EB_TMPDIR}/lib/python*/site-packages):${PYTHONPATH} | ||
| eb_install_out=${TMPDIR}/eb_install.out |
There was a problem hiding this comment.
Hmm, this looks odd to me. Should we not rely on having at least one EasyBuild module already in the stack? If there is none, then we should just stop the installation of the extend module.
No description provided.