Skip to content

Instantly share code, notes, and snippets.

@parente
Last active June 15, 2017 03:06
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parente/0d735d93cb81a582d635 to your computer and use it in GitHub Desktop.
Save parente/0d735d93cb81a582d635 to your computer and use it in GitHub Desktop.
Reference Dockerfile for combining jupyter_dashboards and jupyter_declarative widgets
docker build --rm -t jupyter/extended-notebook .
docker run --rm -it -p 8888:8888 jupyter/extended-notebook
# Pin to a known release for sanity
FROM jupyter/all-spark-notebook:0017b56d93c9
# Become root to do the apt-gets
USER root
RUN apt-get update && \
apt-get install -y curl && \
curl --silent --location https://deb.nodesource.com/setup_0.12 | sudo bash - && \
apt-get install --yes nodejs npm && \
ln -s /usr/bin/nodejs /usr/bin/node && \
npm install -g bower
# Do the pip installs as the unprivileged notebook user
USER jovyan
# Install dashboard layout and preview within Jupyter Notebook
RUN pip install jupyter_dashboards && \
jupyter dashboards install --user --symlink && \
jupyter dashboards activate
# Install declarative widgets for Jupyter Notebook
RUN pip install jupyter_declarativewidgets && \
jupyter declarativewidgets install --user --symlink && \
jupyter declarativewidgets activate
# Install content management to support dashboard bundler options
RUN pip install jupyter_cms && \
jupyter cms install --user --symlink && \
jupyter cms activate
RUN pip install jupyter_dashboards_bundlers && \
jupyter dashboards_bundlers activate
# Stay as jovyan in the newer docker stack images
@parente
Copy link
Author

parente commented Dec 30, 2015

Updated on 2015-12-30 to include the dashboard bundlers package.

@parente
Copy link
Author

parente commented Jan 19, 2016

Updated on 2016-01-18 to symlink nodejs as node.

@parente
Copy link
Author

parente commented Jan 21, 2016

Updated on 2016-01-21 to account for install / activate separation in new incubator project releases.

@parente
Copy link
Author

parente commented Feb 4, 2016

Updated on 2016-02-04 to fix missing -y.

@parente
Copy link
Author

parente commented Feb 14, 2016

Updated on 2016-02-13 to bump base docker image tag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment