Running a Jupyter Notebook
This page focuses on the Jupyter workflow, which enables you to run and manage Jupyter Notebooks.
After adding the Jupyter Notebook Server workflow and favoriting it, click its card on the Home page.
You’ll be taken to the workflow’s configuration page.
Navigate to the Jupyter Server Host section. The settings here depend on where you're running the workflow: in your user container, on a controller node, or on a compute node.
Running an interactive session on a controller or compute node requires a running resource. If you plan to run an interactive session in your ACTIVATE user workspace, you do not have to have a resource running.
- User Container
- Controller Node
- Compute Node
Use the Service Host dropdown menu to choose where the workflow will be hosted. Select User Workspace
.
Use the Select Controller... dropdown menu to choose how the job will be submitted. Select PW USER CONTAINER
.
Click Execute.
Use the Service Host dropdown menu to choose which cluster will host the workflow. We selected Demo Cluster
.
Use the Select… dropdown menu to choose how the job will be submitted. Select Controller
.
Click Execute.
Use the Service Host dropdown menu to choose which cluster will host the workflow. We selected Demo Cluster
.
Use the Select… dropdown menu to choose how the job will be submitted. We selected SLURM Partition
.
Optionally, you can use the next field to name a specific partition to run the workflow. This field will be named either SLURM Partiton or PBS Queue. We used partition1
.
Optionally, use the Schedular Directives field to enter additional parameters for your partition. We entered --gpus-per-node=1
.
Click Execute.
You’ll be taken to your workflow’s configuration page. In the Workflow Monitor module, click the View icon.
You may see a page with the message Validating URL before the page loads. If you see the message for more than 30 seconds, you can refresh the page.
On the Jupyter page, click the untitled.ipynb
file.
Your Jupyter Notebook will open in a new tab. You can browse files, create a new Notebook, or double-click on an existing Notebook within your /pw
file system.
Enter !hostname
to confirm where the Notebook is running. The !
tells Jupyter to execute the hostname
command in the shell of the underlying operating system.
Click Run.
The Notebook will generate a new line with the output pw_user_<your_user_id>
, which is the same hostname displayed in your ACTIVATE IDE terminal.
Now you can use the Jupyter Notebook for anything. Please be sure to end the workflow when you're finished by navigating to your Home page or Workflows page and clicking the Cancel icon.
You can connect a running Jupyter Notebook to a kernel (i.e., execution engine) in a different Conda environment. To see your available kernels, click Kernel > Change kernel in the Jupyter banner.