Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker container for nglview with jupyterlab #653

Merged
merged 6 commits into from Jul 23, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
36 changes: 16 additions & 20 deletions Dockerfile
@@ -1,23 +1,19 @@
FROM jupyter/notebook
# (optional) docker build . -f Dockerfile-jupyterlab -t hainm/juypterlab:0.25.2
# docker build . -t hainm/nglview:1.0.a0

# 2.7
RUN python -m pip install pip --upgrade
RUN python -m pip install numpy
RUN python -m pip install nglview==0.6.2.3
RUN python -m pip install ipywidgets==5.2.2
RUN python -m pip install pytraj==1.0.9
RUN python -m jupyter nbextension enable --py --sys-prefix widgetsnbextension
RUN python -m jupyter nbextension install --py --sys-prefix nglview
RUN python -m jupyter nbextension enable --py --sys-prefix nglview
# How to run?
# docker -it --rm -p 8888:8888 hainm/nglview:1.0.a0

# 3.4
RUN python3 -m pip install pip --upgrade
RUN python3 -m pip install numpy
RUN python3 -m pip install nglview==0.6.2.3
RUN python3 -m pip install ipywidgets==5.2.2
RUN python3 -m pip install pytraj==1.0.9
RUN python3 -m jupyter nbextension enable --py --sys-prefix widgetsnbextension
RUN python3 -m jupyter nbextension install --py --sys-prefix nglview
RUN python3 -m jupyter nbextension enable --py --sys-prefix nglview
FROM hainm/jupyterlab:0.25.2
RUN pip install numpy
RUN pip install pytraj

CMD ["jupyter", "notebook", "--no-browse"]
ADD . /opt/app/nglview

# nglview-js-widgets
RUN cd /opt/app/nglview/js && npm install . --save
RUN cd /opt/app/nglview && python setup.py install

# nglview-jupyterlab
RUN cd /opt/app/nglview && jupyter-labextension install jslab
CMD jupyter lab --ip=* --port=8888 --no-browser --notebook-dir=/opt/app/data --allow-root --NotebookApp.iopub_data_rate_limit=100000000
16 changes: 16 additions & 0 deletions Dockerfile-jupyterlab
@@ -0,0 +1,16 @@
# docker build . -f Dockerfile-jupyterlab -t hainm/juypterlab:0.25.2
#
FROM continuumio/miniconda3

RUN conda install notebook -c conda-forge -y
RUN pip install ipywidgets==7.0.0b0
RUN jupyter nbextension enable --py --sys-prefix widgetsnbextension

RUN conda install nodejs -c conda-forge -y
RUN conda install jupyterlab==0.25.2 -c conda-forge -y
RUN jupyter labextension install @jupyter-widgets/jupyterlab-manager # 0.24.7

# Expose Jupyter port & cmd
EXPOSE 8888
RUN mkdir -p /opt/app/data
CMD jupyter lab --ip=* --port=8888 --no-browser --notebook-dir=/opt/app/data --allow-root --NotebookApp.iopub_data_rate_limit=100000000
5 changes: 3 additions & 2 deletions circle.yml
Expand Up @@ -4,8 +4,9 @@ machine:

dependencies:
override:
- docker pull condaforge/linux-anvil
- docker pull continuumio/miniconda3

test:
override:
- docker build -t nglview:dev .
- docker build . -f Dockerfile-jupyterlab -t hainm/juypterlab-dev
- docker build . -t nglview:dev