Setup

Teaching: 0 min · Exercises: 0 min · Total: 0 min

Prerequisites for NRP Training

Before attending the training session, please ensure you have completed the following setup steps.

Two ways to follow along

There are two ways to run the hands-on exercises in this training:

  1. NRP USCMS Analysis Hub (recommended). A JupyterHub-based environment with the training materials and Python packages already installed — nothing to set up on your laptop ahead of time. You'll still need your own personal API token (same step either way — see below) and one login step done at the start of the session.
  2. Your own machine (alternative). You call NRP's managed LLM endpoint directly from a local Python environment. This is lighter-weight than the Kubernetes-heavy trainings — there's no kubectl/kubelogin to install, you just need Python and your own personal API token (covered in Introduction — LLMs on NRP).

Everything past this setup page — the endpoint, the openai SDK calls, the notebooks — is identical either way.

Jump to: NRP USCMS Analysis Hub (recommended) · Your own machine (alternative)

1. NRP Access Requirements

Institutional Account Access

Namespace Membership

Important

We are using the namespace us-cms

Ask Daniel or Martin to add you if you have not been added already

You still need the account and namespace access from NRP Access Requirements above — this method just skips installing anything on your laptop. The Python packages used in the exercises (openai, etc.) are already set up on the hub image, but you'll still need to get your own personal API token (see Introduction — LLMs on NRP).

Launch the workspace in JupyterHub

▶ Launch the workspace on the NRP USCMS Analysis Hub — signs you in at uscms-af.nrp-nautilus.io, pulls the tutorial workspace, and opens JupyterLab.

That's it — no kubectl setup is needed for this training. Introduction — LLMs on NRP, the first lesson, covers the endpoint, getting your personal API token, and how to verify access.

Method 2: Your own machine (alternative)

Complete these steps before the session — they can't be done live.

Important

Also watch out for ~: it means a different directory in each place. On your own machine it's your local home directory; in the Analysis Hub's JupyterLab terminal it's /home/jovyan. A command like cd ~/cms-hats-llm/workspace lands somewhere different depending on which terminal you're actually typing it into — don't copy a command you ran in one context straight into the other without checking where it actually points.

tl;dr

Get an NRP account and namespace access → install Python 3 and pip install openai → get your personal token from nrp.ai/llmtoken (covered in Introduction — LLMs on NRP) → clone the training materials.

1. Install Python and the openai SDK

Python 3.9+ is required.

Bash
python3 --version
pip install --upgrade openai
2. Clone the training materials

Clone the branch containing the files for this training:

Bash
git clone --branch materials/cms-hats-llm --single-branch https://github.com/nrp-nautilus/nrp-training.git ~/cms-hats-llm
cd ~/cms-hats-llm/workspace

If you already cloned the training materials, update your local copy instead:

Bash
cd ~/cms-hats-llm
git pull
cd workspace
3. Get your API token

Go to https://nrp.ai/llmtoken and click Get LLM token, then export it locally:

Bash
export OPENAI_API_KEY="<your-token>"
export OPENAI_API_BASE="https://ellm.nrp-nautilus.io/v1"

This is covered in more detail, including how to verify it works, in Introduction — LLMs on NRP.

Getting Help

If you encounter issues during setup:

Additional Resources