BYU

Office of Research Computing

JupyterLab On Open OnDemand

JupyterLab is an interactive development environment for working with documents and computational activities like Jupyter notebooks, text editors, terminals, and more. Its user-friendly interface makes it easy to manage files, run code, and view results all in the same window.

Setting up a JupyterLab Session

1. Navigate to Open OnDemand and select JupyterLab from Interactive Apps

2. Specify the number of hours you would like to reserve the machine for

3. Hit Launch

This will launch a JupyterLab server using Python on the ORC cluster. However, this configuration is limited to just python and JupyterLab. You will not be able to load packages such as numpy unless you set up a conda environment and configure the environment variables for Open OnDemand.

Setting up JupyterLab with Mamba/Conda Environments

Refer to BYU RC Wiki if you are unfamiliar with setting up environments using Mamba/Conda.

1. Create a new conda environment for JupyterLab, with Python and JupyterLab:


mamba create -n MyJupyterLab python jupyterlab
    

Optionally, you may specify a python version, for example: python=3.11.4
2. Activate the new environment:

mamba activate MyJupyterLab
    

3. Install desired packages:


mamba install numpy pandas
    

Mamba will automatically select versions compatible with our installed python version
4. Check if jupyterlab runs correctly:

jupyter lab
    

Configuring Environment Variables for OnDemand

After setting up this environment, you need to change the environment variables for OnDemand. Back in the JupyterLab page from Interactive Apps, check the box labeled Show Python/JupyterLab Environment Setup and replace what is in the text box with the following:


source ~/.bashrc
mamba activate MyJupyterLab
    

Click Launch to start JupyterLab using the specified mamba environment with your installed packages.

If you wish to revert to the default configuration, simply change the Environment Setup text box back to the following:


module purge
module load python/ondemand
module load jupyterlab