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 a script that can install EESSI-extend if it doesn't exist #76

Open
wants to merge 2 commits into
base: easystacks_arg_and_bootstrap_fixes
Choose a base branch
from

Conversation

ocaisa
Copy link

@ocaisa ocaisa commented Oct 31, 2024

No description provided.

Copy link
Owner

@trz42 trz42 left a 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}
Copy link
Owner

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...?

Copy link
Owner

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.

Comment on lines +55 to +66
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
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants