-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
60 lines (47 loc) · 1.63 KB
/
Dockerfile
File metadata and controls
60 lines (47 loc) · 1.63 KB
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
ARG DOWNLOAD_STATIC_LIBV8=1
FROM rocker/tidyverse:4.2.3
RUN apt-get update && apt-get install -y curl g++ build-essential
RUN wget https://github.com/quarto-dev/quarto-cli/releases/download/v1.8.21/quarto-1.8.21-linux-amd64.deb
RUN apt-get install ./quarto-1.8.21-linux-amd64.deb
RUN install2.r --error --skipinstalled -r https://mc-stan.org/r-packages/ -r getOption \
abind \
checkmate \
cmdstanr \
coda \
dagitty \
devtools \
distributional \
loo \
matrixStats \
mvtnorm \
numDeriv \
posterior \
rmarkdown \
shape \
tensorA \
V8
# Install CmdStan
RUN R -e 'library(cmdstanr); install_cmdstan()'
# Run CmdStan Tests
RUN cd /root/.cmdstan/cmdstan-* && \
make examples/bernoulli/bernoulli && \
./examples/bernoulli/bernoulli sample data file=examples/bernoulli/bernoulli.data.json && \
test -f output.csv && \
wc -l output.csv && \
bin/stansummary output.csv && \
rm output.csv
# Install Rethinking
RUN R -e 'devtools::install_github("rmcelreath/rethinking")'
# Install vscode
RUN curl -fsSL https://code-server.dev/install.sh | sh
# Create VSCode Server config
RUN mkdir -p ~/.config/code-server && \
echo "bind-addr: 0.0.0.0:8080" > ~/.config/code-server/config.yaml && \
echo "auth: password" >> ~/.config/code-server/config.yaml && \
echo "password: yourpassword" >> ~/.config/code-server/config.yaml
# Expose ports for RStudio and VSCode
EXPOSE 8787 8080
# Start VSCode Server in the background
CMD code-server --bind-addr 0.0.0.0:8080 --auth password
# To start RStudio Server instead, comment the previous line and uncomment the next one
# CMD /init