Skip to content

Instantly share code, notes, and snippets.

@ilya2049
Forked from aprossi/jupyterlab-docker.md
Last active June 15, 2019 12:13
Show Gist options
  • Save ilya2049/5933ea1a22ef21c8e036ec6f5e819952 to your computer and use it in GitHub Desktop.
Save ilya2049/5933ea1a22ef21c8e036ec6f5e819952 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