-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Consolidation + removing dev GenPipes as GenPipes 5 is a package
- Loading branch information
1 parent
eeceecc
commit 8d00c7c
Showing
14 changed files
with
236 additions
and
151 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
@@ -1 +1 @@ | ||
singularity/ | ||
container/ |
This file contains 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 |
---|---|---|
@@ -0,0 +1,72 @@ | ||
# | ||
name: Create and publish a Docker image | ||
|
||
# Configures this workflow to run every time a change is pushed to the branch called 'main' or a PR is opened on 'main. | ||
on: | ||
push: | ||
branches: ['main'] | ||
pull_request: | ||
branches: ['main'] | ||
|
||
# Defines two custom environment variables for the workflow. These are used for the Container registry domain, and a name for the Docker image that this workflow builds. | ||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: ${{ github.repository }} | ||
|
||
# There is a single job in this workflow. It's configured to run on the latest available version of Ubuntu. | ||
jobs: | ||
build-and-push-image: | ||
runs-on: ubuntu-latest | ||
|
||
# Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job. | ||
permissions: | ||
contents: read | ||
packages: write | ||
attestations: write | ||
id-token: write | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
# Uses the `docker/login-action` action to log in to the Container registry using the account and password that will publish the packages. | ||
# Once published, the packages are scoped to the account defined here. | ||
- name: Log in to the Container registry | ||
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# This step uses [docker/metadata-action](https://github.com/docker/metadata-action#about) to extract tags and labels that will be applied to the specified image. | ||
# The `id` "meta" allows the output of this step to be referenced in a subsequent step. The `images` value provides the base name for the tags and labels. | ||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
|
||
# This step uses the `docker/build-push-action` action to build the image, based on your repository's `Dockerfile`. | ||
# If the build succeeds, it pushes the image to GitHub Packages. | ||
# It uses the `context` parameter to define the build's context as the set of files located in the specified path. | ||
# For more information, see "[Usage](https://github.com/docker/build-push-action#usage)" in the README of the `docker/build-push-action` repository. | ||
# It uses the `tags` and `labels` parameters to tag and label the image with the output from the "meta" step. | ||
- name: Build and push Docker image | ||
id: push | ||
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4 | ||
with: | ||
platforms: linux/amd64,linux/arm64 | ||
context: . | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
|
||
# This step generates an artifact attestation for the image, which is an unforgeable statement about where and how it was built. | ||
# It increases supply chain security for people who consume the image. | ||
# For more information, see "[AUTOTITLE](/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds)." | ||
- name: Generate artifact attestation | ||
uses: actions/attest-build-provenance@v1 | ||
with: | ||
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}} | ||
subject-digest: ${{ steps.push.outputs.digest }} | ||
push-to-registry: true |
This file contains 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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
cvmfschecksum.* | ||
*_mount_cache.sh | ||
singularity/wrapper_genpipes/images | ||
singularity/wrapper_genpipes.tgz | ||
container/wrapper_genpipes/images | ||
container/wrapper_genpipes.tgz | ||
.DS_Store |
This file contains 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 |
---|---|---|
@@ -1,20 +1,26 @@ | ||
FROM centos:7.9.2009 | ||
MAINTAINER P-O Quirion [email protected] | ||
FROM ubuntu:24.04 | ||
LABEL authors="P-O Quirion [email protected], Paul Stretenowich [email protected]" | ||
|
||
WORKDIR /tmp | ||
|
||
# All yum cmd | ||
|
||
ENV CVMFS_VERSION latest | ||
ENV CC_STACK latest | ||
ENV MODULE_VERSION 4.1.2 | ||
RUN yum install -y https://ecsft.cern.ch/dist/cvmfs/cvmfs-release/cvmfs-release-${CVMFS_VERSION}.noarch.rpm \ | ||
https://package.computecanada.ca/yum/cc-cvmfs-public/prod/RPM/computecanada-release-${CC_STACK}.noarch.rpm | ||
RUN yum update -y \ | ||
&& yum install -y ImageMagick pigz which wget zip unzip.x86_64 make.x86_64 gcc expectk file \ | ||
dejagnu less tcl-devel.x86_64 cvmfs-config-computecanada \ | ||
cvmfs-fuse3 cvmfs-config-default \ | ||
&& yum clean all | ||
ENV CVMFS_VERSION=latest | ||
ENV CC_STACK=latest | ||
ENV MODULE_VERSION=4.1.2 | ||
|
||
# All apt-get cmd | ||
RUN apt-get update -y && \ | ||
apt-get install -y wget lsb-release | ||
RUN wget https://ecsft.cern.ch/dist/cvmfs/cvmfs-release/cvmfs-release-${CVMFS_VERSION}_all.deb && \ | ||
dpkg -i cvmfs-release-${CVMFS_VERSION}_all.deb && \ | ||
rm -f cvmfs-release-${CVMFS_VERSION}_all.deb && \ | ||
apt-get update -y && \ | ||
apt-get install -y cvmfs | ||
RUN wget https://package.computecanada.ca/yum/cc-cvmfs-public/prod/other/cvmfs-config-computecanada-${CC_STACK}.all.deb && \ | ||
apt-get install -y ./cvmfs-config-computecanada-${CC_STACK}.all.deb && \ | ||
rm -f cvmfs-config-computecanada-${CC_STACK}.all.deb | ||
RUN apt-get install -y libpng-dev libjpeg-dev libtiff-dev && \ | ||
apt-get install -y imagemagick pigz which zip unzip make gcc expect file dejagnu less tcl-dev cvmfs-config-computecanada cvmfs-fuse3 cvmfs-config-default && \ | ||
apt-get clean all | ||
|
||
RUN mkdir /cvmfs-cache && chmod 777 /cvmfs-cache /cvmfs | ||
RUN mkdir /cvmfs/ref.mugqic /cvmfs/soft.mugqic /cvmfs/cvmfs-config.computecanada.ca | ||
|
@@ -25,6 +31,7 @@ RUN tar xzf modules-${MODULE_VERSION}.tar.gz && \ | |
rm modules-${MODULE_VERSION}.tar.gz \ | ||
&& cd modules-${MODULE_VERSION} && ./configure && make -j 7 && make install \ | ||
&& cd .. && rm -rf modules-${MODULE_VERSION} && rm -rf /usr/local/Modules/modulefiles/* | ||
|
||
# CVMFS | ||
ADD default.local /etc/cvmfs/default.local | ||
ADD soft.mugqic.local /etc/cvmfs/config.d/soft.mugqic.local | ||
|
@@ -35,7 +42,7 @@ RUN echo "source /etc/profile.d/z00_module.sh" >> /etc/bashrc | |
ADD devmodule/genpipes "/usr/local/Modules/modulefiles/." | ||
|
||
|
||
ADD genpipesrc /usr/local/etc/genpiperc | ||
ADD genpipesrc /usr/local/etc/genpiperc | ||
RUN ["ln", "-s", "/usr/local/etc/genpiperc", "/etc/profile.d/z90_genpipes.sh"] | ||
|
||
ADD init_genpipes /usr/local/bin/init_genpipes | ||
|
This file contains 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
File renamed without changes.
This file contains 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 |
---|---|---|
@@ -0,0 +1,70 @@ | ||
#!/bin/bash | ||
|
||
# Do not modify this file modify ${SCRIPTPATH}/etc/wrapper.conf instead! | ||
SCRIPTPATH="$(cd "$(dirname "$0")" ; pwd -P)" | ||
SCRIPTPATH=${SCRIPTPATH%%bin} | ||
SCRIPTPATH=${SCRIPTPATH%%/} | ||
GEN_SHARED_CVMFS=/tmp/cvmfs-cache | ||
GEN_CONTAINERTYPE=singularity | ||
|
||
source "${SCRIPTPATH}"/etc/wrapper.conf | ||
|
||
mkdir -p ${GEN_SHARED_CVMFS} | ||
|
||
touch "$HOME/.genpipes_env" # needs to exist for the run cmd not to crash | ||
|
||
# If GEN_CONTAINERTYPE equals singularity | ||
if [ "$GEN_CONTAINERTYPE" = "singularity" ]; then | ||
if [ -z ${BIND_LIST+x} ]; then | ||
singularity run \ | ||
--env-file $HOME/.genpipes_env \ | ||
--cleanenv \ | ||
-S /var/run/cvmfs \ | ||
-B ${GEN_SHARED_CVMFS}:/cvmfs-cache \ | ||
--fusemount "container:cvmfs2 cvmfs-config.computecanada.ca /cvmfs/cvmfs-config.computecanada.ca" \ | ||
--fusemount "container:cvmfs2 soft.mugqic /cvmfs/soft.mugqic" \ | ||
--fusemount "container:cvmfs2 ref.mugqic /cvmfs/ref.mugqic" \ | ||
${SCRIPTPATH}/images/genpipes.sif "$@" | ||
else | ||
singularity run \ | ||
--env-file $HOME/.genpipes_env \ | ||
--cleanenv \ | ||
-S /var/run/cvmfs \ | ||
-B ${GEN_SHARED_CVMFS}:/cvmfs-cache \ | ||
-B "$BIND_LIST" \ | ||
--fusemount "container:cvmfs2 cvmfs-config.computecanada.ca /cvmfs/cvmfs-config.computecanada.ca" \ | ||
--fusemount "container:cvmfs2 soft.mugqic /cvmfs/soft.mugqic" \ | ||
--fusemount "container:cvmfs2 ref.mugqic /cvmfs/ref.mugqic" \ | ||
${SCRIPTPATH}/images/genpipes.sif "$@" | ||
fi | ||
elif [ "$GEN_CONTAINERTYPE" = "docker" ]; then | ||
if [ -z ${BIND_LIST+x} ]; then | ||
docker run \ | ||
-it \ | ||
--env-file $HOME/.genpipes_env \ | ||
--rm \ | ||
--device /dev/fuse \ | ||
--cap-add SYS_ADMIN \ | ||
--tmpfs /var/run/cvmfs:rw \ | ||
-w $PWD \ | ||
-v $PWD:$PWD \ | ||
--mount type=bind,source=${BIND_LIST},target=${BIND_LIST} \ | ||
--mount type=bind,source=${GEN_SHARED_CVMFS},target=/cvmfs-cache \ | ||
c3genomics/genpipes:latest "$@" | ||
else | ||
docker run \ | ||
-it \ | ||
--env-file $HOME/.genpipes_env \ | ||
--rm \ | ||
--device /dev/fuse \ | ||
--cap-add SYS_ADMIN \ | ||
--tmpfs /var/run/cvmfs:rw \ | ||
-w $PWD \ | ||
-v $PWD:$PWD \ | ||
--mount type=bind,source=${GEN_SHARED_CVMFS},target=/cvmfs-cache \ | ||
c3genomics/genpipes:latest "$@" | ||
fi | ||
else | ||
echo "Unknown GEN_CONTAINERTYPE $GEN_CONTAINERTYPE. Choose between 'singularity' or 'docker'. Exiting." | ||
exit 1 | ||
fi |
1 change: 1 addition & 0 deletions
1
...ity/wrapper_genpipes/etc/wrapper.conf.tpl → ...ner/wrapper_genpipes/etc/wrapper.conf.tpl
This file contains 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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
# GEN_SHARED_CVMFS should have a sufficient amount of space to load full reference files | ||
export GEN_SHARED_CVMFS=$HOME/cvmfs | ||
BIND_LIST= | ||
GEN_CONTAINERTYPE=singularity |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.