-
Notifications
You must be signed in to change notification settings - Fork 6
/
Dockerfile-evam-shiny
156 lines (128 loc) · 5.38 KB
/
Dockerfile-evam-shiny
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
FROM rocker/r-ver:4.2.2
######################################################################
######################################################################
#####
##### Common to the two Dockerfiles
#####
######################################################################
######################################################################
RUN apt-get update && \
apt-get install -f -y software-properties-common && \
rm -rf /var/lib/apt/lists/* && \
add-apt-repository universe && \
apt-get update && \
apt-get install -y libboost-all-dev && \
apt-get install -y libgsl-dev && \
apt-get install -y fftw3 && \
apt-get install -y libfftw3-3 && \
apt-get install -y libfftw3-bin && \
apt-get install -y libfftw3-dev && \
apt-get install -y libfftw3-single3 && \
apt-get install -y libfftw3-double3 && \
apt-get install -y libfftw3-long3 && \
apt-get install -y libfftw3-quad3 && \
apt-get install -y libtiff-dev && \
apt-get install -y libglpk-dev && \
apt-get install -y libgmp-dev && \
apt-get install -y libx11-dev && \
apt-get install -y git && \
apt-get install -y libxt6 && \
apt-get install -y pkg-config
## R packages
RUN R -e "install.packages('BiocManager')"
RUN R -e "install.packages('relations')"
RUN R -e "install.packages('RhpcBLASctl')"
RUN R -e "install.packages('inline')"
RUN R -e "install.packages('Oncotree')"
RUN R -e "install.packages('pryr')"
RUN R -e "install.packages('readr')"
RUN R -e "install.packages('testthat')"
RUN R -e "install.packages('plot.matrix')"
RUN R -e "install.packages('httr')"
RUN R -e "install.packages('openssl')"
RUN R -e "install.packages('xml2')"
# RUN R -e "install.packages('usethis')"
RUN R -e "install.packages('credentials')"
RUN R -e "install.packages('roxygen2')"
RUN R -e "install.packages('optparse')"
RUN R -e "install.packages('rversions')"
RUN R -e "install.packages('imager')"
RUN R -e "install.packages('DT')"
RUN R -e "install.packages('shinyjs')"
RUN R -e "install.packages('markdown')"
RUN R -e "install.packages('Rlinsolve')"
RUN R -e "install.packages('fastmatrix')"
RUN R -e "install.packages('shiny')"
RUN R -e "install.packages('Matrix')"
RUN R -e "install.packages('stringi')"
RUN R -e "install.packages('foreach')"
RUN R -e "install.packages('R.utils')"
RUN R -e "install.packages('plotly')"
RUN R -e "install.packages('magrittr')"
RUN R -e "BiocManager::install('Rgraphviz')"
RUN R -e "install.packages('devtools')"
RUN R -e "install.packages('igraph')"
RUN R -e "BiocManager::install('OncoSimulR')"
RUN R -e "library(devtools);devtools::install_github('phillipnicol/OncoBN')"
RUN R -e "install.packages('prompter')"
RUN R -e "install.packages('shinyBS')"
RUN R -e "install.packages('tippy')"
RUN mkdir -p /app/Sources/
## Install HESBCN
RUN cd /app/Sources && \
git clone https://github.com/danro9685/HESBCN && \
cd HESBCN && \
make && \
cp h-esbcn /usr/local/bin/
## Install MCCBN
RUN cd /app/Sources && \
git clone https://github.com/cbg-ethz/MC-CBN && \
cd MC-CBN && \
apt-get install -y dh-autoreconf autoconf automake autotools-dev autoconf autoconf-archive && \
autoreconf -vif -I m4 && \
R CMD build . && \
V_MCCBN=$(cat DESCRIPTION | grep Version | cut -d' ' -f2) && \
R CMD INSTALL mccbn_$V_MCCBN.tar.gz
## Install cbn
COPY ct-cbn-0.1.04b-RDU.tar.gz /app/Sources/
RUN cd /app/Sources && \
tar -xvzf ct-cbn-0.1.04b-RDU.tar.gz && \
cd ct-cbn-0.1.04b-RDU && \
./configure && \
make && \
cp -t /usr/local/bin/ ct-cbn h-cbn
## Copy a file used for testing
COPY Renviron.based_on_bioc /app/
## Copy the directory and install and test evamtools
COPY evamtools/ /app/evamtools/
RUN cd /app && \
## sed -i 's/this_string_to_be_replaced_by_git_hash/'"$GIT_HASH"'/' ./evamtools/inst/shiny-examples/evamtools/ui.R && \
V_PKG=$(cat ./evamtools/DESCRIPTION | grep Version | cut -d' ' -f2) && \
R --no-site-file --no-init-file CMD build evamtools && \
R --no-site-file --no-init-file CMD INSTALL --install-tests evamtools_$V_PKG.tar.gz && \
export TESTTHAT_CPUS=$(cat /proc/cpuinfo | awk '/^processor/{print $3}' | tail -n 1) && \
R_ENVIRON_USER=./Renviron.based_on_bioc R --no-site-file --no-init-file CMD check --no-manual evamtools_$V_PKG.tar.gz
######################################################################
######################################################################
#####
##### End common to the two Dockerfiles
#####
######################################################################
######################################################################
## Increase build number if you want to force rebuild from here on
ARG build=1
## Create folder to share with the outside
## RUN mkdir /app/outside
RUN addgroup --system evamapp && \
adduser --system --ingroup evamapp evamapp
## Oncotree does not declare via NAMESPACE
## that it imports optim from stats. And this
## Rprofile has stats in search() with smaller index.
WORKDIR /home/evamapp
RUN echo ".First <- function() {library(methods); library(datasets); library(utils); library(grDevices); library(graphics); library(stats); library(shiny); library(evamtools); cat('Loaded evamtools\n'); runShiny()}" > /home/evamapp/.Rprofile
RUN chown evamapp:evamapp -R /home/evamapp
USER evamapp
EXPOSE 3000
ENTRYPOINT ["R"]
## Debugging errors: for example, start as
## sudo docker run -it --entrypoint bash evamshiny