Commit e7a7aa2f authored by Jasper Koehorst's avatar Jasper Koehorst
Browse files

docker build file cleaning and run.sh upgrade for provenance compression

parent 0ba677aa
......@@ -17,24 +17,26 @@ LABEL tags="Base"
ENV DEBIAN_FRONTEND=noninteractive LANG=en_US.UTF-8 LC_ALL=C.UTF-8 LANGUAGE=en_US.UTF-8
# Some default needed stuff
RUN apt-get update && apt-get install -y git build-essential curl wget nano htop pigz zip unzip
# RUN apt-get update && apt-get install -y git build-essential curl wget nano htop pigz zip unzip
# Install the CWL runner (cwltool) and python and pip
RUN apt-get update && apt-get install -y nodejs cpanminus python3 python3-dev python3-distutils && \
RUN apt-get update && apt-get install -y gnupg git build-essential locales libfontconfig1 curl wget nano htop pigz zip unzip raptor2-utils nodejs cpanminus python3.8 python3-dev python3-distutils && \
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && python3 get-pip.py && \
pip3 install cwltool &&\
cwltool --version && pip install html5lib
# Enable icommands
RUN pip install python-irodsclient --upgrade && \
apt-get update && apt-get install -y gnupg && \
apt-get update && \
wget -qO - https://packages.irods.org/irods-signing-key.asc | apt-key add - && \
echo "# /etc/apt/sources.list.d/renci-irods.list" | tee -a /etc/apt/sources.list.d/renci-irods.list && \
echo "deb [arch=amd64] https://packages.irods.org/apt/ xenial main" | tee -a /etc/apt/sources.list.d/renci-irods.list && \
apt-get update && apt-get install -y irods-icommands
# Couple shell to bash
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
# Java installation
RUN curl -s https://get.sdkman.io | bash
RUN chmod a+x "$HOME/.sdkman/bin/sdkman-init.sh"
RUN echo "sdkman_auto_complete=false" >> "$HOME/.sdkman/etc/config"
......@@ -52,28 +54,21 @@ RUN apt-get update && apt-get install -y software-properties-common && \
apt install -y r-base
# Miniconda
RUN apt-get update && apt-get install -y python3.8 && \
wget -q https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh && \
RUN wget -q https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh && \
bash /Miniconda3-latest-Linux-x86_64.sh -b -p $HOME/miniconda
######################################
####### ANALYSIS TOOLS SECTION #######
## Biom format
RUN pip install biom-format
## Quast
RUN pip install quast
RUN pip install biom-format quast
# Fix locale issue with quast
RUN apt-get clean && apt-get update && apt-get install -y locales libfontconfig1 && locale-gen en_US.UTF-8 && dpkg-reconfigure locales
RUN apt-get clean && apt-get update && locale-gen en_US.UTF-8 && dpkg-reconfigure locales
## CheckM
RUN pip3 install pysam numpy matplotlib checkm-genome && \
RUN python3 -m pip install pysam numpy matplotlib checkm-genome gtdbtk && \
checkm data setRoot /unlock/references/databases/CheckM/
## GTDB-Tk
RUN python3 -m pip install gtdbtk
ENV GTDBTK_DATA_PATH=/unlock/references/databases/GTDBTK/release202/
## picrust2 (conda)
COPY conda/picrust2_env.yml /picrust2_env.yml
......@@ -90,7 +85,9 @@ ENV SDKMAN=/root/.sdkman/candidates/maven/current/bin:/root/.sdkman/candidates/j
ENV CHECKM=/unlock/infrastructure/binaries/hmmer/hmmer-3.3.2/bin:/unlock/infrastructure/binaries/pplacer/pplacer-Linux-v1.1.alpha17/bin:/unlock/infrastructure/binaries/prodigal/v2.6.3
# note: CheckM and GTDB-Tk overlap with hmmer,prodigal and are not added to GTDBTK
ENV GTDBTK=/unlock/infrastructure/binaries/Mash/mash-Linux64-v2.3:/unlock/infrastructure/binaries/FastTree/FastTree_v2.1.11:/unlock/infrastructure/binaries/Mash/mash-Linux64-v2.3:/unlock/infrastructure/binaries/fastANI/fastANI_v1.33
## GTDB-Tk
ENV GTDBTK_DATA_PATH=/unlock/references/databases/GTDBTK/release202/
# All paths combined
ENV PATH=$PATH:$SDKMAN:$CHECKM:$GTDBTK
######################################
......
......@@ -61,7 +61,7 @@ grep "[0-9]\+_irods:" $yaml | awk '{print $2}' | sort | uniq | awk '{print "java
# Start a conda environment when needed
conda_env=`grep conda $yaml | awk -F": " '{print $2}'`
if ! [[ -z "$conda" ]]; then
if ! [[ -z "$conda_env" ]]; then
source /root/miniconda/bin/activate && conda activate $conda_env
fi
......@@ -82,6 +82,12 @@ if [ $exit_status -eq 0 ]; then
rm -r $destination_path/PROVENANCE/data/
fi
# Copy TTL files from provenance folder
find $destination_path/PROVENANCE -type f | grep "ttl$" | xargs cat | rapper -i turtle -f turtle - http://baseuri > $destination_path/provenance.ttl
# Compress provenance folder
tar -czf $destination_path/PROVENANCE.tar.gz $destination_path/PROVENANCE
# Remove cache data
# rm -r $destination_path/CACHE_$yaml_file_name
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment