Add JupyterLab example
(c) Copyright IBM Corp. 2016
This commit is contained in:
parent
2a43a89dfb
commit
6d6411d8f7
10
examples/jupyterlab/Dockerfile
Normal file
10
examples/jupyterlab/Dockerfile
Normal 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
|
31
examples/jupyterlab/README.md
Normal file
31
examples/jupyterlab/README.md
Normal 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
|
||||||
|
```
|
Loading…
Reference in New Issue
Block a user