Skip to content

Commit

Permalink
Merge pull request #230 from sigven/apptainer
Browse files Browse the repository at this point in the history
Singularity/Apptainer support
  • Loading branch information
pdiakumis authored Jun 1, 2024
2 parents c84d701 + 9172e02 commit 2e341eb
Show file tree
Hide file tree
Showing 6 changed files with 163 additions and 14 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/apptainer.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: apptainer

on:
push:
branches:
- apptainer

env:
VERSION: '1.4.1.9006' # versioned by bump2version
jobs:
docker2apptainer:
name: Docker2apptainer
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- name: Free Disk Space
uses: jlumbroso/free-disk-space@main
- name: Check free space
run: |
echo "Free space:"
df -h
- name: Code checkout
uses: actions/checkout@v4
with:
ref: v${{ env.VERSION }}
- name: 🏰 QEMU setup
uses: docker/setup-qemu-action@v3
- name: 🏯 Buildx setup
uses: docker/setup-buildx-action@v3
- name: DockerHub login
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: 🐳 Docker img build and push to DockerHub
uses: docker/build-push-action@v5
with:
context: . # yes, dot
push: false
load: true
platforms: linux/amd64
tags: |
sigven/pcgr:${{ env.VERSION }}
- name: Apptainer setup
uses: eWaterCycle/setup-apptainer@v2

- name: Apptainer build
run: |
docker image ls -a
docker save sigven/pcgr:${VERSION} -o pcgr_${VERSION}.tar
ls -la
df -h
echo "Building Apptainer SIF"
echo "---------------------------------"
apptainer build pcgr_${VERSION}.sif docker-archive://pcgr_${VERSION}.tar
echo "---------------------------------"
ls -la
df -h
- name: Upload SIF to GHCR
run: |
echo ${{ secrets.GITHUB_TOKEN }} | apptainer registry login -u ${{ github.actor }} --password-stdin oras://ghcr.io
apptainer push pcgr_${VERSION}.sif oras://ghcr.io/${GITHUB_REPOSITORY}:${VERSION}
22 changes: 21 additions & 1 deletion .github/workflows/build_conda_recipes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ on:
branches:
- master
- bundle_update_2023
- conda_deps2
env:
atoken: ${{ secrets.ANACONDA_UPLOAD_TOKEN }}
recipe_path: conda/recipe
Expand Down Expand Up @@ -126,6 +125,8 @@ jobs:
sha: the_sha
})
- name: 🗑 Free Disk Space
uses: jlumbroso/free-disk-space@main
# work with tag from above
- name: Code checkout
uses: actions/checkout@v4
Expand All @@ -145,6 +146,25 @@ jobs:
with:
context: . # yes, dot
push: true
load: true
platforms: linux/amd64
tags: |
sigven/pcgr:${{ env.VERSION }}
- name: Apptainer setup
uses: eWaterCycle/setup-apptainer@v2
- name: Apptainer build
run: |
docker image ls -a
docker save sigven/pcgr:${VERSION} -o pcgr_${VERSION}.tar
ls -la
df -h
echo "Building Apptainer SIF"
echo "---------------------------------"
apptainer build pcgr_singularity_${VERSION}.sif docker-archive://pcgr_${VERSION}.tar
echo "---------------------------------"
ls -lSha
- name: Upload SIF to GHCR
run: |
echo ${{ secrets.GITHUB_TOKEN }} | apptainer registry login -u ${{ github.actor }} --password-stdin oras://ghcr.io
apptainer push pcgr_singularity_${VERSION}.sif oras://ghcr.io/${GITHUB_REPOSITORY}:${VERSION}.singularity
4 changes: 2 additions & 2 deletions conda/env/lock/pcgr-linux-64.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Generated by conda-lock.
# platform: linux-64
# input_hash: 2fc57f3059a65e016d5183c7a06990073473f57a28771159fd3dc4fec760f4bb
# input_hash: cc7617b5b96d0b5261d72ff49d17efc2b46a15ff66252c1f5d98cf83f6ffe312
@EXPLICIT
https://conda.anaconda.org/conda-forge/linux-64/_libgcc_mutex-0.1-conda_forge.tar.bz2#d7c89558ba9fa0495403155b64376d81
https://conda.anaconda.org/bioconda/linux-64/blast-legacy-2.2.26-h9ee0642_3.tar.bz2#b7fe67ef984501e8089a142f1f58ab2f
Expand Down Expand Up @@ -210,7 +210,7 @@ https://conda.anaconda.org/bioconda/noarch/perl-uri-5.12-pl5321hdfd78af_0.tar.bz
https://conda.anaconda.org/bioconda/linux-64/pybedtools-0.10.0-py310h2b6aa90_0.tar.bz2#481c3e4dd6d5be48502e66a0176e2d91
https://conda.anaconda.org/conda-forge/linux-64/scipy-1.13.1-py310h93e2701_0.conda#9a697144b2f3adc88ada6b6201b379c4
https://conda.anaconda.org/bioconda/noarch/vcf2maf-umccr-1.6.21.20230511-hdfd78af_0.tar.bz2#ec3a03df0bce17c35b2a2d1436c718ea
https://conda.anaconda.org/pcgr/noarch/pcgr-1.4.1.9005-py_0.tar.bz2#db8f88672bedce71b5e32f40c9d57f1c
https://conda.anaconda.org/pcgr/noarch/pcgr-1.4.1.9006-py_0.tar.bz2#52f8f28b1dafce0777999531ee2e8690
https://conda.anaconda.org/bioconda/noarch/perl-http-message-6.36-pl5321hdfd78af_0.tar.bz2#a213d1308ffa8e0789996ae6ecda98ae
https://conda.anaconda.org/bioconda/noarch/perl-net-http-6.22-pl5321hdfd78af_0.tar.bz2#f3b44f2b9932c3def346e6ad9aabe43d
https://conda.anaconda.org/bioconda/noarch/perl-www-robotrules-6.02-pl5321hdfd78af_4.tar.bz2#8305f4ed6306b1125a8c8caf2f05aec8
Expand Down
6 changes: 3 additions & 3 deletions conda/env/lock/pcgr-osx-64.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Generated by conda-lock.
# platform: osx-64
# input_hash: ba7d71e8432648d37a966635a6b70d1646853a4cd233f7e994e0e0788009bbaf
# input_hash: ef244aa8bdb427e6aaa29ca1f7bf3c259a947755d3367d6c98ca5f0f16555e16
@EXPLICIT
https://conda.anaconda.org/conda-forge/osx-64/argtable2-2.13-h10d778d_1004.conda#7ebcbc431363dfbf9ae25e6a7205d414
https://conda.anaconda.org/conda-forge/osx-64/bzip2-1.0.8-h10d778d_5.conda#6097a6ca9ada32699b5fc4312dd6ef18
Expand Down Expand Up @@ -31,7 +31,7 @@ https://conda.anaconda.org/conda-forge/osx-64/libedit-3.1.20191231-h0678c8f_2.ta
https://conda.anaconda.org/conda-forge/osx-64/libintl-0.22.5-h5ff76d1_2.conda#3fb6774cb8cdbb93a6013b67bcf9716d
https://conda.anaconda.org/conda-forge/osx-64/libzlib-1.2.13-h87427d6_6.conda#c0ef3c38a80c02ae1d86588c055184fc
https://conda.anaconda.org/conda-forge/osx-64/llvm-openmp-18.1.6-h15ab845_0.conda#065f974bc7afcef3f94df56394e16154
https://conda.anaconda.org/conda-forge/osx-64/macports-legacy-support-1.2.3-hec52a4b_0.conda#2f074d7bef679253b1a8c873e2e102f0
https://conda.anaconda.org/conda-forge/osx-64/macports-legacy-support-1.2.4-hfdf4475_0.conda#bc8a8cb353ee9b626f9d2c4937be7740
https://conda.anaconda.org/conda-forge/osx-64/openssl-1.1.1w-h8a1eda9_0.conda#83cdb687c0caa41dad9d4941afcdfd64
https://conda.anaconda.org/bioconda/noarch/perl-algorithm-diff-1.1903-pl5321hdfd78af_3.tar.bz2#e66fb178d12c7e26622d863809a14fcc
https://conda.anaconda.org/bioconda/noarch/perl-base-2.23-pl5321hdfd78af_2.tar.bz2#56bcf32d7efd3cb8f9bb6c3e4c592f48
Expand Down Expand Up @@ -212,7 +212,7 @@ https://conda.anaconda.org/bioconda/noarch/perl-libwww-perl-6.67-pl5321hdfd78af_
https://conda.anaconda.org/bioconda/osx-64/pybedtools-0.10.0-py310hae78ebd_0.tar.bz2#80219aa86d83ea9e664f898fd407ad37
https://conda.anaconda.org/conda-forge/osx-64/scipy-1.13.1-py310h35d8cac_0.conda#97b362043d6a1dd28e7da5fbf277594d
https://conda.anaconda.org/conda-forge/osx-64/compiler-rt-12.0.1-he01351e_0.tar.bz2#aa2cb3794dae4a09f19c3b7169b5df1f
https://conda.anaconda.org/pcgr/noarch/pcgr-1.4.1.9005-py_0.tar.bz2#db8f88672bedce71b5e32f40c9d57f1c
https://conda.anaconda.org/pcgr/noarch/pcgr-1.4.1.9006-py_0.tar.bz2#52f8f28b1dafce0777999531ee2e8690
https://conda.anaconda.org/bioconda/noarch/perl-xml-dom-1.46-pl5321hdfd78af_1.tar.bz2#45b7ce435727456727f45b3e2121b23b
https://conda.anaconda.org/bioconda/osx-64/t-coffee-12.00.7fb08c2-h26a2512_0.tar.bz2#fe6f3532da0e9d3868b58ecd07f33744
https://conda.anaconda.org/bioconda/noarch/vcf2tsvpy-0.6.1-pyhda70652_0.tar.bz2#cb9612a58cefb7e2a144c759027c0a94
Expand Down
Loading

0 comments on commit 2e341eb

Please sign in to comment.