Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

🖥️ Lecture slides — Session 02 (Fri Oct 2)

We will discuss how to work with various environments.

Local environment

To work locally using Python and Jupyter notebooks.

We recommend Visual Studio Code for editing code and notebooks, running them, and interacting with GitHub. It is how we wrote this book, and it is where most agentic AI assistants live (see 1.8).

Either through your OS or from VS Code, open a terminal. The terminal passes commands to the computer through a shell; BASH (Bourne Again SHell) is the most common implementation. Good tutorials for getting started are in the Software Carpentries lessons.

Get to know your hardware. Find out what CPU, GPU, and memory your machine has. htop monitors resources in real time; install it locally (e.g., brew install htop on macOS).

CPUs, GPUs, and other accelerators

Machine learning workloads parallelize. CPUs (Central Processing Units) are sufficient for most classic ML: they are the default hardware of every computer and handle the I/O of large data sets well. CPUs typically have between 8 and 96 cores.

Deep learning — both training models and running inference with trained ones — is enabled by the much wider parallelism of accelerators:

To watch how an NVIDIA GPU is being used:

watch nvidia-smi

Renting GPUs costs real money. As of 2026, on-demand cloud pricing runs from well under a dollar per hour for a modest GPU to several dollars per hour for a current data-center GPU, and spot/preemptible instances are cheaper but can be interrupted. Two habits follow: measure and report your compute time (the final project requires it), and size the hardware to the problem — most course projects train in minutes on a laptop or a free Colab GPU, and buying a bigger GPU is not a substitute for a better-posed problem.

Individual CPUs compose a node. Multiple nodes compose a cluster. Clusters can be local (if you are lucky!) and most often remote. Typical tiers: your research group’s machine, the institutional cluster (e.g., Hyak at UW), a national HPC center (e.g., TACC), or a cloud provider (AWS, Azure, GCP). In cloud computing, a node is an instance.

HPC

HPC (High Performance Computing) refers to a system of tightly connected nodes for large-scale jobs. The Software Carpentries have tutorials on using clusters: see the Introduction to HPC lessons. These architectures enable “vertical scaling”: bigger CPU, memory, or I/O per job.

HPC systems have 1) a compute cluster, 2) a scratch file system (temporary), and 3) a home file system. Code lives in home, big data on scratch, and jobs run on the compute cluster through a scheduler queue. It is typical to run big jobs on hundreds to thousands of nodes.

Institutions may have their own HPC systems. At UW, the system is called Hyak.

National HPC resources require an allocation request, typically through NSF ACCESS or TACC. ACCESS has an entry-level tier suitable for course projects and exploratory research.

One typically 1) chooses the HPC resource, then 2) moves the data there for the computing workflow.

Cloud

Cloud computing refers to a system of loosely connected nodes. There are many cloud providers, with three at the top: Amazon Web Services (AWS), Google Cloud Platform (GCP), and Microsoft Azure.

Cloud centers are distributed around the world to enable fast global access; the centers are called regions.

Storing and moving data is usually the most expensive part of cloud geoscience. One typically finds 1) where the data is archived, then 2) chooses the cloud provider and the region where that data lives, so compute runs next to the data.

Watch an eScience tutorial on getting started on AWS: Getting started on AWS (video).

Free and low-cost notebooks

Open data on the clouds

The major clouds host large open geoscience archives, and it is worth knowing where the data lives even if you compute elsewhere:

Access models change; check each provider’s current terms rather than assuming a free tier.