-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeepstan.docker
More file actions
35 lines (26 loc) · 1.36 KB
/
deepstan.docker
File metadata and controls
35 lines (26 loc) · 1.36 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
############################################################
# Dockerfile to build DeepStan docker image
# Build with `docker build -t deepstan -f deepstan.docker .`
# Run with `docker run -ti --rm -v `pwd`:/home/opam/artifact deepstan bash`
############################################################
FROM ocaml/opam2:4.07
USER opam
RUN sudo apt-get -y update && \
sudo apt-get -y install \
git build-essential m4 unzip pkg-config libpcre3-dev mingw-w64 gcc wget gawk python3 python3-pip curl gnupg
RUN sudo ln -s /usr/bin/python3 /usr/bin/python & \
sudo ln -s /usr/bin/pip3 /usr/bin/pip
RUN curl -fsSL https://bazel.build/bazel-release.pub.gpg | gpg --dearmor > bazel.gpg && \
sudo mv bazel.gpg /etc/apt/trusted.gpg.d/ && \
echo "deb [arch=amd64] https://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list && \
sudo apt update && sudo apt install -y bazel
RUN opam switch create 4.07.0 && opam switch 4.07.0
RUN opam pin -y -k git git+https://github.com/deepppl/stanc3.git
COPY --chown=opam . /home/opam/evaluation
WORKDIR /home/opam/evaluation
RUN git submodule init && git submodule update
RUN pip install --upgrade pip
RUN pip install -r requirements.txt
RUN pip install posteriordb/python
RUN python /home/opam/.local/lib/python3.7/site-packages/cmdstanpy/install_cmdstan.py
WORKDIR /home/opam/evaluation