# JupyterHub access on Cheyenne

**URL:** <https://discourse.pangeo.io/t/jupyterhub-access-on-cheyenne/253>\
**Category:** CMIP6 Hackathon\
**Created:** [October 8, 2019, 8:57pm UTC](https://discourse.pangeo.io/t/jupyterhub-access-on-cheyenne/253 "2019-10-08T20:57:17Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![jukent](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.pangeo.io/jukent/32/297_2.png) [@jukent](https://discourse.pangeo.io/u/jukent)\
**Post date:** [October 8, 2019, 8:57pm UTC](https://discourse.pangeo.io/t/jupyterhub-access-on-cheyenne/253/1 "2019-10-08T20:57:17Z")

</div>

# JupyterHub access on Cheyenne

**Step 1:** Navigate to [https://jupyterhub.ucar.edu/](https://jupyterhub.ucar.edu/).

**Step 2:** Launch your server, select from:  
- Cheyenne Supercomputer (i.e., the batch nodes)  
- Casper DAV (Analysis machine)   
 ![image](https://canada1.discourse-cdn.com/flex030/uploads/pangeo/original/1X/b88bf389e292c626988c80827efe7b47613ab131.png)  
You may have to click “Launch Server” after selecting your machine:  
 ![image](https://canada1.discourse-cdn.com/flex030/uploads/pangeo/original/1X/7b90803b8833b586c8515816f511716634a39627.png)

**Step 3:** Authenticate with either your yubikey or your DUO mobile app

**Step 4:** Specify:  
- Queue (reservation or Slurm QoS)  
- Project account number  
- Wall time

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/pangeo/original/1X/e4c8bb2611095780de0f15e296fc5389c668f267.png)

**Step 5:** Click “Spawn.”

# What to do if JupyterHub is down or unstable (The Murphy’s Law section):

In case you are having issues with jupyterhub.ucar.edu, we’ve provided utility scripts for launching JupyterLab on both Cheyenne and Casper via SSH Tunneling:

**Step 1:** SSH into Cheyenne or Casper:

```auto
ssh username@cheyenne.ucar.edu 
ssh username@casper.ucar.edu 

```

**Step 2:** Clone repository with utility scripts:

```auto
git clone https://github.com/NCAR/ncar-python-tutorial.git

```

**Step 3:** Submit Job and Launch Jupyter Server

_Note: This step requires having conda on your path, and `jupyter` installed in your `base` conda environment._ In order to launch the jupyter server from a different environment, make sure to run `conda activate ENV_NAME` where ENV\_NAME=your environment name prior running the following commands:

```auto
cd ncar-python-tutorial
./setup/jlab-ch # on Cheyenne

```

or

```auto
./setup/jlab/jlab-dav # On Casper

```

For custom configuration, you can use --help option to see the available options

```auto
$ ./setup/jlab/jlab-ch --help
Usage: launch Jupyter server
Possible options are:
 -a,--account: account
 -w,--walltime: walltime [default: 06:00:00]
 -q,--queue: queue [default: share]
 -m,--memory: memory request [default: 8GB]
 -d,--directory: notebook directory
 -p,--port: [default: 8888]
 --matlab: run matlab kernel
 --matlab-version: matlab version [default: R2018a]

```

**Step 4:** If step 3 is successful, you will see instructions along the lines:

```auto
----------------------------------------------------------------------
Execute on local machine:
ssh -N -L 8999:localhost:8999 username@casperxx.ucar.edu
 
Open a browser on your local machine and type in the address bar:
http://localhost:8999
----------------------------------------------------------------------

```

```
- Open a new terminal and run the `ssh command` listed under `Execute on local machine` section
- Open your favorite browser (chrome, firefox, etc..) and head over to the address listed under `Open a browser on your local machine ….` section
```

---

<div class="post-metadata">

**Author:** ![rabernat](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.pangeo.io/rabernat/32/22_2.png) [@rabernat](https://discourse.pangeo.io/u/rabernat)\
**Post date:** [October 8, 2019, 10:17pm UTC](https://discourse.pangeo.io/t/jupyterhub-access-on-cheyenne/253/2 "2019-10-08T22:17:47Z")

</div>

@matt-long - thanks for these great instructions.

You don’t mention much about the software environment. Is there a “Pangeo” kernel already available. Should we have a discussion about what packages to include? Or are users on their own to configure their environment?

I would like to make sure the environments are as uniform as possible between cloud and cheyenne.

---

<div class="post-metadata">

**Author:** ![matt-long](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.pangeo.io/matt-long/32/46_2.png) [@matt-long](https://discourse.pangeo.io/u/matt-long)\
**Post date:** [October 8, 2019, 10:19pm UTC](https://discourse.pangeo.io/t/jupyterhub-access-on-cheyenne/253/3 "2019-10-08T22:19:06Z")

</div>

We’re still working on the kernel. Will update with details when available.

---

<div class="post-metadata">

**Author:** ![matt-long](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.pangeo.io/matt-long/32/46_2.png) [@matt-long](https://discourse.pangeo.io/u/matt-long)\
**Post date:** [October 8, 2019, 10:20pm UTC](https://discourse.pangeo.io/t/jupyterhub-access-on-cheyenne/253/4 "2019-10-08T22:20:56Z")

</div>

Our hope is to develop a kernel that enables people to get working right away and covers just about everything. It is also possible for user to create their own conda environments.

---

<div class="post-metadata">

**Author:** ![rabernat](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.pangeo.io/rabernat/32/22_2.png) [@rabernat](https://discourse.pangeo.io/u/rabernat)\
**Post date:** [October 8, 2019, 10:23pm UTC](https://discourse.pangeo.io/t/jupyterhub-access-on-cheyenne/253/5 "2019-10-08T22:23:01Z")

</div>

I think we should be brainstorming a list of packages collaboratively. We can start from pangeo-stacks:

> **[pangeo-data/pangeo-stacks](https://github.com/pangeo-data/pangeo-stacks/)**
>
> Curated Docker images for use with Jupyter and Pangeo - pangeo-data/pangeo-stacks

We might want to create a new environment and docker image there, export the environment, and rebuild it on cheyenne.

@jhamman - what do you think about that plan?

---

<div class="post-metadata">

**Author:** ![jhamman](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.pangeo.io/jhamman/32/34_2.png) [@jhamman](https://discourse.pangeo.io/u/jhamman)\
**Post date:** [October 8, 2019, 10:37pm UTC](https://discourse.pangeo.io/t/jupyterhub-access-on-cheyenne/253/6 "2019-10-08T22:37:10Z")

</div>

> [@rabernat](#):
>
> @jhamman - what do you think about that plan?

This is exactly my plan. Please comment on this PR with specific additions: [bump versions by jhamman · Pull Request #84 · pangeo-data/pangeo-stacks · GitHub](https://github.com/pangeo-data/pangeo-stacks/pull/84)

---

<div class="post-metadata">

**Author:** ![matt-long](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.pangeo.io/matt-long/32/46_2.png) [@matt-long](https://discourse.pangeo.io/u/matt-long)\
**Post date:** [October 15, 2019, 8:19pm UTC](https://discourse.pangeo.io/t/jupyterhub-access-on-cheyenne/253/7 "2019-10-15T20:19:13Z")

</div>

Here are few important details to keep in mind.

# Cheyenne vs Casper

The [Cheyenne supercomputer](https://www2.cisl.ucar.edu/resources/computational-systems/cheyenne) has a lot of compute power, but can sometimes be unstable and the batch nodes do not have Internet access. This can be problematic when packages like `cartopy` attempt to download assets on the file.

[Casper](https://www2.cisl.ucar.edu/resources/computational-systems/casper), otherwise known as the DAV system, does have Internet access.

Cheyenne uses the PBS queuing system; Casper uses Slurm.

# Project number

We have an allocation for the Hackathon on Cheyenne. The project number is  
**UCGD0006**

# Reservation

We have reserved 64 Cheyenne nodes 8:00a-6:00p each day. To use this reservation, specify  
**S8808243**  
for the queue. You can also run in “share” or “regular”.

We have a single Casper node reserved with different reservation names each day:  
Wed: **CMIPAP\_hackathon\_Day1**  
Thu: **CMIPAP\_hackathon\_Day2**  
Fri: **CMIPAP\_hackathon\_Day3**  
You can also run in “dav”.

# Picking the system

For the most part, you should be able run on either Cheyenne or Casper. Start with Cheyenne.

---

<div class="post-metadata">

**Author:** ![andersy005](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.pangeo.io/andersy005/32/31_2.png) [@andersy005](https://discourse.pangeo.io/u/andersy005)\
**Post date:** [October 16, 2019, 12:58pm UTC](https://discourse.pangeo.io/t/jupyterhub-access-on-cheyenne/253/8 "2019-10-16T12:58:14Z")

</div>

@jukent, can you update the original post by including information about using the **CMIP6 2019.10** Kernel?

![19%20AM](https://canada1.discourse-cdn.com/flex030/uploads/pangeo/original/1X/9667cca630cf129c5fb0d4778ddc9d29d534b807.png)

I just finished updating the environment with the right software packages.

---

<div class="post-metadata">

**Author:** ![matt-long](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.pangeo.io/matt-long/32/46_2.png) [@matt-long](https://discourse.pangeo.io/u/matt-long)\
**Post date:** [October 16, 2019, 3:03pm UTC](https://discourse.pangeo.io/t/jupyterhub-access-on-cheyenne/253/9 "2019-10-16T15:03:59Z")

</div>

# Update: Changes to reservation number

We have reserved 64 Cheyenne nodes 8:00a-6:00p each day. To use this reservation, specify  
Wed: **R8815540**  
Thu-Fri: **S8808243**  
for the queue. You can also run in “share” or “regular”.
