From 9ce391281c0dfbe13710e0f27833c1a12890d606 Mon Sep 17 00:00:00 2001 From: Oleksandr Frei Date: Thu, 14 Mar 2024 08:31:03 +0000 Subject: [PATCH] genopred Dockerfile --- docker/Makefile | 2 +- docker/dockerfiles/genopred/Dockerfile | 34 ++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 docker/dockerfiles/genopred/Dockerfile diff --git a/docker/Makefile b/docker/Makefile index 17a1d872..e12878c6 100644 --- a/docker/Makefile +++ b/docker/Makefile @@ -1,4 +1,4 @@ -all: hello.sif gwas.sif python3.sif r.sif +all: hello.sif gwas.sif python3.sif r.sif genopred.sif %.sif: dockerfiles/%/Dockerfile scripts/build_docker.sh $* && \ diff --git a/docker/dockerfiles/genopred/Dockerfile b/docker/dockerfiles/genopred/Dockerfile new file mode 100644 index 00000000..cdbdb3cf --- /dev/null +++ b/docker/dockerfiles/genopred/Dockerfile @@ -0,0 +1,34 @@ +# gwas container +FROM 'ubuntu:20.04' + +ENV TZ=Europe +ENV DEBIAN_FRONTEND noninteractive + +# Essential tools +WORKDIR /tmp +COPY /scripts/apt_get_essential.sh . +RUN bash apt_get_essential.sh && \ + rm apt_get_essential.sh + +WORKDIR /tmp +COPY /scripts/install_mambaforge.sh . +RUN bash install_mambaforge.sh && \ + rm install_mambaforge.sh + +WORKDIR /tools/GenoPred +RUN git clone --depth 1 --branch v2.2.0 https://github.com/opain/GenoPred.git . + +RUN conda env update -f /tools/GenoPred/pipeline/envs/pipeline.yaml + +# set env variables +RUN echo ". /opt/conda/etc/profile.d/conda.sh" >> ~/.bashrc && \ + echo "conda activate genopred" >> ~/.bashrc + +RUN /bin/bash -c ". activate genopred && cd /tools/GenoPred/pipeline && snakemake --restart-times 3 -j 1 --use-conda --conda-frontend mamba get_dependencies" + +# cleanup for smaller image size +RUN mamba clean -a -y +RUN pip cache purge + +WORKDIR /tools +