Jupyter Notebooks are documents which can combine executable code, formatted text, and interactive graphics into a single file.  Because Notebooks can be shared, they provide developers with a tool for capturing and explaining their computational results.  To use a Jupyter Notebook, a web application, such as JupyterLab, is needed.

ARCS now provides a web portal where JupyterLab can be accessed on Rivanna. 

However, to use JupyterLab, you must have an account on Rivanna


Accessing JupyterLab

To access JupyterLab, you will begin by connecting to our Open OnDemand portal:

  • Open a web browser and go to URL:  https://rivanna-portal.hpc.Virginia.edu
  • Use your “Netbadge” credentials to log in
  • On the top right of the menu bar of the Open OnDemand dashboard, click on “Interactive Apps”
  • In the drop-down box, click on “JupyterLab”


Requesting an Instance

Your instance (or copy) of JupyterLab will run on a Rivanna compute node.  So, it will need a list of resources, such as partition, time, and allocation.  If you are new to Rivanna, you may want to read the Getting Started Guide to learn more about the partitions.

After connecting to JupyterLab through Open OnDemand, a form will appear where you can fill in the resources for JupyterLab. 

When done filling in the resources, click on the blue “Launch” button at the bottom of the form.

It will take a few minutes for the system to gather the resources for your instance of JupyterLab.  When the resources are ready a “Connect to Jupyter” button will appear.  Click on the button.


Running Notebooks

The JupyterLab dashboard will have two panes:

  • A file-browser pane on the left where you will see the files and folders in your Rivanna directory; and
  • A “Launcher” pane on the right with tiles for the available kernels (i.e., underlying software that will run the code in your Notebooks).

If you already have a Jupyter Notebook in your account, you can maneuver to the file in the file-browser pane, and double-click on the file name to open the Notebook.

However, if you want to create a new Notebook, go to the Launcher pane and click on the tile for the desired kernel (e.g., Python 3).

If you are more familiar with the “classic” Notebook environment, you can change the JupyterLab format by clicking on “Help” and select “Launch Classic Notebook”.


Interesting Features

  • You may notice that the number or type of tiles on the Launcher differs between your account and a colleague’s account.  If you have created any conda environments in your account, those environments will appear as separate, specialized kernels.  You may need to hover over a tile to see the name of the environment.
  • If you have an existing script (e.g., Python or R) that you want to convert to a Notebook, a feature has been added to JupyterLab to allow you to open the script as a Notebook. In the file-browser, navigate to your file; right-click on the file, and select “Open With” and “Notebook”.  Jupyter will choose a kernel based on the extension of the script, and will use white space to split the code into separate cells.  It will try to put entire functions in a single cell, but you may need to tweak the cells to ensure that the code was split correctly.