From bb4c400713780f5b934fd09bee70cf7399786f98 Mon Sep 17 00:00:00 2001 From: Geert van Geest Date: Wed, 7 Apr 2021 13:45:48 +0200 Subject: [PATCH] added docker workflow --- .github/workflows/push_jupyter_container.yml | 20 ++++++++++++++++++++ .github/workflows/push_rstudio_container.yml | 20 ++++++++++++++++++++ Docker/jupyter/Dockerfile | 19 +++++++++---------- Docker/rstudio/Dockerfile | 5 ++++- 4 files changed, 53 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/push_jupyter_container.yml create mode 100644 .github/workflows/push_rstudio_container.yml diff --git a/.github/workflows/push_jupyter_container.yml b/.github/workflows/push_jupyter_container.yml new file mode 100644 index 0000000..c15ff21 --- /dev/null +++ b/.github/workflows/push_jupyter_container.yml @@ -0,0 +1,20 @@ +name: Publish Docker image +on: + release: + types: [published] +jobs: + push_to_registry: + name: Push Docker image to GitHub Packages + runs-on: ubuntu-latest + steps: + - name: Check out the repo + uses: actions/checkout@v2 + - name: Push to GitHub Packages + uses: docker/build-push-action@v1 + with: + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + registry: docker.pkg.github.com + path: Docker/jupyter + repository: sib-swiss/ngs-longreads-training/ngs-longreads-jupyter + tag_with_ref: true diff --git a/.github/workflows/push_rstudio_container.yml b/.github/workflows/push_rstudio_container.yml new file mode 100644 index 0000000..54afc15 --- /dev/null +++ b/.github/workflows/push_rstudio_container.yml @@ -0,0 +1,20 @@ +name: Publish Docker image +on: + release: + types: [published] +jobs: + push_to_registry: + name: Push Docker image to GitHub Packages + runs-on: ubuntu-latest + steps: + - name: Check out the repo + uses: actions/checkout@v2 + - name: Push to GitHub Packages + uses: docker/build-push-action@v1 + with: + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + registry: docker.pkg.github.com + path: Docker/rstudio + repository: sib-swiss/ngs-longreads-training/ngs-longreads-rstudio + tag_with_ref: true diff --git a/Docker/jupyter/Dockerfile b/Docker/jupyter/Dockerfile index 51db5eb..9d8aa3f 100644 --- a/Docker/jupyter/Dockerfile +++ b/Docker/jupyter/Dockerfile @@ -1,4 +1,4 @@ -FROM jupyter/minimal-notebook +FROM jupyter/minimal-notebook:9fe5186aba96 USER root RUN cat /etc/skel/.bashrc >> /etc/bash.bashrc @@ -7,24 +7,23 @@ USER $NB_UID RUN rm -r /home/jovyan/work RUN /opt/conda/bin/conda install -y --quiet -c bioconda \ -samtools \ -minimap2 \ -fastqc \ -pbmm2 \ -parallel +samtools=1.10 \ +minimap2=2.17 \ +fastqc=0.11.9 \ +pbmm2=1.4.0 \ +parallel=20170422 RUN parallel --citation <<< 'will cite' +# install nanoplot with pip (with conda gives errors) RUN pip install NanoPlot +# install flair environment from .yml file COPY flair_env.yml ./ - RUN /opt/conda/bin/conda env create -f flair_env.yml - RUN rm flair_env.yml +# install pacbio environment from .yml file COPY pacbio_env.yml ./ - RUN /opt/conda/bin/conda env create -f pacbio_env.yml - RUN rm pacbio_env.yml diff --git a/Docker/rstudio/Dockerfile b/Docker/rstudio/Dockerfile index 7246eea..a588638 100644 --- a/Docker/rstudio/Dockerfile +++ b/Docker/rstudio/Dockerfile @@ -1,12 +1,15 @@ -FROM rocker/rstudio +FROM rocker/rstudio:4.0.3 +# non interactive for installing dependencies ENV DEBIAN_FRONTEND=noninteractive +# installing dependencies for DESeq2 and rmarkdown RUN apt-get update RUN apt-get install -y libz-dev RUN apt-get install -y libxml2-dev RUN apt-get install -y libxt-dev +# copy and run script to install packages COPY install_packages.R ./ RUN Rscript ./install_packages.R