forked from owlbarn/owl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
49 lines (33 loc) · 1.8 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
############################################################
# Dockerfile to build Owl docker image
# Based on ryanrhymes/owl master branch
# By Liang Wang <[email protected]>
############################################################
FROM ubuntu:latest
MAINTAINER Liang Wang
##################### PREREQUISITES ########################
RUN apt-get update
RUN apt-get -y install git build-essential ocaml wget unzip aspcud m4 pkg-config
RUN apt-get -y install camlp4-extra libshp-dev libplplot-dev
RUN apt-get -y install libopenblas-dev liblapacke-dev
RUN apt-get -y install opam && yes | opam init && eval $(opam config env)
RUN opam update && opam switch 4.06.0 && eval $(opam config env)
RUN opam install -y oasis jbuilder ocaml-compiler-libs ctypes utop plplot
#################### SET UP ENV VARS #######################
ENV PATH /root/.opam/4.06.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:$PATH
ENV CAML_LD_LIBRARY_PATH /root/.opam/4.06.0/lib/stublibs
ENV EIGENPATH /root/eigen
RUN cd /root && git clone https://github.com/ryanrhymes/eigen.git
RUN sed -i -- 's/-flto/ /g' $EIGENPATH/lib/Makefile ###FIXME
RUN sed -i -- 's/-flto/ /g' $EIGENPATH/_oasis ###FIXME
RUN make -C $EIGENPATH oasis && make -C $EIGENPATH && make -C $EIGENPATH install
################## INSTALL OWL LIBRARY #####################
ENV OWLPATH /root/owl
RUN cd /root && git clone https://github.com/ryanrhymes/owl.git
RUN sed -i -- 's/-lopenblas/-lopenblas -llapacke/g' $OWLPATH/src/owl/jbuild # FIXME: hacking
RUN make -C $OWLPATH && make -C $OWLPATH install
RUN mv /root/.opam/4.06.0/lib/stubslibs/* /root/.opam/4.06.0/lib/stublibs # FIXME: hacking
############## SET UP DEFAULT CONTAINER VARS ##############
RUN echo "#require \"owl_top\";; open Owl;;" >> /root/.ocamlinit
WORKDIR $OWLPATH
ENTRYPOINT /bin/bash