-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
30 lines (24 loc) · 896 Bytes
/
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
# docker build -t johnkit/pygeojs .
# docker run --rm -it -p 8888:8888 --hostname localhost johnkit/pygeojs
# Find the URL in the console and open browser to that url
FROM jupyter/base-notebook
# Install jupyterlab widget manager (needed for custom widgets)
RUN jupyter labextension install @jupyter-widgets/jupyterlab-manager
# Copy source files
USER root
ADD ./ /home/$NB_USER/pygeojs
RUN chown -R ${NB_UID}:${NB_UID} ${HOME}
USER ${NB_USER}
# Build autogen files
WORKDIR /home/$NB_USER/pygeojs/js
RUN npm install
RUN npm run autogen
# Install JupyterLab extension
WORKDIR /home/$NB_USER/pygeojs
RUN python setup.py install
RUN jupyter nbextension install --py --symlink --sys-prefix pygeojs
RUN jupyter nbextension enable --py --sys-prefix pygeojs
RUN jupyter labextension install js
# Setup entry point
WORKDIR /home/$NB_USER/pygeojs/notebooks
CMD ["jupyter", "lab", "--ip", "0.0.0.0"]