Setup
Time: 15 minutes without Docker, 30-45 minutes with it, mostly download time. Cost: $0. Every tool here is free for learning.
This track needs three things on your machine: uv to run the Python labs, an embedding model to turn text into vectors, and, from Chapter 7 on, a container runtime to run a real database. If you did the Foundations setup, you already have the first two. Docker is the new part, so most of this page is about it.
You do not have to install Docker today. Chapters 1 to 6 do not use it. Come back to Step 4 before Chapter 7 if you would rather start learning now.
What you need, and why​
| Tool | Why this track needs it | Needed from |
|---|---|---|
| uv | Runs every lab and installs its Python packages into a private folder. | Chapter 1 |
Ollama + nomic-embed-text | A free embedding model that runs on your own machine. | Chapter 1 |
| Docker or Podman | Runs PostgreSQL with pgvector in a container, so you do not install a database by hand. | Chapter 7 |
| (Optional) OpenAI API key | Use OpenAI's embedding model instead of Ollama. | Any chapter |
Anthropic does not offer an embedding model, so an Anthropic key will not work in this track's labs.
Will my computer handle it?​
Most labs are light. Three are not: building the shared dataset in Chapter 4, the reranker in Chapter 9, and the capstone in Chapter 11, which uses the same reranker. Here is what each one used on the test machine, an Apple M4 Max laptop with 14 CPU cores and 36 GB of memory:
| Step | Time | Peak memory | CPU |
|---|---|---|---|
| Labs 1 to 3 | a few seconds each | up to about 0.9 GB (Lab 3) | 1 core |
| Shared dataset, built once in Chapter 4 | about 3 minutes | about 0.4 GB, plus about 0.6 GB for the embedding model in Ollama | Ollama uses the GPU when it can |
| Labs 4, 5, and 6 | 12 seconds to 1 minute | up to 1 GB | 1 core |
| Lab 7 | about 25 seconds | about 0.3 GB, plus about 0.3 GB inside the database container | under 1 core |
| Lab 8 | about 20 seconds | about 1.2 GB | under 1 core |
| Lab 9 | about 70 seconds | about 1.9 GB | 4 cores |
| Multi-hop dataset, built once in Chapter 10 | about 1.5 minutes | about 0.4 GB, plus about 0.6 GB for the embedding model in Ollama | Ollama uses the GPU when it can |
| Lab 10 | under a minute | about 0.4 GB | 1 core |
| Lab 11 (capstone) | about 1 minute | about 1.7 GB | 3 to 4 cores |
On an older laptop, especially one without Apple silicon or a GPU, expect every time in that table to be several times longer. The dataset build can take 20 minutes or more.
My recommendation is at least 8 GB of memory, and 16 GB to be comfortable. Whatever you have, a few habits keep your computer responsive:
- Run one lab at a time, and close other heavy apps, such as a browser with dozens of tabs.
- Stop what you are not using. Ollama is only needed for Chapters 1 and 2, while you build a dataset (Chapters 4 and 10), and for your own questions in the Chapter 11 inspector. The database container is only needed in Chapters 7, 8, and 10.
- Cap Docker's memory. Docker Desktop lets its virtual machine use up to half of your computer's
memory by default. The database in this track needs about 300 MB, so a 2 to 4 GB limit is plenty.
On macOS, Linux, and Windows with Hyper-V, set it in Docker Desktop under Settings > Resources >
Advanced. With WSL 2 on Windows, set it in a
.wslconfigfile in your user folder, as Microsoft's WSL documentation describes. Podman's virtual machine starts at 2 GB unless you changed it. - In Labs 9 and 11, lower
THREADSif your computer still struggles. It is at the top ofrerankers.pyin Lab 9 and ofstack.pyin Lab 11. It only changes how long the lab takes, not its results.
Step 1: uv and Ollama​
If uv --version and ollama --version both print a version number in your terminal, skip to
Step 2. If not, follow Foundations Chapter 0: Set Up Your Machine,
Steps 1 and 4, then come back.
Step 2: Pull the embedding model​
The chat model from Foundations (llama3.2) writes text. It cannot turn text into a vector. This
track uses a separate model built for that job:
ollama pull nomic-embed-text
It is about 270 MB. Every lab that embeds text uses it, so you only download it once.
Step 3: Get the code​
All of this track's labs ship in one ZIP:
- Download the Vector Databases labs ZIP.
- Unzip it wherever you keep code. You will get a
labs/vector-databases/folder with one subfolder per chapter. - Open that folder in VS Code, or
cdinto it in your terminal.
You reuse this one download for the whole track.
Step 4: Install Docker (needed from Chapter 7)​
Chapter 7 runs PostgreSQL, a database many companies already use, with pgvector, the extension that adds vector search to it. Installing a database by hand means different steps on every operating system, plus a server process you have to manage and later uninstall.
Docker avoids all of that. It runs a container: a packaged program that brings everything it needs with it. One command downloads a ready-made PostgreSQL with pgvector and starts it. One more command removes it, and nothing is left behind on your machine.
- macOS
- Windows
- Linux
Install Docker Desktop:
- Check your chip: Apple menu > About This Mac. It says either an Apple chip (M1, M2, and so on) or Intel.
- Download the matching installer from the Docker Desktop for Mac page.
- Open
Docker.dmgand drag Docker into Applications. - Open Docker from Applications and accept the subscription agreement.
Docker Desktop supports the current macOS release and the two before it, and needs at least 4 GB of RAM.
Docker Desktop on Windows runs on top of WSL 2 (Windows Subsystem for Linux), so install that first:
-
Open PowerShell as Administrator (right-click the Start button > Terminal (Admin) or Windows PowerShell (Admin)) and run:
wsl --install -
Restart your computer when it asks.
-
Download Docker Desktop for Windows from the Docker Desktop for Windows page and run
Docker Desktop Installer.exe. Keep Use WSL 2 selected. -
Start Docker Desktop and accept the subscription agreement.
You need a 64-bit Windows 10 (22H2) or Windows 11 (23H2 or later), and hardware virtualization turned on in your BIOS/UEFI settings. Docker's page lists the exact supported editions and builds. If Docker says virtualization is off, that BIOS setting is the fix.
Docker only supports versions of Windows that Microsoft still services. Microsoft ended standard support for Windows 10 in October 2025, so if you are still on Windows 10, check Docker's page before you install.
On Linux you install Docker Engine, the open-source core of Docker, directly. Follow the Docker Engine install guide for your distribution (Ubuntu, Debian, Fedora, and others each have a page).
On a personal learning machine, Docker's convenience script is the quickest route:
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
Docker does not recommend that script for production servers, but it is fine on a laptop you are learning on.
Then let your user run Docker without sudo:
sudo groupadd docker
sudo usermod -aG docker $USER
newgrp docker
groupadd may say the group already exists. That is fine. Membership in the docker group is
equivalent to admin rights on the machine, so only do this on a computer you control.
Is Docker Desktop really free?​
For this course, yes. Docker Desktop is free for personal use, education, non-commercial open source projects, and small businesses. Docker's terms require a paid subscription for commercial use in larger companies: more than 250 employees, or more than $10 million in annual revenue.
If you are following this course on a work laptop at a larger company, ask whether it already has a Docker subscription. If it does not, use Podman instead.
Prefer Podman?​
Podman is a free, open-source alternative to Docker. Every
docker command in this track works if you type podman instead.
- macOS: download the installer from podman.io.
- Windows: download the installer from podman.io. Like Docker Desktop, it runs on WSL 2.
- Linux: install it from your package manager, for example
sudo apt-get -y install podmanon Ubuntu or Debian, orsudo dnf -y install podmanon Fedora.
On macOS and Windows, Podman runs containers inside a small Linux virtual machine. Create and start it once:
podman machine init
podman machine start
After a restart, run podman machine start again before using Podman.
Step 5: Check that it works​
Run this in your terminal (PowerShell on Windows):
docker run --rm hello-world
You should see a message that starts with Hello from Docker!. That means Docker downloaded a tiny
test container, ran it, and cleaned it up (--rm removes the container when it exits).
With Podman, run podman run --rm hello-world. Podman prints its own hello message instead of
Docker's. Any friendly greeting means it worked.
Step 6 (optional): Use OpenAI instead of Ollama​
Every lab that embeds text supports PROVIDER=openai with OpenAI's text-embedding-3-small. Create
a key at platform.openai.com/api-keys, and paste it into the
lab's .env file when its README asks. Embedding the help-desk articles in Chapters 1 and 2 costs a
fraction of a cent. The shared dataset for Chapters 4 to 9 is bigger, about 2.9 million tokens, which
costs about 6 cents at OpenAI's October 2026 price of $0.02 per million tokens. The multi-hop dataset
for Chapters 10 and 11 is about 1.3 million tokens, under 3 cents.
Troubleshooting​
docker: command not found: your terminal cannot find thedockercommand. Either Docker is not installed, or your terminal was open before you installed it. On macOS, also open Docker Desktop once after installing, because it sets up the command on first launch. Then open a new terminal.Cannot connect to the Docker daemon: Docker Desktop is installed but not running. Open it and wait until it says it is running. On Linux, runsudo systemctl start docker.permission deniedon Linux: you skipped thedockergroup step, or have not logged out and back in since. Runnewgrp dockeror log out and back in.- Podman:
Cannot connect to Podman: the Podman machine is not running. Runpodman machine start.
Checkpoint​
Which chapters need Docker, and what does it run?
Chapters 7, 8, and 10. Docker runs PostgreSQL with the pgvector extension in a container, so you get a real database without installing PostgreSQL by hand, and can remove it cleanly afterward. Chapters 9 and 11 run in memory and do not need it.
Why does this track not use llama3.2, the chat model from Foundations?
It is a chat model: it generates text. The labs need vectors, which come from an embedding model.
nomic-embed-text is the free local one this track uses.
You are taking this course on a work laptop at a company with 2,000 employees. What should you install?
Podman, unless your company already pays for Docker Desktop. Docker requires a paid subscription
for commercial use at companies with more than 250 employees or more than $10 million in revenue.
Podman is free and open source, and every docker command in this track works with podman in its
place.
What's next​
Chapter 1 starts before any of these tools existed: a 1960s search system that could only match exact words, and the idea that fixed it by turning text into points in space.