From e814b55b84e0e4d8eeb0cf5243a8401284dc5a91 Mon Sep 17 00:00:00 2001 From: Will Holtz Date: Tue, 10 Oct 2023 16:01:54 -0700 Subject: [PATCH 1/2] ci: pull metatlas_ci from ghcr.io --- docker/local_jupyter.sh | 2 +- tests/system/test_add_msms_ref.py | 2 +- tests/system/test_c18.py | 2 +- tests/system/test_hybrid.py | 2 +- tests/system/test_rt_alignment.py | 2 +- tests/system/test_targeted.py | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docker/local_jupyter.sh b/docker/local_jupyter.sh index 91d63176..fad93a04 100755 --- a/docker/local_jupyter.sh +++ b/docker/local_jupyter.sh @@ -5,7 +5,7 @@ set -euf -o pipefail SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" REPO_DIR=$(dirname "$SCRIPT_DIR") OUT_DIR="${SCRIPT_DIR}/out" -IMAGE='registry.spin.nersc.gov/metatlas_test/metatlas_ci:1.1.0' +IMAGE='ghcr.io/biorack/metatlas/metatlas_ci:1.2.0' PORT=8888 while [[ "$#" -gt 0 ]]; do diff --git a/tests/system/test_add_msms_ref.py b/tests/system/test_add_msms_ref.py index 279aaddd..1cc6d587 100644 --- a/tests/system/test_add_msms_ref.py +++ b/tests/system/test_add_msms_ref.py @@ -4,7 +4,7 @@ def test_add_msms_ref_by_line01(tmp_path): - image = "docker.io/doejgi/metatlas_ci:1.2.0" + image = "ghcr.io/biorack/metatlas/metatlas_ci:1.2.0" expected = {} expected[ str(tmp_path / "updated_refs.tab") diff --git a/tests/system/test_c18.py b/tests/system/test_c18.py index 6a7adff9..4ca59154 100644 --- a/tests/system/test_c18.py +++ b/tests/system/test_c18.py @@ -4,7 +4,7 @@ def test_c18_by_line01_with_remove(tmp_path): - image = "docker.io/doejgi/metatlas_ci:1.2.0" + image = "ghcr.io/biorack/metatlas/metatlas_ci:1.2.0" experiment = "20210915_JGI-AK_MK_506588_SoilWaterRep_final_QE-HF_C18_USDAY63680" expected = {} expected[ diff --git a/tests/system/test_hybrid.py b/tests/system/test_hybrid.py index bccc0981..b80568be 100644 --- a/tests/system/test_hybrid.py +++ b/tests/system/test_hybrid.py @@ -4,7 +4,7 @@ def test_hybrid_by_line01_with_remove(tmp_path): - image = "docker.io/doejgi/metatlas_ci:1.2.0" + image = "ghcr.io/biorack/metatlas/metatlas_ci:1.2.0" experiment = "20201106_JGI-AK_PS-KM_505892_OakGall_final_QE-HF_HILICZ_USHXG01583" expected = {} expected[ diff --git a/tests/system/test_rt_alignment.py b/tests/system/test_rt_alignment.py index cb1db43e..0672fa72 100644 --- a/tests/system/test_rt_alignment.py +++ b/tests/system/test_rt_alignment.py @@ -6,7 +6,7 @@ def test_rt_alignment_by_line01(tmp_path): - image = "docker.io/doejgi/metatlas_ci:1.2.0" + image = "ghcr.io/biorack/metatlas/metatlas_ci:1.2.0" experiment = "20201106_JGI-AK_PS-KM_505892_OakGall_final_QE-HF_HILICZ_USHXG01583" expected = {} expected[ diff --git a/tests/system/test_targeted.py b/tests/system/test_targeted.py index 22ffb7c1..b17ca26e 100644 --- a/tests/system/test_targeted.py +++ b/tests/system/test_targeted.py @@ -4,7 +4,7 @@ def test_targeted_by_line01_with_remove(tmp_path): - image = "docker.io/doejgi/metatlas_ci:1.2.0" + image = "ghcr.io/biorack/metatlas/metatlas_ci:1.2.0" experiment = "20201106_JGI-AK_PS-KM_505892_OakGall_final_QE-HF_HILICZ_USHXG01583" expected = {} expected[ From 7287fe6e2a47d3eadf2ef661866b49a2168dd47b Mon Sep 17 00:00:00 2001 From: Will Holtz Date: Tue, 10 Oct 2023 16:02:37 -0700 Subject: [PATCH 2/2] feat: migrate metatlas_shifter image to ghcr.io --- .github/workflows/cd.yaml | 15 +++++++-------- docker/rollback_shifter.sh | 2 +- docker/shifter.kernel.json | 2 +- papermill/submit_slurm_job.sh | 2 +- 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml index 25168b5d..08c686ab 100644 --- a/.github/workflows/cd.yaml +++ b/.github/workflows/cd.yaml @@ -13,11 +13,12 @@ jobs: steps: - name: Checkout source uses: actions/checkout@v4 - - name: Login to DockerHub + - name: Login to GHCR uses: docker/login-action@v3 with: - username: wjhjgi - password: ${{ secrets.DOCKERHUB_TOKEN }} + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} - name: generate version_info file run: python ./docker/most_recent_commits.py > docker/.version_info - name: generate time based tag @@ -32,13 +33,11 @@ jobs: context: ./docker file: ./docker/Dockerfile.shifter platforms: linux/amd64 - cache-from: type=registry,ref=wjhjgi/metatlas_shifter:latest + cache-from: type=registry,ref=ghcr.io/biorack/metatlas/metatlas_shifter:latest cache-to: type=inline tags: | - wjhjgi/metatlas_shifter:${{ steps.timestamp.outputs.date_time }} - wjhjgi/metatlas_shifter:latest - doejgi/metatlas_shifter:${{ steps.timestamp.outputs.date_time }} - doejgi/metatlas_shifter:latest + ghcr.io/biorack/metatlas/metatlas_shifter:${{ steps.timestamp.outputs.date_time }} + ghcr.io/biorack/metatlas/metatlas_shifter:latest push: true build_push_metatlas_analysis_image: name: Build/push analysis docker image diff --git a/docker/rollback_shifter.sh b/docker/rollback_shifter.sh index c4d000f2..9fac6803 100755 --- a/docker/rollback_shifter.sh +++ b/docker/rollback_shifter.sh @@ -9,7 +9,7 @@ set -euf -o pipefail SHORT="metatlas_shifter" -LONG="doejgi/$SHORT" +LONG="ghcr.io/biorack/metatlas/$SHORT" TAG="" while [[ "$#" -gt 0 ]]; do diff --git a/docker/shifter.kernel.json b/docker/shifter.kernel.json index d009c60e..2ba8535c 100644 --- a/docker/shifter.kernel.json +++ b/docker/shifter.kernel.json @@ -1,4 +1,4 @@ {"argv": ["shifter", "--module=none", "--clearenv", "--entrypoint", - "--image=doejgi/metatlas_shifter:latest", + "--image=ghcr.io/biorack/metatlas/metatlas_shifter:latest", "/usr/local/bin/python", "-m", "ipykernel_launcher", "-f", "{connection_file}"], "display_name": "Metatlas Targeted", "language": "python", "metadata": {"debugger": true}} diff --git a/papermill/submit_slurm_job.sh b/papermill/submit_slurm_job.sh index 66fabf94..f902fd2d 100755 --- a/papermill/submit_slurm_job.sh +++ b/papermill/submit_slurm_job.sh @@ -75,7 +75,7 @@ validate_extra_parameters() { } is_valid_yaml() { - echo "$1" | shifter --module=none --clearenv --image=doejgi/metatlas_shifter:latest \ + echo "$1" | shifter --module=none --clearenv --image=ghcr.io/biorack/metatlas/metatlas_shifter:latest \ /src/metatlas/scripts/yaml_validation.py }