Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Next »

Goals:

  • Walk through a options within a Jupyter Notebook session



Initial Screen Navigation and Options

Upon connecting, you are presented with a simple Jupyter Notebook screen and just a few options:

  • Drop down menu bar along the top

  • Active work area:

    • When you into the cluster for the first time, this area will display the default, which initially shows 2 tabs:

      • File Browser

      • Run Manager

 


Drop-Down Menu Bar

  • File: actions related to files and folders

  • View: actions that alter the appearance of Jupyter Notebook

  • Settings: common settings

  • Help: a list of Jupyter Notebook and kernel help links

Notebookdropdown.png

Active Work Area

Whatever you’re currently working on

  • Shown below the drop down menu

  • Usually this is a Jupyter Notebook

  • At default start, shows file and run tabs

NotebookActiveWorkArea.png

Opening a New Blank Notebook

From the Dropdown:

File->New->Notebook

From the Right side of the File Management Tab:

New->Notebook


Kernels

A Jupyter kernel is the computational engine behind the code execution in Jupyter notebooks.

Most users think of this as the “compiler” or programming language used when running code cells.
The Kernel empowers you to execute code in different programming languages like Python, R, or Julia or others and instantly view the outcomes within the notebook interface.

After opening a new notebook, you will be prompted to select a kernel

  • If you have never created a kernel to use, you will only see a list of default Jupyter kernels available on the cluster

  • You may check the box to start with the preferred kernel every time you open a notebook

Default Kernels on ARCC HPC Resources include:

  • Python Kernels

  • R Kernels

HPC-wide kernels are titled by packages installed and available when launched

Users can also create user-defined kernels from conda environments (Covered in a subsequent module. See Creating Jupyter Kernels from Conda Environments)


Running a Jupyter Notebook with Python 3 Kernel

If we select the default Python 3 (ipykernel), we are presented with the file explorer showing our home directory as it’s root location.

  • With root location set to our $HOME, we are unable to see our /project and /gscratch directories.

  • To expose these folders to the jupyter environment, create a symbolic link (aka shortcut) within our /home.

A screenshot of a computer

Description automatically generated
  • Instructions for creating a symbolic link may be found here or expanded in the cell to the right

 Steps to create a symbolic link
  1. Open an ssh connection to the HPC cluster with:
    ssh your_username@clustername.arcc.uwyo.edu
    or open a shell through OnDemand:

  2. In the shell/terminal interface, create a symbolic link to your project (replacing project_name with the name of your project) with:

[~] ln -s /project/project_name/ project

  1. In the shell/terminal interface, create a symbolic link to your gscratch (replacing username with the your username on the HPC) with:

[~] ln -s /gscratch/username/ gscratch


What Packages are Available in our Kernel?

In our notebook, we can write out a simple a python command that will list available packages:

After writing this command, we hit the “play” button to run this cell:

list.png

Click on the package list image to the right to see output

At first glance, it looks rather comprehensive. We have a long list of software packages available to us.


New Cell in our Notebook

After running our last cell, a new cell is automatically created at the bottom extending our notebook

  • New empty cell is at the bottom.

  • Previous cell and output from that previous cell’s run is above our new cell

  • We can also manually create a new cell with the + button

In this cell, lets run another python command to import a common package used in mathematic and multi dimensional matrix computations - numpy.

Then run it like we did the last cell.

A close-up of a computer screen

Description automatically generated

This error message indicates the numpy package isn’t installed, despite being a commonly used software package.

Our first cell’s output appears to be misleading. The listed packages are installed, but they are all needed simply to run Jupyter.

Most software we’d need to perform even more simple and common activities for our research would still need to be installed or made available somehow.


Load a different kernel

Depending on the HPC’s native environment, you may have other kernels available.


No available kernels have all the software I need - Now what?

To be continued…


  • No labels