-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
207 lines (196 loc) · 4.02 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
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
#LABEL maintainer="Eléonore Schneegans and Nurun Fancy
## Uses the latest stable ubuntu, R and Bioconductor versions.
## Created on unbuntu 20.04, R 4.0 and BiocManager 3.12
FROM rocker/rstudio:4.2.2
RUN apt-get update \
&& apt-get install -y --no-install-recommends apt-utils \
&& apt-get install -y --no-install-recommends \
python3 \
python3-setuptools \
python3-dev \
python3-pip \
python3-venv \
libcurl4-openssl-dev \
libcairo2-dev \
libfreetype6-dev \
libpng-dev \
libtiff5-dev \
libjpeg-dev \
libxt-dev \
libharfbuzz-dev \
libfribidi-dev \
## Basic deps
gcc \
gdb \
libxml2-dev \
libz-dev \
liblzma-dev \
libbz2-dev \
libgit2-dev \
## sys deps from bioc_full
pkg-config \
fortran77-compiler \
byacc \
automake \
curl \
## This section installs libraries
libpcre2-dev \
libnetcdf-dev \
libhdf5-serial-dev \
libfftw3-dev \
libopenbabel-dev \
libopenmpi-dev \
libudunits2-dev \
libgeos-dev \
libproj-dev \
libreadline-dev \
libgsl0-dev \
libgslcblas0 \
libgtk2.0-dev \
libgl1-mesa-dev \
libglu1-mesa-dev \
libgmp3-dev \
libhdf5-dev \
libncurses-dev \
libxpm-dev \
liblapack-dev \
libv8-dev \
libgtkmm-2.4-dev \
libmpfr-dev \
libmodule-build-perl \
libapparmor-dev \
libprotoc-dev \
libmagick++-dev \
libsasl2-dev \
libpoppler-cpp-dev \
libprotobuf-dev \
libpq-dev \
libperl-dev \
## software - perl extentions and modules
libarchive-extract-perl \
libfile-copy-recursive-perl \
libcgi-pm-perl \
libdbi-perl \
libdbd-mysql-perl \
libxml-simple-perl \
libmysqlclient-dev \
default-libmysqlclient-dev \
libgdal-dev \
## new libs
libglpk-dev \
## Databases and other software
sqlite \
openmpi-bin \
mpi-default-bin \
openmpi-common \
openmpi-doc \
tcl8.6-dev \
tk-dev \
default-jdk \
imagemagick \
tabix \
ggobi \
graphviz \
protobuf-compiler \
jags \
## Additional resources
xfonts-100dpi \
xfonts-75dpi \
biber \
libsbml5-dev \
## qpdf needed to stop R CMD Check warning
qpdf \
#cmake
build-essential \
wget \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& wget https://github.com/Kitware/CMake/releases/download/v3.24.1/cmake-3.24.1-Linux-x86_64.sh \
-q -O /tmp/cmake-install.sh \
&& chmod u+x /tmp/cmake-install.sh \
&& mkdir /opt/cmake-3.24.1 \
&& /tmp/cmake-install.sh --skip-license --prefix=/opt/cmake-3.24.1 \
&& rm /tmp/cmake-install.sh \
&& ln -s /opt/cmake-3.24.1/bin/* /usr/local/bin \
# Install mofapy2
&& python3 -m pip install mofapy2
#Install CRAN pkgs
RUN install2.r -e \
BiocManager \
basetheme \
data.table \
devtools \
doParallel \
DT \
dplyr \
enrichR \
foreach \
forcats \
ggplot2 \
ggpubr \
ggrastr \
ggrepel \
ggridges \
ggsignif \
GGally \
ggbeeswarm \
ghql \
httr \
igraph \
jsonlite \
lme4 \
magrittr \
Matrix \
matrixStats \
mvtnorm \
paletteer \
pheatmap \
plotly \
purrr \
psych \
qs \
ragg \
rlang \
RColorBrewer \
readr \
remotes \
reshape2 \
reticulate \
rmarkdown \
table1 \
tibble \
tidyr \
stringr \
scales \
SNFtool \
statmod \
systemfonts \
viridis \
visNetwork \
grDevices \
&& rm -rf /tmp/downloaded_packages
## Install Bioconductor packages
COPY ./misc/requirements-bioc.R .
RUN Rscript -e 'requireNamespace("BiocManager"); BiocManager::install(ask=F);' \
&& Rscript requirements-bioc.R \
&& rm -rf /tmp/downloaded_packages \
&& install2.r -e ClassDiscovery \
NMF \
IntNMF \
MASS \
ActivePathways
# RUN Rscript -e 'reticulate::py_config()'
RUN R -e "install.packages('synapser', repos=c('http://ran.synapse.org', 'http://cran.fhcrc.org'))"
WORKDIR Omix
ADD . .
# Run R CMD check - will fail with any errors or warnings
RUN --mount=type=secret,id=SYNAPSE_ID \
--mount=type=secret,id=SYNAPSE_PASSWORD \
--mount=type=secret,id=GH_TOKEN \
echo "GH_TOKEN=$(cat /run/secrets/GH_TOKEN)" >> "${HOME}/.Renviron" \
&& echo "SYNAPSE_ID=$(cat /run/secrets/SYNAPSE_ID)" >> "${HOME}/.Renviron" \
&& echo "SYNAPSE_PASSWORD=$(cat /run/secrets/SYNAPSE_PASSWORD)" >> "${HOME}/.Renviron" \
&& Rscript -e "devtools::check(error_on = 'error')"
# Install R package from source
RUN Rscript -e "remotes::install_local()"
RUN rm -rf *