-
Notifications
You must be signed in to change notification settings - Fork 15
add support to eessi_container.sh for using unionfs overlay tool
#9
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
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
9df2fbd
add support to and for using unionfs overlay tool
boegel 955d0e6
don't hardcode software.eessi.io when creating overlay in eessi_conta…
boegel 1351105
add test for using '--overlay-tool unionfs' option for eessi_containe…
boegel dd4cc2a
add test for using '--overlay-tool unionfs' option for eessi_containe…
boegel e3a9eb8
Merge branch 'main' into eessi_container_unionfs
boegel b421f1d
replace EESSI version placeholder in CI workflow for scripts
boegel badfeba
Merge branch 'eessi_container_unionfs' of github.com:boegel/software-…
boegel d96fb6f
fix test of using unionfs as overlay-tool
boegel c9b81ba
improve pattern check in test for using unionfs as overlay-tool
boegel 2bbadca
fix checking for use of '--overlay-tool unionfs'
boegel 8e2e292
fix replacing of EESSI version placeholder in CI workflow for scripts
boegel 1675ff9
set $EESSI_VERSION_OVERRIDE rather than replacing __EESSI_VERSION_DEF…
boegel 1f11ae4
Merge branch 'main' into eessi_container_unionfs
boegel 00f3ea2
show contents of test script when testing load_easybuild_module.sh
boegel f9392e6
set $EESSI_VERSION_OVERRIDE before calling run_in_compat_layer_env.sh
boegel dd37dfd
also set $EESSI_VERSION_OVERRIDE for install_software_layer.sh script…
boegel 5f4b557
also set $EESSI_VERSION_OVERRIDE for create_directory_tarballs.sh scr…
boegel 0ec75f1
also set for create_lmodsitepackage.py tests
boegel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -29,6 +29,11 @@ permissions: | |
| jobs: | ||
| build: | ||
| runs-on: ubuntu-24.04 | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| EESSI_VERSION: | ||
| - '2023.06' | ||
| steps: | ||
| - name: checkout | ||
| uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
|
|
@@ -39,8 +44,8 @@ jobs: | |
|
|
||
| - name: test load_easybuild_module.sh script | ||
| run: | | ||
| # bind current directory into container as /software-layer | ||
| export SINGULARITY_BIND="${PWD}:/software-layer" | ||
| # bind current directory into container as /software-layer-scripts | ||
| export SINGULARITY_BIND="${PWD}:/software-layer-scripts" | ||
|
|
||
| # can't test with EasyBuild versions older than v4.5.2 when using EESSI 2023.06, | ||
| # since Python in compat layer is Python 3.11.x; | ||
|
|
@@ -58,64 +63,79 @@ jobs: | |
| echo 'export TMPDIR=$(mktemp -d)' >> ${test_script} | ||
| # set up environment to have utility functions in place that load_easybuild_module.sh script relies on, | ||
| # along with $EESSI_* environment variables, and Lmod | ||
| echo 'ls -l /software-layer/' >> ${test_script} | ||
| echo 'source /software-layer/scripts/utils.sh' >> ${test_script} | ||
| echo 'source /software-layer/init/eessi_environment_variables' >> ${test_script} | ||
| echo 'ls -l /software-layer-scripts/' >> ${test_script} | ||
| echo 'export EESSI_VERSION_OVERRIDE="${{matrix.EESSI_VERSION}}"' >> ${test_script} | ||
| echo 'source /software-layer-scripts/scripts/utils.sh' >> ${test_script} | ||
| echo 'source /software-layer-scripts/init/eessi_environment_variables' >> ${test_script} | ||
| echo 'source ${EPREFIX}/usr/share/Lmod/init/bash' >> ${test_script} | ||
| # minimal configuration for EasyBuild so we can test installation aspect of load_easybuild_module.sh script | ||
| echo "export EASYBUILD_INSTALLPATH=/tmp/eb-${EB_VERSION}" >> ${test_script} | ||
| echo 'module use ${EASYBUILD_INSTALLPATH}/modules/all' >> ${test_script} | ||
| echo '' >> ${test_script} | ||
| echo "source /software-layer/load_easybuild_module.sh ${EB_VERSION}" >> ${test_script} | ||
| echo "source /software-layer-scripts/load_easybuild_module.sh ${EB_VERSION}" >> ${test_script} | ||
| echo 'module list' >> ${test_script} | ||
| echo 'eb --version' >> ${test_script} | ||
|
|
||
| chmod u+x ${test_script} | ||
|
|
||
| # make sure that correct EESSI version is used (required because default is a placeholder version) | ||
| export EESSI_VERSION_OVERRIDE="${{matrix.EESSI_VERSION}}" | ||
|
|
||
| # run wrapper script + capture & check output | ||
| out="${PWD}/eb-${EB_VERSION}.out" | ||
| ./eessi_container.sh --access rw --mode run --verbose /software-layer/run_in_compat_layer_env.sh /software-layer/eb-${EB_VERSION}.sh 2>&1 | tee ${out} | ||
| ./eessi_container.sh --access rw --mode run --verbose /software-layer-scripts/run_in_compat_layer_env.sh /software-layer-scripts/eb-${EB_VERSION}.sh 2>&1 | tee ${out} | ||
| pattern="^This is EasyBuild ${EB_VERSION} " | ||
| grep "${pattern}" ${out} || (echo "Pattern '${pattern}' not found in output!" && exit 1) | ||
| done | ||
|
|
||
| - name: test install_software_layer.sh script | ||
| run: | | ||
| # bind current directory into container as /software-layer | ||
| export SINGULARITY_BIND="${PWD}:/software-layer" | ||
| # bind current directory into container as /software-layer-scripts | ||
| export SINGULARITY_BIND="${PWD}:/software-layer-scripts" | ||
| # force using x86_64/generic, to avoid triggering an installation from scratch | ||
| sed -i "s@./EESSI-install-software.sh@\"export EESSI_SOFTWARE_SUBDIR_OVERRIDE='x86_64/generic'; ./EESSI-install-software.sh\"@g" install_software_layer.sh | ||
| # skip installation of CUDA SDKs, since this is too heavy for CI | ||
| sed -i "s@./EESSI-install-software.sh@./EESSI-install-software.sh --skip-cuda-install@g" install_software_layer.sh | ||
| ./eessi_container.sh --mode run --verbose /software-layer/install_software_layer.sh | ||
|
|
||
| # make sure that correct EESSI version is used (required because default is a placeholder version) | ||
| export EESSI_VERSION_OVERRIDE="${{matrix.EESSI_VERSION}}" | ||
|
|
||
| ./eessi_container.sh --mode run --verbose /software-layer-scripts/install_software_layer.sh | ||
|
|
||
| - name: test create_directory_tarballs.sh script | ||
| run: | | ||
| # bind current directory into container as /software-layer | ||
| export SINGULARITY_BIND="${PWD}:/software-layer" | ||
| # bind current directory into container as /software-layer-scripts | ||
| export SINGULARITY_BIND="${PWD}:/software-layer-scripts" | ||
|
|
||
| # make sure that correct EESSI version is used (required because default is a placeholder version) | ||
| export EESSI_VERSION_OVERRIDE="${{matrix.EESSI_VERSION}}" | ||
|
|
||
| # scripts need to be copied to /tmp, | ||
| # since create_directory_tarballs.sh must be accessible from within build container | ||
| ./eessi_container.sh --mode run --verbose /software-layer/create_directory_tarballs.sh 2023.06 | ||
| ./eessi_container.sh --mode run --verbose /software-layer-scripts/create_directory_tarballs.sh 2023.06 | ||
| # check if tarballs have been produced | ||
| ls -l *.tar.gz | ||
|
|
||
| - name: test create_lmodsitepackage.py script | ||
| run: | | ||
| # bind current directory into container as /software-layer | ||
| export SINGULARITY_BIND="${PWD}:/software-layer" | ||
| # bind current directory into container as /software-layer-scripts | ||
| export SINGULARITY_BIND="${PWD}:/software-layer-scripts" | ||
|
|
||
| # Creates .lmod/SitePackage.lua in current dir, which then gets bind-mounted into /software-layer | ||
| # Creates .lmod/SitePackage.lua in current dir, which then gets bind-mounted into /software-layer-scripts | ||
| python3 create_lmodsitepackage.py . | ||
| # run some commands to make sure that generated Lmod SitePackage file works | ||
| test_script="${PWD}/test_lmod_sitepackage.sh" | ||
| echo '#!/bin/bash' > ${test_script} | ||
| echo 'export LMOD_PACKAGE_PATH="/software-layer/.lmod"' > ${test_script} | ||
| echo 'export LMOD_PACKAGE_PATH="/software-layer-scripts/.lmod"' > ${test_script} | ||
| echo 'ml --config' >> ${test_script} | ||
|
|
||
| chmod u+x ${test_script} | ||
|
|
||
| # make sure that correct EESSI version is used (required because default is a placeholder version) | ||
| export EESSI_VERSION_OVERRIDE="${{matrix.EESSI_VERSION}}" | ||
|
|
||
| out="${PWD}/test_create_lmodsitepackage.out" | ||
| ./eessi_container.sh --mode run --verbose /software-layer/run_in_compat_layer_env.sh /software-layer/test_lmod_sitepackage.sh 2>&1 | tee ${out} | ||
| for pattern in "^Site Pkg location.*/software-layer/.lmod/SitePackage.lua" "LMOD_SITEPACKAGE_LOCATION.*/software-layer/.lmod/SitePackage.lua"; do | ||
| ./eessi_container.sh --mode run --verbose /software-layer-scripts/run_in_compat_layer_env.sh /software-layer-scripts/test_lmod_sitepackage.sh 2>&1 | tee ${out} | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| for pattern in "^Site Pkg location.*/software-layer-scripts/.lmod/SitePackage.lua" "LMOD_SITEPACKAGE_LOCATION.*/software-layer-scripts/.lmod/SitePackage.lua"; do | ||
| grep "${pattern}" ${out} || (echo "Pattern '${pattern}' not found in output!" && exit 1) | ||
| done | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.