-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
102 lines (97 loc) · 3.23 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
FROM akabe/iocaml:debian8_ocaml4.04.1
ENV TENSORFLOW_VERSION 1.1.0
ENV LD_LIBRARY_PATH /usr/lib:$LD_LIBRARY_PATH
ENV LIBRARY_PATH /usr/lib:$LIBRARY_PATH
ADD iocaml-datascience-extra.list /etc/apt/sources.list.d/iocaml-datascience-extra.list
RUN curl -L "https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-cpu-linux-x86_64-${TENSORFLOW_VERSION}.tar.gz" | sudo tar xz -C /usr && \
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xcbcb082a1bb943db && \
sudo apt-get update && \
sudo apt-get install -y \
rsync \
aspcud \
bzip2 \
gfortran \
ssh \
libffi-dev \
libblas-dev \
liblapack-dev \
libgsl0-dev \
libfftw3-dev \
libsvm-dev \
libcairo2-dev \
libmariadb-dev \
libpq-dev \
libsqlite3-dev \
libcurl4-openssl-dev \
libgmp-dev \
imagemagick \
ffmpeg && \
sudo ln -sf /usr/lib/x86_64-linux-gnu/libmysqlclient.so.20 /usr/lib/libmysqlclient.so && \
\
eval $(opam config env) && \
\
opam update && \
opam upgrade -y && \
(opam install -y batteries lwt_ssl tls 'cohttp>=0.22.0' || :) && \
opam install -y \
num \
'core>=v0.9.0' \
'async>=v0.9.0' \
lacaml \
slap \
lbfgs \
ocephes \
oml \
gsl \
gpr \
fftw3 \
'cairo2>=0.5' \
archimedes \
mysql \
'mariadb>=0.8.1' \
postgresql \
sqlite3 \
ocurl \
'oasis>=0.4.0' && \
\
: install libsvm && \
curl -L https://bitbucket.org/ogu/libsvm-ocaml/downloads/libsvm-ocaml-0.9.3.tar.gz \
-o /tmp/libsvm-ocaml-0.9.3.tar.gz && \
tar zxf /tmp/libsvm-ocaml-0.9.3.tar.gz -C /tmp && \
( \
cd /tmp/libsvm-ocaml-0.9.3 && \
oasis setup && \
./configure --prefix=$(opam config var prefix) && \
make && \
make install \
) && \
rm -rf /tmp/libsvm-ocaml-0.9.3.tar.gz /tmp/libsvm-ocaml-0.9.3 && \
\
: install tensorflow && \
curl -L "https://github.com/LaurentMazare/tensorflow-ocaml/archive/0.0.10.1.tar.gz" \
-o /tmp/tensorflow-ocaml-0.0.10.1.tar.gz && \
tar zxf /tmp/tensorflow-ocaml-0.0.10.1.tar.gz -C /tmp && \
( \
cd /tmp/tensorflow-ocaml-0.0.10.1 && \
sed -i 's/(no_dynlink)//' src/wrapper/jbuild && \
sed -i 's/(modes (native))//' src/wrapper/jbuild \
) && \
opam pin add -y /tmp/tensorflow-ocaml-0.0.10.1 && \
rm -rf /tmp/tensorflow-ocaml-0.0.10.1.tar.gz /tmp/tensorflow-ocaml-0.0.10.1 && \
\
find $HOME/.opam -regex '.*\.\(cmt\|cmti\|annot\|byte\)' -delete && \
rm -rf $HOME/.opam/archives \
$HOME/.opam/repo/default/archives \
$HOME/.opam/$OCAML_VERSION/man \
$HOME/.opam/$OCAML_VERSION/build && \
\
opam uninstall oasis && \
\
sudo apt-get purge -y rsync aspcud bzip2 gfortran && \
sudo apt-get autoremove -y && \
sudo apt-get autoclean
ADD custom.css /home/opam/.jupyter/custom/custom.css
ADD notebook.json /home/opam/.jupyter/nbconfig/notebook.json
RUN sudo chown opam:opam -R /home/opam/.jupyter && \
curl -L https://raw.githubusercontent.com/andrewray/iocaml/master/profile/static/custom/iocamlnblogo.png \
-o /home/opam/.jupyter/custom/iocamlnblogo.png