Skip to content

Commit

Permalink
Merge pull request #2 from maouw:maouw/issue1
Browse files Browse the repository at this point in the history
Return to Apptainer
  • Loading branch information
maouw authored Oct 16, 2023
2 parents de8c1c9 + 210b90a commit 298f7fc
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 76 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/apptainer-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Singularity Build
on:
push:
# Edit the branches here if you want to change deploy behavior
branches:
- main
- master
tags:
- release-*

jobs:
build-and-push-image:
runs-on: ubuntu-latest
name: Build Apptainer image
permissions:
contents: read
packages: write
steps:
- name: Install Apptainer
run: deb=$(curl -w "%{filename_effective}" -LO https://github.com/apptainer/apptainer/releases/download/v1.2.4/apptainer_1.2.4_amd64.deb) && sudo apt install -y "./$deb"; rm -f "$deb"; unset deb
- name: Check out code for the container build
uses: actions/checkout@v4
- name: Build Container
run: |
apptainer build container.sif Singularity
tag=$(echo "${recipe/Singularity\./}")
[ "$tag" == "Singularity" ] && tag=latest
# Build the container and name by tag
echo "Tag is $tag."
echo "tag=$tag" >> $GITHUB_ENV
- name: Login and Deploy Container
run: |
apptainer remote login -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }} oras://ghcr.io
apptainer push container.sif oras://ghcr.io/${{ github.repository }}:${tag}
51 changes: 0 additions & 51 deletions .github/workflows/docker-publish.yml

This file was deleted.

25 changes: 0 additions & 25 deletions Dockerfile

This file was deleted.

14 changes: 14 additions & 0 deletions Singularity
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Bootstrap: docker
From: mambaorg/micromamba:{{ MICROMAMBA_TAG }}

%arguments
MICROMAMBA_TAG=jammy-cuda-12.1.1
SLEAP_PYTHON_VERSION=3.7.12
SLEAP_VERSION=1.3.3

%environment
export MAMBA_DOCKERFILE_ACTIVATE=1

%post
micromamba install -y -n base python={{ SLEAP_PYTHON_VERSION }} -c conda-forge -c nvidia -c sleap -c anaconda sleap={{ SLEAP_VERSION }}

0 comments on commit 298f7fc

Please sign in to comment.