forked from cancerit/NanoSeq
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
165 lines (138 loc) · 6.34 KB
/
Copy pathDockerfile
File metadata and controls
165 lines (138 loc) · 6.34 KB
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
FROM ubuntu:18.04 AS builder
USER root
# ALL tool versions used by opt-build.sh
ENV VER_SAMTOOLS="1.18"
ENV VER_HTSLIB="1.18"
ENV VER_BCFTOOLS="1.18"
ENV VER_VERIFYBAMID="2.0.1"
ENV VER_LIBDEFLATE="v1.18"
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get -yq update
RUN apt-get install -yq --no-install-recommends locales
RUN apt-get install -yq --no-install-recommends ca-certificates
RUN apt-get install -yq --no-install-recommends wget curl
# install latest cmake so opt-build.sh works - the initial installs will also help install R
RUN apt-get install -yq --no-install-recommends software-properties-common lsb-release
RUN wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null
RUN apt-add-repository "deb https://apt.kitware.com/ubuntu/ $(lsb_release -cs) main"
RUN apt-get install -yq --no-install-recommends cmake=3.25.2-0kitware1ubuntu18.04.1
RUN apt-get install -yq --no-install-recommends make
RUN apt-get install -yq --no-install-recommends pkg-config
RUN apt-get install -yq --no-install-recommends gcc-8 g++-8
# if ubuntu 18.04
RUN apt install -yq --no-install-recommends dirmngr
RUN wget -qO- https://cloud.r-project.org/bin/linux/ubuntu/marutter_pubkey.asc | tee -a /etc/apt/trusted.gpg.d/cran_ubuntu_key.asc
RUN add-apt-repository "deb https://cloud.r-project.org/bin/linux/ubuntu $(lsb_release -cs)-cran40/"
RUN apt-get install -yq --no-install-recommends r-base-core=4.1.3-1.1804.0 r-base-dev=4.1.3-1.1804.0
RUN apt-mark hold r-base-core r-base-dev
RUN apt-get install -yq --no-install-recommends r-cran-mass=7.3-51.5-2bionic0 r-cran-class=7.3-16-1bionic0 r-cran-nnet=7.3-13-1bionic0
RUN apt-get install -yq --no-install-recommends r-recommended=4.1.3-1.1804.0
RUN apt-get install -yq --no-install-recommends r-base=4.1.3-1.1804.0
RUN apt-mark hold r-base r-recommended
# if ubuntu 22.04
# RUN apt-get install -yq --no-install-recommends r-base=4.1.2-1ubuntu2
RUN apt-get install -yq --no-install-recommends zlib1g-dev
RUN apt-get install -yq --no-install-recommends libbz2-dev
RUN apt-get install -yq --no-install-recommends liblzma-dev
RUN apt-get install -yq --no-install-recommends libcurl4-openssl-dev
RUN apt-get install -yq --no-install-recommends libncurses5-dev
RUN apt-get install -yq --no-install-recommends libssl-dev
RUN apt-get install -yq --no-install-recommends libblas-dev
RUN apt-get install -yq --no-install-recommends liblapack-dev
RUN apt-get install -yq --no-install-recommends gfortran
RUN apt-get install -yq --no-install-recommends libxml2-dev
RUN apt-get install -yq --no-install-recommends libgsl-dev
RUN apt-get install -yq --no-install-recommends libperl-dev
RUN apt-get install -yq --no-install-recommends libpng-dev
RUN locale-gen en_US.UTF-8
RUN update-locale LANG=en_US.UTF-8
ENV OPT /opt/wtsi-cgp
ENV PATH $OPT/bin:$PATH
ENV R_LIBS $OPT/R-lib
ENV R_LIBS_USER $R_LIBS
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/libInstall.R build/
ADD build/opt-build.sh build/
RUN bash build/opt-build.sh $OPT
# Install deepSNV
RUN mkdir -p "/opt/wtsi-cgp/R-lib"
RUN Rscript -e 'install.packages(c("remotes", "BiocManager"))'
# NOTE: deepSNV 1.40.0 requires gcc 8 to compile
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 60 --slave /usr/bin/g++ g++ /usr/bin/g++-8
# Required to compile VGAM
RUN apt install -yq --no-install-recommends libgfortran-8-dev
RUN Rscript -e 'library("remotes"); remotes::install_version("curl", "5.2.1", lib = "/opt/wtsi-cgp/R-lib", lib.loc = "/opt/wtsi-cgp/R-lib")'
RUN Rscript -e 'library("remotes"); remotes::install_version("httr", "1.4.7", lib = "/opt/wtsi-cgp/R-lib", lib.loc = "/opt/wtsi-cgp/R-lib")'
RUN Rscript -e 'library("BiocManager"); BiocManager::install("VGAM", version = "3.14", update = FALSE, lib = "/opt/wtsi-cgp/R-lib", lib.loc = "/opt/wtsi-cgp/R-lib")'
RUN Rscript -e 'library("BiocManager"); BiocManager::install("deepSNV", version = "3.14", update = FALSE, lib = "/opt/wtsi-cgp/R-lib", lib.loc = "/opt/wtsi-cgp/R-lib")'
RUN Rscript -e 'library("BiocManager"); BiocManager::install("vcfR", version = "3.14", update = FALSE, lib = "/opt/wtsi-cgp/R-lib", lib.loc = "/opt/wtsi-cgp/R-lib")'
# build the tools in this repo, separate to reduce build time on errors
COPY . .
ADD build/opt-build-local.sh build/
RUN bash build/opt-build-local.sh $OPT
FROM ubuntu:18.04
LABEL maintainer="cgphelp@sanger.ac.uk" \
uk.ac.sanger.cgp="Cancer, Ageing and Somatic Mutation, Wellcome Trust Sanger Institute" \
version="1.0.1" \
description="nanoseq docker"
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get -yq update
RUN apt-get install -yq --no-install-recommends \
apt-transport-https \
locales \
curl \
wget \
make \
g++ \
gcc \
gfortran \
libblas-dev \
liblapack-dev \
ca-certificates \
time \
zlib1g \
libz-dev \
python3 \
libxml2 \
libgsl23 \
libperl5.26 \
libcapture-tiny-perl \
libfile-which-perl \
libpng16-16 \
parallel \
unattended-upgrades && \
unattended-upgrade -d -v && \
apt-get remove -yq unattended-upgrades && \
apt-get autoremove -yq
RUN apt install -yq --no-install-recommends software-properties-common dirmngr
RUN wget -qO- https://cloud.r-project.org/bin/linux/ubuntu/marutter_pubkey.asc | tee -a /etc/apt/trusted.gpg.d/cran_ubuntu_key.asc
RUN add-apt-repository "deb https://cloud.r-project.org/bin/linux/ubuntu $(lsb_release -cs)-cran40/"
RUN apt-get install -yq --no-install-recommends r-base-core=4.1.3-1.1804.0
RUN apt-mark hold r-base-core
RUN apt-get install -yq --no-install-recommends r-cran-mass=7.3-51.5-2bionic0 r-cran-class=7.3-16-1bionic0 r-cran-nnet=7.3-13-1bionic0
RUN apt-get install -yq --no-install-recommends r-recommended=4.1.3-1.1804.0
RUN apt-get install -yq --no-install-recommends r-base=4.1.3-1.1804.0
RUN apt-mark hold r-base r-recommended
ADD build/libInstall2.R build/
RUN Rscript build/libInstall2.R
RUN locale-gen en_US.UTF-8
RUN update-locale LANG=en_US.UTF-8
ENV OPT /opt/wtsi-cgp
ENV PATH $OPT/bin:$PATH
ENV R_LIBS $OPT/R-lib
ENV R_LIBS_USER $R_LIBS
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
# Shared library required by VGAM
RUN apt install -yq --no-install-recommends libgfortran-8-dev
## USER CONFIGURATION
RUN adduser --disabled-password --gecos '' ubuntu && chsh -s /bin/bash && mkdir -p /home/ubuntu
USER ubuntu
WORKDIR /home/ubuntu
CMD ["/bin/bash"]