JupyterLab

Table of Contents

Introduction

JupyterLab is Project Jupyter's web-based devolopment interface for Jupyter Notebooks. On ISU HPC clusters, it is available as an app on the Open OnDemand instance of the respective cluster. 

Return to Table of Contents

Accessing JupyterLab

Connecting to Open OnDemand

JupyterLab is provided via Open OnDemand on ISU HPC clusters. Click here to view the guide for ISU HPC Open OnDemand. For convenience, the links to connect to Open OnDemand are provided below. Note: To access ISU HPC Cluster Open OnDemand interfaces, users must be on the ISU network, either physically or via ISU VPN

 

Return to Table of Contents

Launching an Instance of JupyterLab

After logging into Open OnDemand, choose Jupyter Notebook from the dropdown list Interactive Apps. After choosing settings that will fit your use case or leaving the defaults if they are sufficient, press the Launch button on the bottom of the page.

Image showing the launch button on the bottom of the Jupyter Notebook app configuration page

After pressing Launch, you will be automatically redirected to the page titled 'My Interactive Sessions.'  The top tile on the page should be for the Jupyter instance you started. It may take a moment to start the instance, but when it is ready there will be a Connect to Jupyter button. Press it to open the instance.

Image showing the connect to Jupyter button in the bottom left of the Jupyter Notebook app card

Return to Table of Contents

Using JupyterLab

Launch a Jupyter Notebook

To launch a new Python 3 Notebook click File > New > Notebook and select Python 3 for the kernel. 

Image showing File > New > Notebook

This will open a new Jupyter Notebook tab. 

Another method to launch a Jupyter Notebook is via the JupyterLab Launcher. The launcher will show available environments to launch a Notebook with. To open the Launcher, click File > New Launcher. From the Launcher tab, choose the Notebook environment to launch. 

Image showing File > New Launcher and the environments

Return to Table of Contents

Using Python Environments in a Jupyter Notebook

Virtual environments can be used with JupyterLab to allow preconfigured environments.

Click here for instructions for using Python Virtual Environments
Click here for instructions for using Conda Virtual Environments

Return to Table of Contents

Using Shell and Magic Commands in a Jupyter Notebook

The IPython kernel can be used to run shell commands as well as Python code. To run a shell command, put an exclamation point before the command. (!)  For example, to see the current Slurm jobs you 

!squeue -u ${USER}

Some commands will not work the desired way. For example, running a !cd command will not change the work directory of the environment. To do that, a magic command has to be issued. Magic commands begin with a percent sign. (%) Running the following command would change the environments working directory. 

%cd /home/user1/some/directory

For a listing of available built-in magic commands, see the IPython magic command guide.  

Return to Table of Contents