Skip to main content

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​

ToolWhy this track needs itNeeded from
uvRuns every lab and installs its Python packages into a private folder.Chapter 1
Ollama + nomic-embed-textA free embedding model that runs on your own machine.Chapter 1
Docker or PodmanRuns PostgreSQL with pgvector in a container, so you do not install a database by hand.Chapter 7
(Optional) OpenAI API keyUse 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:

StepTimePeak memoryCPU
Labs 1 to 3a few seconds eachup to about 0.9 GB (Lab 3)1 core
Shared dataset, built once in Chapter 4about 3 minutesabout 0.4 GB, plus about 0.6 GB for the embedding model in OllamaOllama uses the GPU when it can
Labs 4, 5, and 612 seconds to 1 minuteup to 1 GB1 core
Lab 7about 25 secondsabout 0.3 GB, plus about 0.3 GB inside the database containerunder 1 core
Lab 8about 20 secondsabout 1.2 GBunder 1 core
Lab 9about 70 secondsabout 1.9 GB4 cores
Multi-hop dataset, built once in Chapter 10about 1.5 minutesabout 0.4 GB, plus about 0.6 GB for the embedding model in OllamaOllama uses the GPU when it can
Lab 10under a minuteabout 0.4 GB1 core
Lab 11 (capstone)about 1 minuteabout 1.7 GB3 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 .wslconfig file 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 THREADS if your computer still struggles. It is at the top of rerankers.py in Lab 9 and of stack.py in 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:

  1. Download the Vector Databases labs ZIP.
  2. Unzip it wherever you keep code. You will get a labs/vector-databases/ folder with one subfolder per chapter.
  3. Open that folder in VS Code, or cd into 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.

Install Docker Desktop:

  1. Check your chip: Apple menu > About This Mac. It says either an Apple chip (M1, M2, and so on) or Intel.
  2. Download the matching installer from the Docker Desktop for Mac page.
  3. Open Docker.dmg and drag Docker into Applications.
  4. 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.

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 podman on Ubuntu or Debian, or sudo dnf -y install podman on 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 the docker command. 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, run sudo systemctl start docker.
  • permission denied on Linux: you skipped the docker group step, or have not logged out and back in since. Run newgrp docker or log out and back in.
  • Podman: Cannot connect to Podman: the Podman machine is not running. Run podman 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.