-
Notifications
You must be signed in to change notification settings - Fork 6
/
DOCKERFILE
105 lines (90 loc) · 4.04 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
# default R-version install via rocker, uses debian as a base
FROM rocker/verse:3.6.1
# ------------------------------------------------------------------------------
# install some likely used basic unix stuff
#
# uuid-runtime: necessary to get uuidgen for secure cookie key file creation of
# rserver
# ------------------------------------------------------------------------------
RUN apt-get update -qq && apt-get -y --no-install-recommends install \
wget \
bzip2 \
nano \
vim \
uuid-runtime \
libcurl4-openssl-dev \
zlib1g zlib1g-dev \
libssl-dev \
libxml2-dev \
libmpc-dev \
libpng-dev \
libicu-dev \
liblzma-dev \
libbz2-dev \
libpcre3-dev \
openjdk-8-jdk \
default-jre \
openmpi-bin
# ------------------------------------------------------------------------------
# create some specific directories for binding ICB storages
# ------------------------------------------------------------------------------
RUN mkdir -p /storage/groups/ /storage/scratch/ /home/icb/ /mnt/home/icb/ /localscratch/
# ------------------------------------------------------------------------------
# install some basic packages
# ------------------------------------------------------------------------------
RUN install2.r --error \
--deps TRUE \
doMPI \
Rmpi
RUN install2.r --error \
--deps TRUE \
data.table \
reshape2 \
batchtools \
mixtools \
getopt \
optparse \
RcppArmadillo
# needs to be done via BiocManager!
RUN R -e "library(BiocManager)" \
-e "BiocManager::install(c('GenomicRanges', 'ggpubr', 'RBGL', 'graph'))"
# ------------------------------------------------------------------------------
# add the additional packages not available in the basic version
# ------------------------------------------------------------------------------
# needs to be done via BiocManager!
RUN R -e "library(BiocManager)" \
-e "BiocManager::install(c('Biostrings', 'BSgenome','BSgenome.Hsapiens.UCSC.hg19','BSgenome.Mmusculus.UCSC.mm10','DESeq','DESeq2','edgeR','Homo.sapiens','GO.db','GOstats','GSEABase','illuminaHumanv3.db','FDb.InfiniumMethylation.hg19','Mus.musculus','OrganismDbi','org.Hs.eg.db','org.Mm.eg.db','Rgraphviz','ROCR','rtracklayer','TxDb.Hsapiens.UCSC.hg19.knownGene','TxDb.Mmusculus.UCSC.mm10.ensGene','TxDb.Mmusculus.UCSC.mm10.knownGene','VariantAnnotation'))"
RUN R -e "library(BiocManager)" \
-e "BiocManager::install(c('Rsamtools', 'biomaRt'))"
# ------------------------------------------------------------------------------
# show list of all installed packages
# ------------------------------------------------------------------------------
RUN R -e "sort(unname(installed.packages()[, 'Package']))"
# ------------------------------------------------------------------------------
# some clean up..
# ------------------------------------------------------------------------------
#system
RUN rm -rf /var/lib/apt/lists/* \
&& apt-get clean \
&& apt-get purge
# R
RUN rm -rf /tmp/downloaded_packages/ /tmp/*.rds
# ------------------------------------------------------------------------------
# prepare the Rstudio authentication script
# ------------------------------------------------------------------------------
# path used in the start_rstudio script
COPY rstudio_light_auth.sh /bin/
RUN chmod +x /bin/rstudio_light_auth.sh && \
ln -s -r /bin/rstudio_light_auth.sh /bin/rstudio_light_auth
# ------------------------------------------------------------------------------
# prepare the rstudio start script
# ------------------------------------------------------------------------------
COPY start_rstudio.sh /bin/
RUN chmod +x /bin/start_rstudio.sh && \
ln -s -r /bin/start_rstudio.sh /bin/start_rstudio
# ------------------------------------------------------------------------------
# finally, copy the actual dockerfile to the container for documentation
# ------------------------------------------------------------------------------
COPY DOCKERFILE /DOCKERFILE
# all done.
# server can now be started by calling '/bin/start_rstudio <port>' in the image