-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
177 lines (144 loc) · 4.62 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
## Get R version 4.3.2
FROM rocker/r-ver:4.3.2
## Install packages
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
libudunits2-dev \
libssl-dev \
libgdal-dev \
libproj-dev \
libgeos-dev \
cmake \
libfontconfig1-dev \
libharfbuzz-dev \
libfribidi-dev \
glpk-utils \
libglpk-dev \
git \
&& rm -rf /var/lib/apt/lists/*
## A selection of tidyverse packages
RUN R -e "options(repos = \
list(CRAN = 'https://packagemanager.posit.co/cran/2023-12-01/')); \
install.packages('dplyr'); \
install.packages('lubridate'); \
install.packages('ggplot2'); \
install.packages('readr'); \
install.packages('stringr'); \
install.packages('tidyr'); \
install.packages('tidyverse'); \
"
RUN R -e "options(repos = \
list(CRAN = 'https://packagemanager.posit.co/cran/2023-12-01/')); \
install.packages('crayon'); \
install.packages('cli'); \
install.packages('validate'); \
"
RUN R -e "options(repos = \
list(CRAN = 'https://packagemanager.posit.co/cran/2023-12-01/')); \
install.packages('remotes'); \
"
## Project specific packages
RUN R -e "options(repos = \
list(CRAN = 'https://packagemanager.posit.co/cran/2023-12-01/')); \
remotes::install_github('open-AIMS/[email protected]'); \
"
## Shiny packages
RUN R -e "options(repos = \
list(CRAN = 'https://packagemanager.posit.co/cran/2023-12-01/')); \
install.packages('shiny'); \
install.packages('shinydashboard'); \
install.packages('shinyWidgets'); \
install.packages('shinyjs'); \
install.packages('shinyBS'); \
install.packages('shinyTree'); \
install.packages('fansi'); \
install.packages('DT'); \
install.packages('reactable'); \
install.packages('leaflet'); \
"
## Other packages
RUN R -e "options(repos = \
list(CRAN = 'https://packagemanager.posit.co/cran/2023-12-01/')); \
install.packages('markdown'); \
"
## Install extra packages required for tidyverse
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
libfontconfig1-dev \
libharfbuzz-dev \
libfribidi-dev \
&& rm -rf /var/lib/apt/lists/*
RUN R -e "options(repos = \
list(CRAN = 'https://packagemanager.posit.co/cran/2023-12-01/')); \
install.packages('tidyverse'); \
install.packages('testthat'); \
install.packages('assertthat'); \
"
RUN R -e "options(repos = \
list(CRAN = 'https://packagemanager.posit.co/cran/2023-12-01/')); \
install.packages('bookdown'); \
install.packages('rmarkdown'); \
"
RUN R -e "options(repos = \
list(CRAN = 'https://packagemanager.posit.co/cran/2023-12-01/')); \
install.packages('plotly'); \
"
## Install extra packages required for quarto
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
curl \
gdebi-core \
&& rm -rf /var/lib/apt/lists/*
ARG QUARTO_VERSION="1.3.450"
RUN curl -o quarto-linux-amd64.deb -L https://github.com/quarto-dev/quarto-cli/releases/download/v${QUARTO_VERSION}/quarto-${QUARTO_VERSION}-linux-amd64.deb
RUN gdebi --non-interactive quarto-linux-amd64.deb
RUN R -e "options(repos = \
list(CRAN = 'https://packagemanager.posit.co/cran/2023-12-01/')); \
install.packages('quarto'); \
"
RUN R -e "options(repos = \
list(CRAN = 'https://packagemanager.posit.co/cran/2023-12-01/')); \
install.packages('sf'); \
"
RUN R -e "options(repos = \
list(CRAN = 'https://packagemanager.posit.co/cran/2024-02-20/')); \
install.packages('rstan'); \
install.packages('brms'); \
install.packages('tidybayes'); \
install.packages('cmdstanr', repos = c('https://mc-stan.org/r-packages/', getOption('repos'))); \
remotes::install_github('stan-dev/cmdstanr'); \
library(cmdstanr); \
check_cmdstan_toolchain(); \
install_cmdstan(cores = 2); \
"
RUN R -e "options(repos = \
list(CRAN = 'https://packagemanager.posit.co/cran/2024-02-20/')); \
install.packages('emmeans'); \
install.packages('DHARMa'); \
install.packages('patchwork'); \
install.packages('brms'); \
"
RUN R -e "options(repos = \
list(CRAN = 'https://packagemanager.posit.co/cran/2024-02-20/')); \
install.packages('future'); \
install.packages('purrr'); \
install.packages('insight'); \
install.packages('HDInterval'); \
install.packages('gridGraphics'); \
"
RUN apt-get clean
# USER users
RUN mkdir /home/project
#RUN mkdir -p /home/project/input
#COPY R/ /home/project/R
#COPY parameters/ /home/project/parameters
#COPY md/ /home/project/md
COPY run.sh /home/project/run.sh
RUN mkdir /home/project1
COPY R/ /home/project1/R
COPY parameters/ /home/project1/parameters
COPY run.sh /home/project1/run.sh
WORKDIR /home/project1
# RUN cd ~/project
ENTRYPOINT ["/home/project1/run.sh"]
EXPOSE 3838