-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
137 lines (117 loc) · 4.41 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
FROM rocker/tidyverse:4.3.1
#COPY build/Rprofile.site /usr/local/lib/R/etc/
#COPY build/Renviron.site /usr/local/lib/R/etc/
ENV TZ=Europe/Dublin
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime \
&& echo $TZ > /etc/timezone \
&& apt-get update \
&& apt-get upgrade -y \
&& apt-get install -y --no-install-recommends \
byobu \
clang \
ditaa \
graphviz \
htop \
less \
libclang-dev \
libglpk-dev \
libgsl-dev \
libnlopt-dev \
libomp-dev \
p7zip-full \
pbzip2 \
rsyslog \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir -p $HOME/.R \
&& echo "" > $HOME/.R/Makevars \
&& echo "CC=clang" >> $HOME/.R/Makevars \
&& echo "CXX=clang++" >> $HOME/.R/Makevars \
&& echo "CXXFLAGS=-Os" >> $HOME/.R/Makevars \
&& echo "CXXFLAGS+= -Wno-unused-variable -Wno-unused-function" >> $HOME/.R/Makevars \
&& echo "CXXFLAGS+= -Wno-unknown-pragmas -Wno-macro-redefined" >> $HOME/.R/Makevars \
&& echo "" >> $HOME/.R/Makevars \
&& echo "CC11=clang" >> $HOME/.R/Makevars \
&& echo "CXX11=clang++" >> $HOME/.R/Makevars \
&& echo "CXX11FLAGS=-Os" >> $HOME/.R/Makevars \
&& echo "CXX11FLAGS+= -Wno-unused-variable -Wno-unused-function" >> $HOME/.R/Makevars \
&& echo "CXX11FLAGS+= -Wno-unknown-pragmas -Wno-macro-redefined" >> $HOME/.R/Makevars \
&& echo "" >> $HOME/.R/Makevars \
&& echo "CC14=clang" >> $HOME/.R/Makevars \
&& echo "CXX14=clang++" >> $HOME/.R/Makevars \
&& echo "CXX14FLAGS=-Os" >> $HOME/.R/Makevars \
&& echo "CXX14FLAGS+= -Wno-unused-variable -Wno-unused-function" >> $HOME/.R/Makevars \
&& echo "CXX14FLAGS+= -Wno-unknown-pragmas -Wno-macro-redefined" >> $HOME/.R/Makevars \
&& echo "" >> $HOME/.R/Makevars \
&& echo "CC17=clang++" >> $HOME/.R/Makevars \
&& echo "CXX17=clang++" >> $HOME/.R/Makevars \
&& echo "CXX17FLAGS=-Os" >> $HOME/.R/Makevars \
&& echo "CXX17FLAGS+= -Wno-unused-variable -Wno-unused-function" >> $HOME/.R/Makevars \
&& echo "CXX17FLAGS+= -Wno-unknown-pragmas -Wno-macro-redefined" >> $HOME/.R/Makevars \
&& echo "" >> $HOME/.R/Makevars \
&& install2.r --error \
anytime \
bayesplot \
brms \
BTYD \
BTYDplus \
CLVTools \
conflicted \
cowplot \
DataExplorer \
directlabels \
evir \
fitdistrplus \
fs \
furrr \
loo \
markdown \
modeltime \
posterior \
projpred \
prophet \
pryr \
quarto \
rfm \
rstan \
rstanarm \
rsyslog \
sessioninfo \
shinybrms \
shinystan \
snakecase \
tictoc \
tidybayes \
tidyquant \
timetk
WORKDIR /tmp
COPY build/docker_install_sys_rpkgs.R /tmp
RUN Rscript /tmp/docker_install_sys_rpkgs.R
RUN git clone https://github.com/lindenb/makefile2graph.git \
&& cd makefile2graph \
&& make \
&& make install
RUN cp -r $HOME/.R /home/rstudio \
&& chown -R rstudio:rstudio /home/rstudio/.R
WORKDIR /home/rstudio
USER rstudio
COPY build/conffiles.7z /tmp
RUN 7z x /tmp/conffiles.7z \
&& cp conffiles/.bash* . \
&& cp conffiles/.gitconfig . \
&& cp conffiles/.Renviron . \
&& cp conffiles/.Rprofile . \
&& mkdir -p .config/rstudio \
&& cp conffiles/rstudio-prefs.json .config/rstudio/ \
&& rm -rfv conffiles/ \
&& touch /home/rstudio/.bash_eternal_history
COPY build/docker_install_user_rpkgs.R /tmp
RUN Rscript /tmp/docker_install_user_rpkgs.R
USER root
RUN chown -R rstudio:rstudio /home/rstudio \
&& chmod ugo+rx /home/rstudio \
&& chown -R rstudio:rstudio /home/rstudio/.cmdstan
ARG BUILD_DATE
LABEL org.opencontainers.image.source="https://github.com/kaybenleroll/btydbayes_investigation" \
org.opencontainers.image.authors="Mick Cooney <[email protected]>" \
org.label-schema.build-date=$BUILD_DATE