-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile.jupyter
36 lines (28 loc) · 1.22 KB
/
Dockerfile.jupyter
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
ARG BASE_IMAGE=
FROM ${BASE_IMAGE}
MAINTAINER Thingpedia Admins <[email protected]>
USER root
RUN dnf -y install file wget && dnf clean all
RUN curl -L "https://storage.googleapis.com/kubernetes-release/release/v1.17.13/bin/linux/amd64/kubectl" -o /usr/local/bin/kubectl && \
chmod +x /usr/local/bin/kubectl
RUN pip3 install \
jupyter jupyterlab jupyterlab-git matplotlib \
kfp kubeflow-metadata
RUN npm install -g tslab
# add user jovyan (jupyter notebook hardcoded user)
RUN useradd -ms /bin/bash -u 1001 jovyan && id jovyan
ENV NB_USER=jovyan
ENV NB_UID=1001
ENV HOME=/home/jovyan
ENV NB_PREFIX /
ENV PATH=$HOME/.local/bin:$HOME/.yarn/bin:$PATH
ENV MINIO_ENDPOINT=minio-service.kubeflow:9000
RUN python3 -m ipykernel.kernelspec
RUN tslab install --python=python3
RUN jupyter lab build
ENV TINI_VERSION v0.19.0
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /usr/bin/tini
RUN chmod +x /usr/bin/tini
ENTRYPOINT ["/usr/bin/tini", "--"]
USER jovyan
CMD ["bash", "-l", "-c", "jupyter lab --notebook-dir=/home/jovyan --ip=0.0.0.0 --no-browser --allow-root --port=8888 --NotebookApp.token='' --NotebookApp.password='' --NotebookApp.allow_origin='*' --NotebookApp.base_url=${NB_PREFIX}"]