This repository contains scrips for starting JupyterLab in Docker. The scripts are optimized for UBC DSCI and STAT working environments.
- Run
run.sh
to start JupyterLab. Then use the printed link to access Jupyter from the browser - Put some files to the
materials/
directory. They'll become available in Jupyter, so you can work on them there
- Run
uninstall.sh
to stop the local JupyterLab
After you close Jupyter, the files you put in the materials/
directory are saved there.
The JupyterLab image is based on the official UBC Docker images, but has some additions.
- Jupyter spellcheck extension
- The scripts work for any UBC DSCI and STAT courses that use Jupyter. Just change/uncomment the
image
variable in the.env
file and start the container - Run
update.sh
to pull a newer UBC JupyterLab Docker image specified in the.env
file. This image will be used for subsequent container startups. Only the latest uncommentedimage
will be used
-
If you're working with private repositories, you can mount your ssh-key into the container's
$HOME
directory by adding this line to thedocker-compose.yaml
undervolumes
:- ~/.ssh/:/home/jovyan/.ssh/:ro
Make sure that the
$HOME
directory of the container matches the one you specify in thedocker-compose.yaml
. In this case, it is/home/jovyan/
, but it may change in newer versions of the JupyterLab image. To check the$HOME
directory of the container, type# Get names of running containers docker container ls --format {{.Names}} # Get $HOME value of the container, # change <container-name> to your container docker container exec <container-name> bash -c 'echo $HOME'
-
If there are no files in JupyterLab after you add them to the
materials/
directory, check the path to the container's$HOME
directory in thedocker-compose.yaml
file undervolumes
using the steps above
The JupyterLab images are based on UBC images from: