JupyterLab Extensions

JupyterLab allows the use of extensions, such as notebook table of contents and rendering of custom data formats such as FASTA.

Here’s how to get started with JupyterLab extensions:

Prepare your project

  • Make sure you have enough memory. You’ll need at least 2 GB of RAM in your project to build JupyterLab extensions, possibly more depending on the extension. See Adjust Quotas for more information on how to add upgrades.
  • Configure a directory to store the installed extensions. In this example, we use .lab in the project home directory. In Custom environment variables in project settings, set environment variable JUPYTERLAB_DIR to the value /home/user/.lab.
../_images/jlab-env.png

Click Save to store the variable setting, and restart your project.

Build the extensions

After restarting your project, open a Linux Terminal and run the following:

# check that JUPYTERLAB_DIR variable is set to `/home/user/.lab`
echo $JUPYTERLAB_DIR

# install extension(s) - this step takes a couple minutes
jupyter labextension install @jupyterlab/toc @jupyterlab/fasta-extension

Start JupyterLab

In the “Project settings”, scroll down to find JupyterLab server. A moment after you click that link, JupyterLab starts up.

At this point, your extensions are installed and enabled.

../_images/jlab-ext-example.png