diff --git a/examples/jupyterlab/Dockerfile b/examples/jupyterlab/Dockerfile new file mode 100644 index 0000000..8ffd8cf --- /dev/null +++ b/examples/jupyterlab/Dockerfile @@ -0,0 +1,10 @@ +# Copyright (c) Jupyter Development Team. +# Distributed under the terms of the Modified BSD License. + +FROM jupyter/scipy-notebook:18e5563b7486 + +# Install jupyterlab +RUN conda install -c conda-forge jupyterlab +RUN jupyter serverextension enable --py jupyterlab --sys-prefix + +USER jovyan diff --git a/examples/jupyterlab/README.md b/examples/jupyterlab/README.md new file mode 100644 index 0000000..39363f1 --- /dev/null +++ b/examples/jupyterlab/README.md @@ -0,0 +1,31 @@ +# JupyterLab Example + +This is an example of using JupyterLab as the single-user Notebook server image with JupyterHub. The example builds a Docker image that installs the `jupyterlab` notebook server extension. + +## Build the Image + +Build and tag the image using the `Dockerfile` in this directory. + +``` +docker build -t jupyterlab . +``` + +## Run JupyterHub Container + +To have JupyterHub spawn the `jupyterlab` image for single-user Notebook +servers, set the following environment variables before you run the JupyterHub container. + +``` +export DOCKER_NOTEBOOK_IMAGE=jupyterlab +export DOCKER_SPAWN_CMD="start-singleuser.sh --SingleUserNotebookApp.default_url=/lab" +``` + +Then run the following **from the root directory** of this repository: + +``` +# bring down the JupyterHub container, if running +docker-compose down + +# bring it back up +docker-compose up -d +```