Skip to content

Creating a docker image from jupyter notebook with jupyter-nodejs kernel #19

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

Open
jan-osch opened this issue Jan 18, 2016 · 3 comments
Open

Comments

@jan-osch
Copy link

Hi!
Note: I am new both to jupyter and docker.
I am struggling to create a docker image from the base image: https://github.com/jupyter/notebook/ that would also contain jupyter-nodejs.
I added nodejs to the new image via ubuntu apt-get but jupyter-nodejs installation always fails in some way. Could you share some advice / help me to create such image?

I think such a docker image with nice web jupyter notebook for python and nodejs would be extremely useful.

@jaredly
Copy link
Member

jaredly commented Jan 19, 2016

What's the error you're getting? I've done a decent amount of docker, so I can probably help.

@jan-osch
Copy link
Author

Managed to fix it. Here is a working Dockerfile

#jupyter node.js + python2 + python3 as docker container
FROM jupyter/notebook


# install wget
RUN apt-get update
RUN apt-get install -y wget

# install nodejs
WORKDIR /tmp
RUN wget https://nodejs.org/download/release/v0.12.9/node-v0.12.9-linux-x64.tar.gz
RUN tar xzf node-v0.12.9-linux-x64.tar.gz
RUN sudo cp -rp node-v0.12.9-linux-x64 /usr/local/
RUN sudo ln -s /usr/local/node-v0.12.9-linux-x64 /usr/local/node
ENV PATH /usr/local/node/bin:$PATH

# install jupyter-nodejs
RUN mkdir -p  $HOME/.ipython/kernels/nodejs
RUN wget https://github.com/notablemind/jupyter-nodejs/releases/download/v1.1.0/jupyter-nodejs-1.1.0.tgz
RUN tar xf jupyter-nodejs-1.1.0.tgz
WORKDIR /tmp/package
RUN npm install && node install.js

# change directory back to /notebooks
WORKDIR /notebooks

@jaredly
Copy link
Member

jaredly commented Jan 21, 2016

glad to hear it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants