-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile
52 lines (44 loc) · 1.19 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
# jupyterlab with extension
FROM alpine:latest
ENV PYTHONUNBUFFERED 1
WORKDIR /app
# install build dependencies
RUN apk update && \
apk add \
ca-certificates \
python3 \
libzmq \
lapack \
libpng \
freetype \
nodejs nodejs-npm \
&& apk --update add --no-cache --virtual=build_dependencies \
python3-dev \
musl-dev \
zeromq-dev \
lapack-dev \
gcc \
make \
freetype-dev \
gfortran \
g++ \
libstdc++ \
linux-headers \
libpng-dev \
&& ln -s /usr/include/locale.h /usr/include/xlocale.h
COPY . .
RUN python3 -m pip install --no-cache-dir --upgrade pip \
&& python3 -m pip install --no-cache-dir --upgrade -r ./freezed-requirements.txt \
&& npm install -g npm \
&& npm install \
&& npm run build \
&& apk del --purge -r build_dependencies \
&& rm -rf /var/cache/apk/* \
&& jupyter labextension link . \
&& mkdir /notebooks \
&& mv *.ipynb /notebooks
EXPOSE 80
VOLUME /notebooks
CMD ["jupyter", "lab", "--allow-root", "--no-browser", \
"--port", "80", "--ip", "0.0.0.0", \
"--notebook-dir", "/notebooks"]