-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
80 lines (60 loc) · 2.67 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
FROM ocaml/opam:debian-10-ocaml-4.12
RUN mkdir tutorial
WORKDIR tutorial/
COPY . .
RUN sudo rm -rf _build
# Python stuff
RUN sudo apt-get -y update && \
sudo apt-get install -y build-essential python3.6 python3-pip python3-dev && \
sudo pip3 -q install pip --upgrade && \
sudo pip3 install jupyter && sudo pip3 install jupyter-contrib-nbextensions && \
jupyter contrib nbextension install --user && \
jupyter nbextension enable code_prettify/code_prettify && \
sudo apt-get -y install wget unzip pkg-config gfortran \
libplplot-dev libopenblas-dev liblapacke-dev gnuplot \
libgmp-dev libzmq3-dev && \
opam install -y dune base owl jupyter fpath bos merlin \
ocamlformat ppx_inline_test ppx_accessor accessor accessor_base && \
eval $(opam env)
ENV PATH=$HOME/.opam/4.12/bin:$PATH
RUN ocaml-jupyter-opam-genspec && \
sudo jupyter kernelspec install --name ocaml-jupyter $HOME/.opam/4.12/share/jupyter && \
git clone https://github.com/tachukao/dilqr.git $HOME/dilqr && \
git clone https://github.com/tachukao/owl_bmo.git $HOME/owl_bmo && \
git clone https://github.com/hennequin-lab/comm.git $HOME/comm && \
git clone https://github.com/hennequin-lab/owl_parameters.git $HOME/owl_parameters && \
git clone https://github.com/hennequin-lab/adam.git $HOME/adam && \
git clone https://github.com/hennequin-lab/gp.git $HOME/gp && \
git clone https://github.com/hennequin-lab/juplot.git $HOME/juplot && \
git clone https://github.com/marineschimel/ilqr_vae.git $HOME/ilqr_vae && \
git clone https://github.com/hennequin-lab/cmdargs.git $HOME/cmdargs
WORKDIR $HOME/comm
RUN git checkout no-mpi && dune build @install && dune install
WORKDIR $HOME/adam
RUN dune build @install && dune install
WORKDIR $HOME/owl_bmo
RUN dune build @install && dune install
WORKDIR $HOME/cmdargs
RUN dune build @install && dune install
WORKDIR $HOME/dilqr
RUN git checkout tutorial && dune build @install && dune install
WORKDIR $HOME/gp
RUN dune build @install && dune install
WORKDIR $HOME/juplot
RUN dune build @install && dune install
WORKDIR $HOME/owl_parameters
RUN dune build @install && dune install
WORKDIR $HOME/ilqr_vae
RUN git checkout tutorial && dune build @install && dune install
WORKDIR $HOME/tutorial
RUN mkdir -p $HOME/.jupyter/nbconfig
RUN cp notebook.json $HOME/.jupyter/nbconfig
ENV TINI_VERSION v0.6.0
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /usr/bin/tini
RUN sudo chmod +x /usr/bin/tini
ENTRYPOINT ["/usr/bin/tini", "--"]
RUN sudo chown -R opam .
RUN sudo chgrp -R opam .
RUN rm -f .git/config && mv config_docker .git/config
RUN echo "#use \"topfind\";;" > $HOME/.ocamlinit
CMD ["bash"]