-
Notifications
You must be signed in to change notification settings - Fork 1
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 a script that can install EESSI-extend if it doesn't exist #76
base: easystacks_arg_and_bootstrap_fixes
Are you sure you want to change the base?
Add a script that can install EESSI-extend if it doesn't exist #76
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.