JupyterLab

Description

From the JupyterLab website: JupyterLab is a web-based interactive development environment for Jupyter notebooks, code, and data. JupyterLab is flexible: configure and arrange the user interface to support a wide range of workflows in data science, scientific computing, and machine learning. JupyterLab is extensible and modular: write plugins that add new components and integrate with existing ones.

JupyterNotebook is one of the tools available for use in the JupyterLab suite.

PLEASE NOTE: Do not run JupyterLab on a login node, as it can be resource intensive. Instead, please ensure that you only run it inside of an SRUN Interactive session.

Using JupyterLab on CIRCE/SC via X2Go

Installing JupyterLab

To install JupyterLab, you'll first need to log-in to CIRCE/SC, open a terminal inside of X2Go, and install Miniconda3 using the directions below:

Instructions on installing Miniconda3

  1. [user@itn0 ~]$ cd $HOME
  2. [user@itn0 ~]$ wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
  3. [user@itn0 ~]$ chmod +x Miniconda3-latest-Linux-x86_64.sh
  4. [user@itn0 ~]$ ./Miniconda3-latest-Linux-x86_64.sh
    • answer "yes" to adding Miniconda3 install location to PATH in your ~/.bashrc
  5. log-out of CIRCE/SC, then log back in
  6. [user@itn0 ~]$ which conda pip
    • make sure it returns with both lines below:
      • ~/miniconda3/bin/conda
      • ~/miniconda3/bin/pip
  7. [user@itn0 ~]$ pip install --upgrade pip
  8. [user@itn0 ~]$ conda update --all -y
  9. [user@itn0 ~]$ conda install -y anaconda

Once Miniconda3 is installed, you can proceed with installing JupyterLab.

Instructions on installing JupyterLab via Miniconda3

To create a dedicated JupyterLab Miniconda virtual environment, you can do so by running the commands below:

  1. [user@itn0 ~]$ cd $HOME
  2. [user@itn0 ~]$ conda create --name jupyter -c conda-forge jupyterlab


Running JupyterLab inside of an SRUN Interactive Session

 

PLEASE NOTE: When running inside of an SRUN interactive session, ensure that your "--time" request is sufficient to complete your processing. If your interactive session runs out of time, your JupyterLab processes will be terminated, and any unsaved work will be lost!

Each time you wish to run JupyterLab, you can do so by running the commands below:

  1. Connect to CIRCE/SC via X2Go
  2. Export your DISPLAY variable
  3. Request a 1-core, 1GB of RAM SRUN Interactive Session for 1 hour:
    • [user@itn0 ~]$ srun --time=01:00:00 --ntasks=1 --mem-per-cpu=1G --pty /bin/bash
  4. Once the SRUN Interactive Session has been dispatched, load your JupyterLab conda environment:
    • [user@mdc-1057-29-41 ~]$ conda activate jupyter
  5. Start Firefox in the background on the compute node:
    • [user@mdc-1057-29-41 ~]$ firefox &
  6. Start JupyterLab:
    • [user@mdc-1057-29-41 ~]$ jupyter lab

Terminating JupyterLab

When you are finished using JupyterLab, you can terminate the processes using the steps below:

  1. Close the Firefox window
  2. CTRL-C in the terminal window, and enter "y" to confirm terminating the JupyterLab server process
  3. [user@mdc-1057-29-41 ~]$ conda deactivate jupyter

Documentation

Home Page, User Guides, and Manuals

Reporting Bugs

Report bugs with JupyterLab to the IT Help Desk: rc-help@usf.edu