gophernotes/Dockerfile.DS
Sebastien Binet 3ed8fe3fe3 all: update Dockerfiles to alpine-3.15
Fixes #235.

Signed-off-by: Sebastien Binet <binet@cern.ch>
2022-01-26 10:01:53 +01:00

79 lines
2.4 KiB
Docker

FROM alpine:3.15
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.15/community \
--repository http://dl-4.alpinelinux.org/alpine/v3.15/main \
--arch=x86_64 add \
ca-certificates \
g++ \
gcc \
git \
libffi-dev \
pkgconfig \
python3 python3-dev \
py3-pip \
py3-pyzmq \
mercurial \
mesa-dev \
musl-dev \
su-exec \
zeromq-dev \
&& pip3 install --upgrade pip==21.3.1 \
&& cp /usr/bin/python3.9 /usr/bin/python \
## install Go
&& apk --update-cache \
--arch=x86_64 add \
go \
## jupyter notebook
&& ln -s /usr/include/locale.h /usr/include/xlocale.h \
&& pip3 install jupyter notebook pyzmq tornado ipykernel \
## 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 gonum.org/v1/plot/... \
&& go get gonum.org/v1/gonum/... \
&& go get github.com/go-gota/gota/... \
&& go get github.com/sajari/regression \
&& go get github.com/sjwhitworth/golearn/... \
&& go get go-hep.org/x/hep/csvutil/... \
&& go get go-hep.org/x/hep/fit \
&& go get 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.9 -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" ]