-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
168 lines (143 loc) · 4.54 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
FROM quay.io/wtsicgp/dockstore-cgpmap:3.1.4 as builder
USER root
# Version of tools that are installed in both stages, make sure they are consistent.
## VAGrENG dependcies
ENV VER_BEDTOOLS "2.25.0-1"
## cgpRna dependencies
ENV VER_BOWTIE1 "1.1.2-3"
ENV VER_BOWTIE2 "2.2.6-2"
ENV VER_BLAST "2.2.31-4"
ENV VER_GMAP "2015-12-31.v7-1"
# Version of other tools
## VAGrENG dependcies
ENV VER_VCFTOOLS "0.1.16"
ENV VER_Set_IntervalTree "0.12"
## CancerIT dependencies
ENV VER_CGPVCF "v2.2.1"
ENV VER_GRASS "v2.1.1"
ENV VER_VAGRENT "v3.3.3"
## cgpRna dependencies
ENV VER_CYTHON "0.28.5"
ENV VER_NUMPY "1.18.1"
ENV VER_MATPLOTLIB "3.0.0"
ENV VER_RSEQC "3.0.0"
ENV VER_HTSEQ "0.7.2"
ENV VER_File_ShareDir_Install "0.13"
ENV VER_Config_IniFiles "3.000002"
ENV VER_STAR "2.5.0c"
ENV VER_STARFUSION "v0.1.1"
ENV VER_TOPHAT "2.1.0"
ENV VER_DEFUSE "v0.8.2"
ENV SOURCE_FATOTWOBIT "http://hgdownload.soe.ucsc.edu/admin/exe/linux.x86_64/faToTwoBit"
ENV SOURCE_BLAT "https://hgwdev.gi.ucsc.edu/~kent/src/blatSrc35.zip"
RUN apt-get -yq update
RUN apt-get install -qy --no-install-recommends lsb-release
RUN echo "deb http://cran.rstudio.com/bin/linux/ubuntu `lsb_release -cs`/" >> /etc/apt/sources.list
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
RUN apt-get -yq update
RUN apt-get install -yq --no-install-recommends \
locales \
g++ \
make \
gcc \
pkg-config \
zlib1g-dev \
zip \
unzip \
patch \
libpng-dev \
python3 python3-dev python3-pip python3-setuptools python3-wheel \
r-base r-base-dev \
libcurl4-gnutls-dev zlib1g-dev \
bedtools=${VER_BEDTOOLS} \
bowtie=${VER_BOWTIE1} \
bowtie2=${VER_BOWTIE2} \
ncbi-blast+=${VER_BLAST} \
gmap=${VER_GMAP}
# libboost-all-dev is required to compile defuse. Its installation installs python2 as well, which is required for building Bedtools
RUN apt-get install -yq --no-install-recommends libboost-all-dev
# for building matplotlib
RUN apt-get install -yq --no-install-recommends libfreetype6-dev
RUN apt-get install -yq --no-install-recommends liblzo2-dev
RUN locale-gen en_US.UTF-8
RUN update-locale LANG=en_US.UTF-8
RUN python3.5 -m pip install --upgrade pip==20.3.4
ENV OPT /opt/wtsi-cgp
ENV PERL5LIB $OPT/lib/perl5
ENV R_LIBS $OPT/R-lib
ENV R_LIBS_USER $R_LIBS
ENV PYTHONPATH $OPT/usr/local/lib/python3.8/dist-packages
ENV PYTHONBIN $OPT/usr/local/bin
ENV PATH $PYTHONBIN:$OPT/bin:$OPT/biobambam2/bin:$PATH
ENV LD_LIBRARY_PATH $OPT/lib
ENV LC_ALL en_US.UTF-8
ENV LANG en_US.UTF-8
# build tools from other repos
ADD build build/
RUN bash build/opt-build.sh $OPT
# build the tools in this repo, separate to reduce build time on errors
COPY . .
RUN bash build/opt-build-local.sh $OPT
RUN pip3 install --upgrade --ignore-installed --root=$OPT ./run-cgprna
RUN bash build/config-defuse.sh $OPT
FROM ubuntu:20.04
LABEL maintainer="[email protected]" \
uk.ac.sanger.cgp="Cancer, Ageing and Somatic Mutation, Wellcome Trust Sanger Institute" \
version="2.6.1" \
description="cgpRna docker"
# Version of tools that are installed in both stages, make sure they are consistent.
## VAGrENG dependcies
ENV VER_BEDTOOLS "2.25.0-1"
## cgpRna dependencies
ENV VER_BOWTIE1 "1.1.2-3"
ENV VER_BOWTIE2 "2.2.6-2"
ENV VER_BLAST "2.2.31-4"
ENV VER_GMAP "2015-12-31.v7-1"
RUN apt-get -yq update
RUN apt-get install -qy --no-install-recommends lsb-release
RUN echo "deb http://cran.rstudio.com/bin/linux/ubuntu `lsb_release -cs`/" >> /etc/apt/sources.list
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
RUN apt-get -yq update
RUN apt-get install -yq --no-install-recommends \
apt-transport-https \
locales \
curl \
ca-certificates \
libperlio-gzip-perl \
bzip2 \
psmisc \
time \
zlib1g \
liblzma5 \
libncurses5 \
p11-kit \
unattended-upgrades \
python3 \
r-base \
bedtools=${VER_BEDTOOLS} \
bowtie=${VER_BOWTIE1} \
bowtie2=${VER_BOWTIE2} \
ncbi-blast+=${VER_BLAST} \
gmap=${VER_GMAP} && \
unattended-upgrade -d -v && \
apt-get remove -yq unattended-upgrades && \
apt-get autoremove -yq
RUN locale-gen en_US.UTF-8
RUN update-locale LANG=en_US.UTF-8
ENV OPT /opt/wtsi-cgp
ENV PERL5LIB $OPT/lib/perl5
ENV R_LIBS $OPT/R-lib
ENV R_LIBS_USER $R_LIBS
ENV PYTHONBIN $OPT/usr/local/bin
ENV PYTHONPATH $OPT/usr/local/lib/python3.8/dist-packages
ENV PATH $PYTHONBIN:$OPT/bin:$OPT/biobambam2/bin:$PATH
ENV LD_LIBRARY_PATH $OPT/lib
ENV LC_ALL en_US.UTF-8
ENV LANG en_US.UTF-8
RUN mkdir -p $OPT
COPY --from=builder $OPT $OPT
## USER CONFIGURATION
RUN adduser --disabled-password --gecos '' ubuntu && chsh -s /bin/bash && mkdir -p /home/ubuntu
USER ubuntu
WORKDIR /home/ubuntu
CMD ["/bin/bash"]