-
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.
Merge pull request #17 from c3g/genpipesV
Consolidation + removing dev GenPipes as GenPipes 5 is a package
- Loading branch information
Showing
14 changed files
with
348 additions
and
157 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,103 @@ | ||
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'] | ||
release: | ||
types: [published] | ||
|
||
# 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-docker: | ||
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 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
with: | ||
platforms: linux/amd64,linux/arm64 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
# 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@v3 | ||
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@v5 | ||
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@v6 | ||
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 | ||
|
||
build-and-push-apptainer: | ||
runs-on: ubuntu-latest | ||
if: ${{ ! startsWith(github.ref, 'refs/tags/') }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: eWaterCycle/setup-apptainer@v2 | ||
with: | ||
apptainer-version: 1.3.4 | ||
- name: Create sif image | ||
run: | | ||
apptainer build -F container/wrapper_genpipes/images/genpipes-${{ env.TAG_NAME }}.sif docker://${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.TAG_NAME }} | ||
cd container/wrapper_genpipes/images/ | ||
ln -sf genpipes-${{ env.TAG_NAME }}.sif genpipes.sif | ||
cd ../../ | ||
tar -zcvf wrapper_genpipes.tgz wrapper_genpipes | ||
- name: Upload sif image | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: container/wrapper_genpipes.tgz | ||
asset_name: wrapper_genpipes.tgz | ||
tag: ${{ github.ref }} | ||
overwrite: 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,44 +1,48 @@ | ||
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 && \ | ||
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 && \ | ||
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 && \ | ||
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 | ||
|
||
# module | ||
RUN wget https://github.com/cea-hpc/modules/releases/download/v${MODULE_VERSION}/modules-${MODULE_VERSION}.tar.gz | ||
RUN tar xzf modules-${MODULE_VERSION}.tar.gz && \ | ||
RUN wget https://github.com/cea-hpc/modules/releases/download/v${MODULE_VERSION}/modules-${MODULE_VERSION}.tar.gz && \ | ||
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 | ||
ADD ref.mugqic.local /etc/cvmfs/config.d/ref.mugqic.local | ||
|
||
RUN ["ln", "-s", "/usr/local/Modules/init/profile.sh", "/etc/profile.d/z00_module.sh"] | ||
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 | ||
RUN chmod 755 /usr/local/bin/init_genpipes | ||
ENTRYPOINT ["init_genpipes"] | ||
#docker build --tag c3genomics/genpipes:alpha -f Dockerfile . && singularity build -F ../genpipes_alpha.sif docker-daemon://c3genomics/genpipes:alpha |
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.
Oops, something went wrong.