Skip to content

Commit 6d6411d

Browse files
author
Justin Tyberg
committed
Add JupyterLab example
(c) Copyright IBM Corp. 2016
1 parent 2a43a89 commit 6d6411d

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed

examples/jupyterlab/Dockerfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Copyright (c) Jupyter Development Team.
2+
# Distributed under the terms of the Modified BSD License.
3+
4+
FROM jupyter/scipy-notebook:18e5563b7486
5+
6+
# Install jupyterlab
7+
RUN conda install -c conda-forge jupyterlab
8+
RUN jupyter serverextension enable --py jupyterlab --sys-prefix
9+
10+
USER jovyan

examples/jupyterlab/README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# JupyterLab Example
2+
3+
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.
4+
5+
## Build the Image
6+
7+
Build and tag the image using the `Dockerfile` in this directory.
8+
9+
```
10+
docker build -t jupyterlab .
11+
```
12+
13+
## Run JupyterHub Container
14+
15+
To have JupyterHub spawn the `jupyterlab` image for single-user Notebook
16+
servers, set the following environment variables before you run the JupyterHub container.
17+
18+
```
19+
export DOCKER_NOTEBOOK_IMAGE=jupyterlab
20+
export DOCKER_SPAWN_CMD="start-singleuser.sh --SingleUserNotebookApp.default_url=/lab"
21+
```
22+
23+
Then run the following **from the root directory** of this repository:
24+
25+
```
26+
# bring down the JupyterHub container, if running
27+
docker-compose down
28+
29+
# bring it back up
30+
docker-compose up -d
31+
```

0 commit comments

Comments
 (0)