Lab Setup Guide

Set up your lab environment

A clean, isolated Linux machine for running the labs — built on your Windows PC, so nothing touches your work setup and everything matches what the labs expect.

⏱ ~45–60 minutes🧑‍💻 Beginner-friendly💸 Free
Windows  →  VirtualBox  →  Ubuntu  →  the labs

Why a virtual machine? It gives you a throwaway Linux computer running inside a window on Windows. The labs assume Linux, your experiments stay sandboxed away from your real machine, and if anything breaks you just delete it and start over. Nothing here costs money.

You'll need Windows 10 or 11 · at least 8 GB RAM (16 GB is comfortable) · about 40 GB free disk · and an internet connection. Everything else you'll install below.
In a hurry, and already set up?If you already have Python 3 and git, you can skip the whole VM — clone the repo, make an environment, and run a lab:
git clone https://github.com/hlerias/leapfrog.git
cd leapfrog
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
python labs/08_trace.py
The full guide below is for a clean, isolated setup — or if you’re new to Linux.

1Turn on virtualization

Your PC can almost certainly run VMs, but the feature is sometimes switched off. Check it: press Ctrl + Shift + Esc to open Task Manager → Performance tab → CPU. Look for Virtualization: Enabled near the bottom.

If it says Disabled Restart your PC and enter the BIOS/UEFI (usually by tapping F2, F10, Del, or Esc as it boots — the screen tells you which). Find the setting called Intel VT-x, AMD-V, SVM, or just Virtualization, set it to Enabled, save, and exit. Your PC maker's support page has exact steps if you get stuck.

2Install VirtualBox

VirtualBox is the free program that runs the virtual machine.

  1. Go to the official downloads page: virtualbox.org/wiki/Downloads
  2. Under VirtualBox 7.x platform packages, click Windows hosts to download the installer.
  3. Run the downloaded file and click Next through the installer (the defaults are fine). Approve the network prompt if Windows asks.
TipThere's also an official walkthrough with screenshots from Canonical: Run Ubuntu Desktop on VirtualBox.

3Download Ubuntu

Ubuntu is the Linux system your VM will run. Download the current long-term-support release (26.04 LTS "Resolute Raccoon").

  1. Open ubuntu.com/download/desktop and click the download button for the latest LTS.
  2. You'll get a single .iso file (about 6.5 GB). Save it somewhere you'll remember, like your Downloads folder.
Direct linkIf you prefer, the ISO is also here: ubuntu-26.04-desktop-amd64.iso. (24.04 LTS also works if you'd rather use it.)

4Create the virtual machine

Open VirtualBox and click New. VirtualBox 7 can install Ubuntu for you automatically — fill in these details:

Click Finish, then Start. Ubuntu will install itself — this takes 10–20 minutes. Let it finish even if the progress bar looks frozen near the end; that's normal.

Turn on copy-pasteOnce it's running, in the VM window's menu go to Devices → Shared Clipboard → Bidirectional. Now you can copy the commands below on Windows and paste them straight into the VM.

5First login and update

Log in with the username and password you chose. Open the Terminal (press the Windows/Super key, type terminal, hit Enter — or use Ctrl + Alt + T). Paste this to bring the system up to date (enter your password when asked — it won't show as you type):

sudo apt update && sudo apt upgrade -y

6Install the toolchain

Install Python, its package tools, and git — everything the labs need:

sudo apt install -y python3 python3-pip python3-venv git

7Get the labs

Clone the repository, create an isolated Python environment, and install everything the labs need in one go:

git clone https://github.com/hlerias/leapfrog.git
cd leapfrog
python3 -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt
Good to knowThe source .venv/bin/activate line switches you into the isolated environment — your prompt will start showing (.venv). Run it again whenever you open a new terminal to come back to your workspace.

8Run models locally — no API key needed

Several labs call a language model — but you don't need a paid API key. The easy, free default is to run a small model right on your VM with Ollama — perfect if your company won't hand out keys. Install it:

curl -fsSL https://ollama.com/install.sh | sh
ollama pull llama3.2

Point the labs at your local model. This saves the setting for every future terminal, so you only do it once:

echo 'export LLM_BASE_URL=http://localhost:11434/v1' >> ~/.bashrc
echo 'export LLM_API_KEY=ollama' >> ~/.bashrc
echo 'export LLM_MODEL=llama3.2' >> ~/.bashrc
source ~/.bashrc
Low on RAM?Use the smaller model instead: ollama pull llama3.2:1b, then set export LLM_MODEL=llama3.2:1b.

9Run your first lab

They’re already here — the nine labs live in the labs/ folder you just cloned. Run one that needs no API key:

python labs/08_trace.py
python labs/03_eval_gate.py

Start with "Trace one request" or "Watch naive RAG fail" — both run with no API key at all. Then, now that Ollama is set up, try a model lab: python labs/01_first_call.py. You now have a real lab bench. Go break something.

Then run the capstoneThe full invoice workflow ties it all together, with a local model doing the reading — no API key, no admin. On a locked-down machine, use the Hugging Face path:
cd demos/invoice-workflow
./run_local.sh
See the capstone on the labs page for the other run options.
Open the labs →

10Optional: a code editor

If you'd rather edit files in a proper editor than in the terminal, install VS Code inside the VM:

sudo snap install code --classic

If something goes wrong

HL

Guide by Hugo Lerias

Author of Leapfrog and the companion labs. Connect on LinkedIn →