forked from gopherdata/gophernotes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.DS
77 lines (73 loc) · 2.63 KB
/
Dockerfile.DS
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
FROM alpine:3.5
MAINTAINER dwhitena
# Add gophernotes
ADD . /go/src/github.com/gopherdata/gophernotes/
# Install Jupyter and gophernotes.
RUN set -x \
# install python and dependencies
&& apk update \
&& apk --no-cache \
--repository http://dl-4.alpinelinux.org/alpine/v3.7/community \
--repository http://dl-4.alpinelinux.org/alpine/v3.7/main \
--arch=x86_64 add \
python3 \
su-exec \
gcc \
g++ \
git \
py3-zmq \
pkgconfig \
zeromq-dev \
musl-dev \
mercurial \
&& pip3 install --upgrade pip==9.0.3 \
&& cp /usr/bin/python3.6 /usr/bin/python \
## install Go
&& apk --update-cache --allow-untrusted \
--repository http://dl-4.alpinelinux.org/alpine/edge/community \
--arch=x86_64 add \
go \
## jupyter notebook
&& ln -s /usr/include/locale.h /usr/include/xlocale.h \
### fix pyzmq to v16.0.2 as that is what is distributed with py3-zmq
### pin down the tornado and ipykernel to compatible versions
&& pip3 install jupyter notebook pyzmq==16.0.2 tornado==4.5.3 ipykernel==4.8.1 \
## install gophernotes
&& cd /go/src/github.com/gopherdata/gophernotes \
&& export GOPATH=/go \
&& export GO111MODULE=on \
&& go install . \
&& cp /go/bin/gophernotes /usr/local/bin/ \
&& mkdir -p ~/.local/share/jupyter/kernels/gophernotes \
&& cp -r ./kernel/* ~/.local/share/jupyter/kernels/gophernotes \
&& cd - \
## get the relevant Go packages
&& go get -insecure gonum.org/v1/plot/... \
&& go get -insecure gonum.org/v1/gonum/... \
&& go get github.com/kniren/gota/... \
&& go get github.com/sajari/regression \
&& go get github.com/sjwhitworth/golearn/... \
&& go get -insecure go-hep.org/x/hep/csvutil/... \
&& go get -insecure go-hep.org/x/hep/fit \
&& go get -insecure go-hep.org/x/hep/hbook \
&& go get github.com/montanaflynn/stats \
&& go get github.com/boltdb/bolt \
&& go get github.com/patrickmn/go-cache \
&& go get github.com/chewxy/math32 \
&& go get github.com/chewxy/hm \
&& go get gorgonia.org/vecf64 \
&& go get gorgonia.org/vecf32 \
&& go get github.com/awalterschulze/gographviz \
&& go get github.com/leesper/go_rng \
&& go get github.com/pkg/errors \
&& go get github.com/stretchr/testify/assert \
## clean
&& find /usr/lib/python3.6 -name __pycache__ | xargs rm -r \
&& rm -rf \
/root/.[acpw]* \
ipaexg00301* \
&& rm -rf /var/cache/apk/*
# Set GOPATH.
ENV GOPATH /go
EXPOSE 8888
CMD [ "jupyter", "notebook", "--no-browser", "--allow-root", "--ip=0.0.0.0" ]