From d9afb54168033581ab698bb83ccc13fda9b8777d Mon Sep 17 00:00:00 2001 From: Alan O'Cais Date: Fri, 1 Dec 2023 12:41:13 +0100 Subject: [PATCH 01/11] Update action for software.eessi.io --- .envrc | 2 +- .../{gromacs-usage.yml => tensorflow-usage.yml} | 12 ++++++------ README.md | 16 ++++++++-------- action.yml | 8 ++------ 4 files changed, 17 insertions(+), 21 deletions(-) rename .github/workflows/{gromacs-usage.yml => tensorflow-usage.yml} (66%) diff --git a/.envrc b/.envrc index 2ef49cf..76a2104 100644 --- a/.envrc +++ b/.envrc @@ -1,3 +1,3 @@ module purge export FOO=foo -module load GROMACS +module load TensorFlow diff --git a/.github/workflows/gromacs-usage.yml b/.github/workflows/tensorflow-usage.yml similarity index 66% rename from .github/workflows/gromacs-usage.yml rename to .github/workflows/tensorflow-usage.yml index 4e55a5d..5d94ceb 100644 --- a/.github/workflows/gromacs-usage.yml +++ b/.github/workflows/tensorflow-usage.yml @@ -1,4 +1,4 @@ -name: ubuntu_gromacs +name: ubuntu_tensorflow on: push: branches: @@ -15,15 +15,15 @@ jobs: - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0 - uses: eessi/github-action-eessi@main with: - eessi_stack_version: '2021.06' + eessi_stack_version: '2023.06' - name: Test EESSI run: | - # GROMACS module is loaded via .envrc - gmx --version + # TensorFlow module is loaded via .envrc + python -m tensorflow -c "print(tensorflow.VERSION)" shell: bash - - name: Test caching effect EESSI + - name: Test caching effect of EESSI run: | - gmx --version + python -m tensorflow -c "print(tensorflow.VERSION)" shell: bash - name: Test module load run: | diff --git a/README.md b/README.md index efd26a8..899c566 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ module load CMake/3.20.1-GCCcore-10.3.0 # Load a dependency of my project (CMak Another example of a `.envrc` file can be found in the [.envrc](https://github.com/EESSI/github-action-eessi/blob/main/.envrc) included with this repository. ## Instructions -You can use this GitHub Action in a workflow in your own repository with `uses: eessi/github-action-eessi@v2`. +You can use this GitHub Action in a workflow in your own repository with `uses: eessi/github-action-eessi@v3`. A minimal job example for GitHub-hosted runners of type `ubuntu-latest`: ```yaml @@ -21,7 +21,7 @@ jobs: ubuntu-minimal: runs-on: ubuntu-latest steps: - - uses: eessi/github-action-eessi@v2 + - uses: eessi/github-action-eessi@v3 - name: Test EESSI run: | module avail @@ -44,7 +44,7 @@ jobs: ## Optional Parameters The following parameters are supported: -- `eessi_stack_version`: version of the EESSI stack to use (defaults to `latest`) +- `eessi_stack_version`: version of the EESSI stack to use (defaults to `2023.06`) - `eessi_config_package`: location of the EESSI CernVM-FS configuration package (defaults to `https://github.com/EESSI/filesystem-layer/releases/download/latest/cvmfs-config-eessi_latest_all.deb`). @@ -58,7 +58,7 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: eessi/github-action-eessi@v2 + - uses: eessi/github-action-eessi@v3 - name: Test EESSI run: | module avail @@ -70,7 +70,7 @@ jobs: This GitHub Action installs the [EESSI](https://eessi.github.io/docs/) software stack, making it available to subsequent `bash` commands. This means one can create workflows such as: ```yaml -name: GROMACS usage +name: TensorFlow usage on: [push, pull_request] jobs: build: @@ -79,11 +79,11 @@ jobs: - uses: eessi/github-action-eessi@v2 - name: Test EESSI run: | - module load GROMACS - gmx --version + module load TensorFlow + python -m tensorflow -c "print(tensorflow.VERSION)" shell: bash ``` -where the `gmx` command was only available to run after the loading the necessary environment module `GROMACS`. Note that I have not given the version of `GROMACS` which means the latest available version will be loaded. +where the `tensorflow` python module was only available to run after the loading the necessary environment module `TensorFlow`. Note that I have not given the version of `TensorFlow` which means the latest available version will be loaded. ## Limitations diff --git a/action.yml b/action.yml index 633eba1..62ec8cb 100644 --- a/action.yml +++ b/action.yml @@ -7,7 +7,7 @@ inputs: eessi_stack_version: description: 'Version of the EESSI stack to configure' required: false - default: 'latest' + default: '2023.06' eessi_config_package: description: 'URL to the EESSI cvmfs config package to install' required: false @@ -39,11 +39,7 @@ runs: - id: install-eessi run: | echo "EESSI_SILENT=1" >> $GITHUB_ENV - if [ "${{ inputs.eessi_stack_version }}" == "latest" ]; then - echo "source /cvmfs/pilot.eessi-hpc.org/$EESSI_STACK_VERSION/init/bash" >> $HOME/env_config.export - else - echo "source /cvmfs/pilot.eessi-hpc.org/versions/$EESSI_STACK_VERSION/init/bash" >> $HOME/env_config.export - fi + echo "source /cvmfs/sotware.eessi.io/versions/$EESSI_STACK_VERSION/init/bash" >> $HOME/env_config.export sudo apt install -y direnv echo 'unset BASH_ENV' >> $HOME/env_config.export echo 'eval "$(direnv export bash)"' >> $HOME/env_config.export From 00810a9acad9193e45ffdceb32855e474a025a11 Mon Sep 17 00:00:00 2001 From: Alan O'Cais Date: Fri, 1 Dec 2023 12:45:55 +0100 Subject: [PATCH 02/11] Typo --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 62ec8cb..c93cd4e 100644 --- a/action.yml +++ b/action.yml @@ -39,7 +39,7 @@ runs: - id: install-eessi run: | echo "EESSI_SILENT=1" >> $GITHUB_ENV - echo "source /cvmfs/sotware.eessi.io/versions/$EESSI_STACK_VERSION/init/bash" >> $HOME/env_config.export + echo "source /cvmfs/software.eessi.io/versions/$EESSI_STACK_VERSION/init/bash" >> $HOME/env_config.export sudo apt install -y direnv echo 'unset BASH_ENV' >> $HOME/env_config.export echo 'eval "$(direnv export bash)"' >> $HOME/env_config.export From adb4c75464de7de8533276d23aa646122e553b7b Mon Sep 17 00:00:00 2001 From: Alan O'Cais Date: Fri, 1 Dec 2023 12:59:11 +0100 Subject: [PATCH 03/11] Tweak --- .github/workflows/minimal-usage.yml | 4 ++-- .github/workflows/tensorflow-usage.yml | 2 +- action.yml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/minimal-usage.yml b/.github/workflows/minimal-usage.yml index 065f03b..5546e04 100644 --- a/.github/workflows/minimal-usage.yml +++ b/.github/workflows/minimal-usage.yml @@ -1,4 +1,4 @@ -name: ubuntu +name: ubuntu-minimal_usage on: push: branches: @@ -9,7 +9,7 @@ on: # Declare default permissions as read only. permissions: read-all jobs: - build: + minimal_usage: runs-on: ubuntu-latest steps: - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0 diff --git a/.github/workflows/tensorflow-usage.yml b/.github/workflows/tensorflow-usage.yml index 5d94ceb..d40f4da 100644 --- a/.github/workflows/tensorflow-usage.yml +++ b/.github/workflows/tensorflow-usage.yml @@ -9,7 +9,7 @@ on: # Declare default permissions as read only. permissions: read-all jobs: - build: + tensorflow_usage: runs-on: ubuntu-latest steps: - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0 diff --git a/action.yml b/action.yml index c93cd4e..4d19b19 100644 --- a/action.yml +++ b/action.yml @@ -23,7 +23,7 @@ inputs: cvmfs_use_cdn: description: 'Change the stratum 1 endpoints to caching servers from Cloudflare.' required: false - default: 'yes' + default: 'no' runs: From 49c164d1fe5c6a0e1295176de26732c8ebb70a20 Mon Sep 17 00:00:00 2001 From: Alan O'Cais Date: Fri, 1 Dec 2023 13:05:22 +0100 Subject: [PATCH 04/11] Only do a minimal test on a PR --- .github/workflows/tensorflow-usage.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/tensorflow-usage.yml b/.github/workflows/tensorflow-usage.yml index d40f4da..416bace 100644 --- a/.github/workflows/tensorflow-usage.yml +++ b/.github/workflows/tensorflow-usage.yml @@ -3,9 +3,6 @@ on: push: branches: - main - pull_request: - branches: - - main # Declare default permissions as read only. permissions: read-all jobs: From b9e1fb4b578e50851d9e8db6e5ef0bb3835601ca Mon Sep 17 00:00:00 2001 From: Alan O'Cais Date: Fri, 1 Dec 2023 13:12:06 +0100 Subject: [PATCH 05/11] Try some other stuff --- action.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/action.yml b/action.yml index 4d19b19..336e447 100644 --- a/action.yml +++ b/action.yml @@ -8,10 +8,6 @@ inputs: description: 'Version of the EESSI stack to configure' required: false default: '2023.06' - eessi_config_package: - description: 'URL to the EESSI cvmfs config package to install' - required: false - default: 'https://github.com/EESSI/filesystem-layer/releases/download/latest/cvmfs-config-eessi_latest_all.deb' cvmfs_client_profile: description: 'Choose a suitable proxy automatically if set to single.' required: false @@ -19,7 +15,7 @@ inputs: cvmfs_quota_limit: description: 'Soft-limit of the cache in Megabyte. Consult https://docs.github.com/en/free-pro-team@latest/actions/reference/specifications-for-github-hosted-runners#supported-runners-and-hardware-resources before changing' required: false - default: '15000' + default: '10000' cvmfs_use_cdn: description: 'Change the stratum 1 endpoints to caching servers from Cloudflare.' required: false @@ -31,11 +27,11 @@ runs: steps: - uses: cvmfs-contrib/github-action-cvmfs@d4641d0d591c9a5c3be23835ced2fb648b44c04b # v3.1 with: - cvmfs_config_package: ${{ inputs.eessi_config_package }} cvmfs_http_proxy: DIRECT cvmfs_client_profile: ${{ inputs.cvmfs_client_profile }} cvmfs_quota_limit: ${{ inputs.cvmfs_quota_limit }} cvmfs_use_cdn: ${{ inputs.cvmfs_use_cdn }} + cvmfs_repositories: software.eessi.io - id: install-eessi run: | echo "EESSI_SILENT=1" >> $GITHUB_ENV From b00d95d8b134ccb0d0e59328b852921bd2ad2d0f Mon Sep 17 00:00:00 2001 From: Alan O'Cais Date: Fri, 1 Dec 2023 13:27:59 +0100 Subject: [PATCH 06/11] Try to simplify --- .github/workflows/minimal-usage.yml | 2 +- action.yml | 17 +---------------- 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/.github/workflows/minimal-usage.yml b/.github/workflows/minimal-usage.yml index 5546e04..fad0105 100644 --- a/.github/workflows/minimal-usage.yml +++ b/.github/workflows/minimal-usage.yml @@ -16,6 +16,6 @@ jobs: - uses: ./ - name: Test EESSI run: | - direnv status module avail + direnv status shell: bash diff --git a/action.yml b/action.yml index 336e447..fd635f2 100644 --- a/action.yml +++ b/action.yml @@ -8,29 +8,14 @@ inputs: description: 'Version of the EESSI stack to configure' required: false default: '2023.06' - cvmfs_client_profile: - description: 'Choose a suitable proxy automatically if set to single.' - required: false - default: 'single' - cvmfs_quota_limit: - description: 'Soft-limit of the cache in Megabyte. Consult https://docs.github.com/en/free-pro-team@latest/actions/reference/specifications-for-github-hosted-runners#supported-runners-and-hardware-resources before changing' - required: false - default: '10000' - cvmfs_use_cdn: - description: 'Change the stratum 1 endpoints to caching servers from Cloudflare.' - required: false - default: 'no' - runs: using: "composite" steps: - uses: cvmfs-contrib/github-action-cvmfs@d4641d0d591c9a5c3be23835ced2fb648b44c04b # v3.1 with: + cvmfs_config_package: https://github.com/EESSI/filesystem-layer/releases/download/latest/cvmfs-config-eessi_latest_all.deb cvmfs_http_proxy: DIRECT - cvmfs_client_profile: ${{ inputs.cvmfs_client_profile }} - cvmfs_quota_limit: ${{ inputs.cvmfs_quota_limit }} - cvmfs_use_cdn: ${{ inputs.cvmfs_use_cdn }} cvmfs_repositories: software.eessi.io - id: install-eessi run: | From 7304fb7ad359b19805d64c333cc6b6ad076c76a8 Mon Sep 17 00:00:00 2001 From: Alan O'Cais Date: Fri, 1 Dec 2023 13:31:33 +0100 Subject: [PATCH 07/11] Even more minimal --- .github/workflows/minimal-usage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/minimal-usage.yml b/.github/workflows/minimal-usage.yml index fad0105..cb57382 100644 --- a/.github/workflows/minimal-usage.yml +++ b/.github/workflows/minimal-usage.yml @@ -17,5 +17,5 @@ jobs: - name: Test EESSI run: | module avail - direnv status + # direnv status shell: bash From 10260a24fd1ccb202fd4a3ce7e8c4d71013effff Mon Sep 17 00:00:00 2001 From: Alan O'Cais Date: Fri, 1 Dec 2023 13:37:34 +0100 Subject: [PATCH 08/11] Unset BASH_ENV as early as possible --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index fd635f2..269c417 100644 --- a/action.yml +++ b/action.yml @@ -20,9 +20,9 @@ runs: - id: install-eessi run: | echo "EESSI_SILENT=1" >> $GITHUB_ENV + echo 'unset BASH_ENV' >> $HOME/env_config.export echo "source /cvmfs/software.eessi.io/versions/$EESSI_STACK_VERSION/init/bash" >> $HOME/env_config.export sudo apt install -y direnv - echo 'unset BASH_ENV' >> $HOME/env_config.export echo 'eval "$(direnv export bash)"' >> $HOME/env_config.export mkdir -p $HOME/direnv/ echo "[whitelist]" >> $HOME/direnv/direnv.toml From 6c8b9ff49ca3e7af3f36e220b013fe1298cf29fd Mon Sep 17 00:00:00 2001 From: Alan O'Cais Date: Fri, 1 Dec 2023 13:43:25 +0100 Subject: [PATCH 09/11] Restore direnv check --- .github/workflows/minimal-usage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/minimal-usage.yml b/.github/workflows/minimal-usage.yml index cb57382..5546e04 100644 --- a/.github/workflows/minimal-usage.yml +++ b/.github/workflows/minimal-usage.yml @@ -16,6 +16,6 @@ jobs: - uses: ./ - name: Test EESSI run: | + direnv status module avail - # direnv status shell: bash From 42bff0d2f13d5d39ab1bec99000c470cb517dc62 Mon Sep 17 00:00:00 2001 From: Alan O'Cais Date: Fri, 1 Dec 2023 13:56:09 +0100 Subject: [PATCH 10/11] Use v3 in README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 899c566..704e8b5 100644 --- a/README.md +++ b/README.md @@ -76,7 +76,7 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: eessi/github-action-eessi@v2 + - uses: eessi/github-action-eessi@v3 - name: Test EESSI run: | module load TensorFlow From 2ba1b7b32aa1e8bd38225660ab3cc31c3b4a41f7 Mon Sep 17 00:00:00 2001 From: Alan O'Cais Date: Fri, 1 Dec 2023 14:09:00 +0100 Subject: [PATCH 11/11] Use correct version command for TensorFlow --- .github/workflows/tensorflow-usage.yml | 4 ++-- README.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tensorflow-usage.yml b/.github/workflows/tensorflow-usage.yml index 416bace..02029f9 100644 --- a/.github/workflows/tensorflow-usage.yml +++ b/.github/workflows/tensorflow-usage.yml @@ -16,11 +16,11 @@ jobs: - name: Test EESSI run: | # TensorFlow module is loaded via .envrc - python -m tensorflow -c "print(tensorflow.VERSION)" + python -c "import tensorflow; print(tensorflow.__version__)" shell: bash - name: Test caching effect of EESSI run: | - python -m tensorflow -c "print(tensorflow.VERSION)" + python -c "import tensorflow; print(tensorflow.__version__)" shell: bash - name: Test module load run: | diff --git a/README.md b/README.md index 704e8b5..8016a90 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,7 @@ jobs: - name: Test EESSI run: | module load TensorFlow - python -m tensorflow -c "print(tensorflow.VERSION)" + python -c "import tensorflow; print(tensorflow.__version__)" shell: bash ``` where the `tensorflow` python module was only available to run after the loading the necessary environment module `TensorFlow`. Note that I have not given the version of `TensorFlow` which means the latest available version will be loaded.