Running Jupyter on Strelka

The Jupyter Notebook is a web-based interactive computing platform. The notebook combines live code, equations, narrative text, visualizations, interactive dashboards, and other media.  The preferred way to launch an interactive session to run a Jupyter notebook on Strelka is with conda.

Conda

Note: Please ensure that you have installed Miniconda prior to running the steps below.

Using conda, it is possible to create a dedicated, personalized environment in which to run Jupyter Notebooks. The following example creates a basic conda environment within which to run a Jupyter Notebook or Jupyter Lab application (more specific documentation for conda is available), and it assumes you are connected to Strelka and are running an X server to use graphical applications; note also that you should not launch Jupyter applications from the head node directly and instead should start an interactive session on a compute node before doing so:

conda create --name jupyter python=3.11 conda activate jupyter conda install jupyter jupyter-notebook ## launch a Jupyter Notebook jupyter-lab ## launch Jupyter Lab

Running either jupyter-notebook or jupyter-lab will open a web browser from Strelka and connect you to the Jupyter session. To exit the session, close the web browser and hit Ctrl-c to shutdown the server. Note that graphical performance is likely better using an interactive desktop through Open OnDemand.

This slightly more complex example demonstrates creating a conda environment with Jupyter and PyTorch, then connecting to a GPU node, requesting 4 CPUs, 32GB of memory, a single GPU, and then launching a notebook:

conda create --name jupyter-pytorch python=3.11 conda activate jupyter-pytorch conda install jupyter conda install pytorch salloc -t 300 --cpus-per-task=4 --mem-per-cpu=8gb --gpus-per-node=1 --x11 jupyter-notebook

Jupyter Help Documentation

Jupyter Notebook: https://jupyter-notebook.readthedocs.io/en/latest/

JupyterLab: https://jupyterlab.readthedocs.io/en/latest/index.html

Ways you can contact ITS or find information:

ITS Support Portal: https://support.swarthmore.edu
Email: support@swarthmore.edu
Phone: x4357 (HELP) or 610-328-8513
Check out our remote resources at https://swatkb.atlassian.net/wiki/spaces/remote/overview
Check our homepage at https://swarthmore.edu/its