Add JupyterLab example

(c) Copyright IBM Corp. 2016
This commit is contained in:
Justin Tyberg 2016-11-15 19:39:31 -05:00
parent 2a43a89dfb
commit 6d6411d8f7
2 changed files with 41 additions and 0 deletions

View File

@ -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

View File

@ -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
```