This repository has been archived by the owner on Oct 7, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
55 lines (45 loc) · 1.6 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
FROM r-base:3.6.2
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
jq \
libgdal-dev \
libopenblas-base \
libopenblas-dev \
libssl-dev \
libudunits2-dev \
lmodern \
texlive-luatex \
texlive-latex-extra \
texlive-latex-recommended \
texlive-fonts-recommended \
texlive-plain-generic \
zstd \
&& rm -rf /var/lib/apt/lists/*
RUN wget 'https://github.com/jgm/pandoc/releases/download/2.9.2.1/pandoc-2.9.2.1-1-amd64.deb' \
&& dpkg -i pandoc-2.9.2.1-1-amd64.deb \
&& rm pandoc-2.9.2.1-1-amd64.deb
RUN mkdir -p /root/.R /root/utils /root/bin
COPY .R /root/.R
RUN install2.r -n -1 -e corrplot data.table dplyr extraDistr ggplot2 gridExtra ggthemes jsonlite \
kableExtra loo precrec readxl rmarkdown R.utils sf testthat tidyr \
&& rm -rf /tmp/downloaded_packages/ /tmp/*.rds
RUN wget 'https://github.com/stan-dev/cmdstan/releases/download/v2.23.0/cmdstan-2.23.0.tar.gz' \
&& mkdir -p cmdstan \
&& tar -xvzf cmdstan-2.23.0.tar.gz --strip 1 -C cmdstan \
&& cd cmdstan && make build -j4 && cd ../ \
&& rm cmdstan-2.23.0.tar.gz
# Commandline tool to process cmdstan posteriors files
COPY utils/extract /root/utils/
RUN cd /root/utils \
&& make test \
&& make clean all \
&& mv extract /root/bin \
&& rm -rf /root/utils
RUN mkdir -p /proj/thesis.utils/
COPY R/thesis.utils /proj/thesis.utils/
WORKDIR /proj
RUN R CMD build thesis.utils \
&& R CMD check thesis.utils_*.tar.gz \
&& R CMD INSTALL thesis.utils_*.tar.gz \
&& rm -rf thesis.utils*
CMD ["R"]