Skip to content

Instantly share code, notes, and snippets.

@gingerhot
Forked from aprossi/jupyterlab-docker.md
Created October 23, 2017 07:17
Show Gist options
  • Save gingerhot/8ad06d67c8be50ed6296338dfb224414 to your computer and use it in GitHub Desktop.
Save gingerhot/8ad06d67c8be50ed6296338dfb224414 to your computer and use it in GitHub Desktop.

Run Jupyterlab on docker

Build starting from a Jupyter 2.x image.

Build

docker build -t jupyterlab .

using the following Dockerfile

FROM jupyter/datascience-notebook
MAINTAINER apr
RUN pip install npm
RUN pip install jupyterlab
RUN jupyter serverextension enable --py jupyterlab

Run

see https://github.com/jupyter/docker-stacks/tree/master/datascience-notebook and https://github.com/jupyter/jupyterlab

docker run --rm -ti -p 8888:8888 jupyterlab:latest /bin/bash

and then from within bash

jovyan@6fde26ed0fda:~/work$ jupyter lab

or, mounting local directory (after that one should run from the shell jupyter lab):

docker run --rm -ti -v `pwd`:/home/jovyan/work/data -p 8888:8888 jupyterlab:latest /bin/bash

or, launching without interactive terminal

docker run --rm -v `pwd`:/home/jovyan/work/data -p 8888:8888 jupyterlab:latest /opt/conda/bin/jupyter lab

a browser window open on localhost:8888 should return:

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