Dockerfile 3.89 KB
Newer Older
Koehorst, Jasper's avatar
Koehorst, Jasper committed
1
2
3
4
# Base Image
FROM ubuntu:18.04

# Metadata
Koehorst, Jasper's avatar
Koehorst, Jasper committed
5
LABEL base.image="docker-registry.wur.nl/unlock/docker"
Koehorst, Jasper's avatar
Koehorst, Jasper committed
6
7
8
LABEL version="1"
LABEL software="BASE 1.0"
LABEL software.version="0.0.0"
Koehorst, Jasper's avatar
Koehorst, Jasper committed
9
LABEL description="IRODS base image for UNLOCK"
Koehorst, Jasper's avatar
Koehorst, Jasper committed
10
11
12
13
14
15
16
17
18
LABEL website="https://m-unlock.gitlab.io"
LABEL documentation="NA"
LABEL license="NA"
LABEL tags="Base"

# ARG cwltool_version=3.0.20200720165847

ENV DEBIAN_FRONTEND=noninteractive LANG=en_US.UTF-8 LC_ALL=C.UTF-8 LANGUAGE=en_US.UTF-8

Nijsse, Bart's avatar
Nijsse, Bart committed
19
20
# Some default needed stuff
RUN apt-get update && apt-get install -y git build-essential curl wget nano htop pigz zip unzip
Koehorst, Jasper's avatar
Koehorst, Jasper committed
21

Nijsse, Bart's avatar
Nijsse, Bart committed
22
23
# Install the CWL runner (cwltool) and python and pip
RUN apt-get update && apt-get install -y nodejs cpanminus python3 python3-dev python3-distutils && \
Nijsse, Bart's avatar
Nijsse, Bart committed
24
25
26
27
28
29
30
31
32
33
34
35
36
	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 && \
	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

# Install Java via sdkman
Nijsse, Bart's avatar
Nijsse, Bart committed
37
38
39
40
41
# RUN apt-get update
# RUN apt-get -qq -y install \
#     curl \
#     unzip \
#     zip
Nijsse, Bart's avatar
Nijsse, Bart committed
42
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
Nijsse, Bart's avatar
Nijsse, Bart committed
43
#RUN apt-get -qq -y install curl
Nijsse, Bart's avatar
Nijsse, Bart committed
44
45
46
47
48
49
RUN curl -s https://get.sdkman.io | bash
RUN chmod a+x "$HOME/.sdkman/bin/sdkman-init.sh"
RUN source "$HOME/.sdkman/bin/sdkman-init.sh" &&\
	sdk install java 11.0.9.hs-adpt &&\
 	sdk install gradle 6.7 &&\
 	sdk install maven 3.6.3
Koehorst, Jasper's avatar
Koehorst, Jasper committed
50

Nijsse, Bart's avatar
Nijsse, Bart committed
51
52
# Other packages
# R
Nijsse, Bart's avatar
Nijsse, Bart committed
53
RUN apt-get update && apt-get install -y software-properties-common && \
Nijsse, Bart's avatar
Nijsse, Bart committed
54
55
56
57
58
	apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9 && \
	add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran40/' && \
	apt update && \
	apt install -y r-base

Nijsse, Bart's avatar
Nijsse, Bart committed
59
60
######################################
####### ANALYSIS TOOLS SECTION #######
Nijsse, Bart's avatar
Nijsse, Bart committed
61
	
Nijsse, Bart's avatar
Nijsse, Bart committed
62
## Quast
Koehorst, Jasper's avatar
Koehorst, Jasper committed
63
64
RUN pip install quast
# Fix locale issue with quast
Nijsse, Bart's avatar
Nijsse, Bart committed
65
RUN apt-get clean && apt-get update && apt-get install -y locales libfontconfig1 && locale-gen en_US.UTF-8 && dpkg-reconfigure locales
Koehorst, Jasper's avatar
Koehorst, Jasper committed
66

Nijsse, Bart's avatar
Nijsse, Bart committed
67
## CheckM
Nijsse, Bart's avatar
Nijsse, Bart committed
68
69
RUN pip3 install pysam numpy matplotlib checkm-genome && \
	checkm data setRoot /unlock/references/databases/CheckM/
Nijsse, Bart's avatar
Nijsse, Bart committed
70

Nijsse, Bart's avatar
Nijsse, Bart committed
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
## GTDB-Tk
RUN python3 -m pip install gtdbtk
ENV GTDBTK_DATA_PATH=/unlock/references/databases/GTDBTK/release202/

## Needed for faTools
RUN sudo ln -s /usr/lib/x86_64-linux-gnu/libpng16.so.16.34.0 /usr/lib/x86_64-linux-gnu/libpng12.so.0

## SET PATH ##
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
ENV PATH=$PATH:$CHECKM:$GTDBTK
######################################
######################################

Nijsse, Bart's avatar
Nijsse, Bart committed
86
87
88
89
90
91
# Add anonymous access
ADD irods /root/.irods

# Git config file for the runner?
ADD gitconfig /root/.gitconfig

Koehorst, Jasper's avatar
Koehorst, Jasper committed
92
93
# Add the startup script
ADD run.sh run.sh
Koehorst, Jasper's avatar
Koehorst, Jasper committed
94
95
96
97
98
# Make it executable
RUN chmod +x run.sh

# Add the upload script and install sshpass
RUN apt-get -y install sshpass
Koehorst, Jasper's avatar
sshpass    
Koehorst, Jasper committed
99
ADD /scripts/upload.sh upload.sh
Koehorst, Jasper's avatar
Koehorst, Jasper committed
100

Koehorst, Jasper's avatar
Koehorst, Jasper committed
101
102
103
# Scripts for small management tasks
ADD scripts /scripts

104
105
106
# Testing to upgrade nodejs
RUN curl -sL https://deb.nodesource.com/setup_14.x -o nodesource_setup.sh && sh ./nodesource_setup.sh &&  apt install -y nodejs

Koehorst, Jasper's avatar
Koehorst, Jasper committed
107
# Set the startup entrypoint
Nijsse, Bart's avatar
Nijsse, Bart committed
108
# ENTRYPOINT ["bash", "/run.sh"]