-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathDockerfile
68 lines (55 loc) · 2.24 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
# Copying: This code is in the public domain
# our R base image
FROM r-base
RUN apt-get update && apt-get install -y \
file \
libcurl4-openssl-dev \
libssl-dev \
libcairo-dev
# BiocManager requirements
RUN apt-get update && apt-get install -y \
libxml2-dev \
libudunits2-dev \
libgeos++-dev \
libtiff-dev \
libopenmpi-dev
# install packages
# these are ones I like
RUN echo 'install.packages(c("ggplot2"), repos="http://cran.us.r-project.org", dependencies=TRUE)' > /tmp/packages.R \
&& Rscript /tmp/packages.R
RUN echo 'install.packages("Rserve",,"http://rforge.net/",type="source")' > /tmp/packages2.R \
&& Rscript /tmp/packages2.R
# Popular data science packages
RUN echo 'install.packages(c("data.table", "dplyr", "plyr", "scales", "lubridate", "ggplot2", "grid", "BSDA", "cluster", "clustertend", "factoextra", "heatmaply", "NbClust", "RColorBrewer", "pandoc"), repos="http://cran.us.r-project.org", dependencies=TRUE)' > /tmp/packages.R \
&& Rscript /tmp/packages.R
# Bio DB packages
RUN echo 'install.packages(c("igraph"), repos="http://cran.us.r-project.org", dependencies=TRUE)' > /tmp/packages.R \
&& Rscript /tmp/packages.R
# Bio DB packages
RUN echo 'install.packages(c("qgraph", "svglite", "GGally", "network", "sna"), repos="http://cran.us.r-project.org", dependencies=TRUE)' > /tmp/packages.R \
&& Rscript /tmp/packages.R
# Optional Bio DB packages
RUN echo 'install.packages(c("pheatmap", "NMF"), repos="http://cran.us.r-project.org", dependencies=TRUE)' > /tmp/packages.R \
&& Rscript /tmp/packages.R
# BiocManager
RUN echo 'install.packages(c("BiocManager"), repos="http://cran.us.r-project.org", dependencies=TRUE)' > /tmp/packages.R \
&& Rscript /tmp/packages.R
# GOstats
RUN echo 'BiocManager::install("GOstats")' > /tmp/packages.R \
&& Rscript /tmp/packages.R
# Disable development tools
RUN chmod o-rwx \
/usr/lib/gcc /usr/lib/python* /usr/lib/tcltk /usr/lib/valgrind \
/sbin /usr/sbin /usr/local/bin \
/usr/bin/* /bin/* && \
chmod o+x \
/bin/bash /bin/ls /bin/rm /bin/uname /bin/sh /bin/ld.so && \
chmod o+rx \
/usr/bin/R /usr/bin
VOLUME /rserve
# set the command
RUN mkdir /home/ruser
ADD Rserv.conf /home/ruser/Rserv.conf
ADD Rserv.sh /home/ruser/Rserv.sh
WORKDIR /home/ruser
ENTRYPOINT ["./Rserv.sh"]