Jupyter Lab

- Click on Interactive Apps in the top navigation menu
- Click on Jupyter Lab
Launching a Jupyter Lab server

- For lab account, input the name of your DCC group (list of all groups can be found here)
- Under partition, type in "common", or if your lab has dedicated resources, add your own partition. You may also use gpu-common or scavenger-gpu if you need GPU resources. (remember, if a GPU is not available you may not get your interactive session in a timely fashion)
- Input the number of hours you would like the server to remain active (please try to remain small, as it will continue running even if you are not using it)
- Input the desired amount of nodes, memory, and CPUs (try to start small with only a few gigabytes of memory and cores)
- Enter any additional Slurm parameters (this is optional). If you would like to request a GPU, make sure the partition you have selected has GPU resources, and add
--gres=gpu:1under “additional slurm parameters” - Press the blue "Launch" button on the bottom of the page
Connecting to Jupyter

- After pressing the blue "launch" button, your job will be queued to start a Jupyter Lab server. You should see this automatically
- Wait a few seconds to a few minutes for the Jupyter Lab server to finish launching. The status will automatically change from "Starting" to "Running" when the server is ready
- Press the blue "Connect to Jupyter" button when the server is running to access your Jupyter Lab server
Using Jupyter Lab

- Click on Python3 under "Notebook" to create a new .ipynb notebook
- Alternatively, upload your existing .ipynb files using the pane on the left-hand side
- You can drag-and-drop or press the upward facing arrow to upload files. The file browser starts in your home directory. See Accessing group and doctoral storage to reach other locations.
- When you are ready, you can run your Jupyter Notebook by pressing the run button at the top of the .ipynb file window

Using your own Python environment
The default Python3 kernel has a fixed set of packages. To use your own packages, register a conda environment as a Jupyter kernel. This is a one-time step per environment, done from an SSH session or a terminal in Jupyter Lab. If you don't have conda yet, follow Python with Miniforge first.
The kernel is registered in ~/.local/share/jupyter/kernels/myenv. The next time you open the Jupyter Lab Launcher, myenv appears as a notebook option. To switch a notebook that is already open, use Kernel > Change Kernel, or click the kernel name in the top right corner of the notebook.
Packages you later add to myenv with conda install or pip install are available in the kernel after a kernel restart.
To remove a kernel you no longer use,
Apptainer Images available in Jupyter Lab
The Jupyter Lab app with the "Apptainer" label runs Jupyter Lab from a container image instead of the Anaconda module. Pre-built images are in /opt/apps/containers/oit/jupyter. To pick one, check "Show Advanced Customization Fields" and select it in "Apptainer Container File".
| Image Name | Python | About |
|---|---|---|
bioconda.sif (default) |
3.10 | conda-forge base with additional Bioconda packages |
courses-jupyter-cuda.sif |
3.12 | CUDA and PyTorch |
ece-jupyter.sif |
3.12 | CUDA and Python modules used in engineering courses |
codeplus.sif |
3.9 | Dask, Datashader, spaCy, and related packages |
cplex.sif |
3.9 | Anaconda base with CPLEX packages |
Using a custom container
If you want to make a custom Jupyter Lab .sif, for example to give your whole lab the same packages, see Containers for Jupyter Lab and RStudio in OnDemand.
Accessing group and doctoral storage
The Jupyter file browser can't navigate above your home directory. To reach group or doctoral storage, create a symbolic link in your home directory from a terminal:
cd ~
ln -s /hpc/group/<groupname> <groupname>
ln -s /hpc/dctrl/$USER dctrl_$USER
The links show up as folders in the file browser. See storage locations for what each file system is for.