From e7038eef112594728ad0ff620e0ba4b06fd77412 Mon Sep 17 00:00:00 2001 From: Davi Marcon Date: Wed, 24 Apr 2024 13:24:31 -0300 Subject: [PATCH] using biocontainers and removing custom container version (#85) --- conf/modules.config | 2 +- container/Dockerfile | 18 ------------------ container/build_and_publish.sh | 33 --------------------------------- 3 files changed, 1 insertion(+), 52 deletions(-) delete mode 100644 container/Dockerfile delete mode 100755 container/build_and_publish.sh diff --git a/conf/modules.config b/conf/modules.config index cfee07c..5f85f0d 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -40,7 +40,7 @@ process { } withName: '.*TB.*' { - container = 'ghcr.io/mycobactopia-org/mtbseq-nf:0.9.7' + container = 'quay.io/biocontainers/mtbseq:1.1.0--hdfd78af_0' } diff --git a/container/Dockerfile b/container/Dockerfile deleted file mode 100644 index f3f2b4f..0000000 --- a/container/Dockerfile +++ /dev/null @@ -1,18 +0,0 @@ -FROM mambaorg/micromamba:0.25.1 AS base - -#NOTE: The conda env file has been copied via the build script -COPY --chown=$MAMBA_USER:$MAMBA_USER mtbseq-nf-env.yml /tmp/mtbseq-nf-env.yml - -RUN micromamba create -n mtbseq-nf-env - -RUN micromamba install -y -n mtbseq-nf-env -f /tmp/mtbseq-nf-env.yml && micromamba clean -a -y - -FROM base AS condaenv - -ENV PATH /opt/conda/envs/mtbseq-nf-env/bin:$PATH - -COPY --chown=$MAMBA_USER:$MAMBA_USER GenomeAnalysisTK.jar /tmp/GenomeAnalysisTK.jar - -FROM condaenv AS gatkjar - -RUN /opt/conda/envs/mtbseq-nf-env/bin/gatk-register /tmp/GenomeAnalysisTK.jar diff --git a/container/build_and_publish.sh b/container/build_and_publish.sh deleted file mode 100755 index 9f5c274..0000000 --- a/container/build_and_publish.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env bash -set -uex - -# NOTE: Make sure you've set the environment correctly and are logged in to the registry. -# NOTE: Login to github registry with `echo $CR_PAT | docker login ghcr.io -u USERNAME --password-stdin` - -CONTAINER_TAG=0.9.7 - -DOCKER_NAMESPACE="ghcr.io/mtb-bioinformatics" - -# NOTE: Do not embed the GATK jar inside the container since at process-level we already do gatk-register -echo "Downloading and uncompressing GATK jar" -wget "https://storage.googleapis.com/gatk-software/package-archive/gatk/GenomeAnalysisTK-3.8-0-ge9d806836.tar.bz2" -tar -xf GenomeAnalysisTK-3.8-0-ge9d806836.tar.bz2 --wildcards '*.jar' -cp GenomeAnalysis*/*.jar . - -echo "Copying the mtbseq-nf-env file" -cp ../conda_envs/mtbseq-nf-env.yml ./ - -echo "Building mtbseq-nf container ..." -CONTAINER_NAME=$DOCKER_NAMESPACE/"mtbseq-nf":$CONTAINER_TAG - -echo "Container Name : $CONTAINER_NAME " -docker build -t $CONTAINER_NAME . -CONTAINER_ID=$(docker run -d $CONTAINER_NAME) -docker commit "$CONTAINER_ID" "$CONTAINER_NAME" -docker stop "$CONTAINER_ID" -docker push $DOCKER_NAMESPACE/"mtbseq-nf":$CONTAINER_TAG - - -echo "Deleting the copied files" -rm mtbseq-nf-env.yml -rm -rf GenomeAnalysisTK*