RUNLOCALAIv38
->Will it run?Best GPUCompareTroubleshootStartLearnPulseModelsHardwareToolsBench
Run check
RUNLOCALAI

Independently operated catalog for local-AI hardware and software. Hand-written verdicts. Source-cited claims. Reproducible commands when we have them.

OP·Eruo Fredoline
DIR
  • Models
  • Hardware
  • Tools
  • Benchmarks
TOOLS
  • Will it run?
  • Compare hardware
  • Cost vs cloud
  • Choose my GPU
  • Prompting kits
  • Quick answers
REF
  • All buyer guides
  • Learn local AI
  • Methodology
  • Glossary
  • Errors KB
  • Trust
EDITOR
  • About
  • Author
  • How we make money
  • Editorial policy
  • Contact
LEGAL
  • Privacy
  • Terms
  • Sitemap
MAIL · MONTHLY DIGEST
Get monthly local AI changes
Monthly recap. No spam.
DISCLOSURE

Some links on this site are affiliate links (Amazon Associates and other first-class retailers). When you buy through them, we earn a small commission at no extra cost to you. Affiliate links do not influence our verdicts — there are cards we rate highly that we don't have affiliate relationships with, and cards that sell well that we refuse to recommend. Read more →

© 2026 runlocalai.coIndependently operated
RUNLOCALAI · v38
  1. >
  2. Home
  3. /Learn
  4. /Courses
  5. /Vector Stores and Embeddings
  6. /Ch. 3
Vector Stores and Embeddings

03. ChromaDB Setup

Chapter 3 of 18 · 15 min
KEY INSIGHT

ChromaDB stores vectors alongside metadata and provides a Pythonic interface for vector operations without external services. ChromaDB is a dedicated vector database that runs entirely in-process. No server, no Docker, no API keys. It persists data to disk as SQLite under the hood. Install it with pip: ```bash pip install chromadb==0.4.22 ``` The client connects to a persistent database: ```python import chromadb from chromadb.config import Settings # Creates ./chroma_db directory if it doesn't exist client = chromadb.PersistentClient(path="./chroma_db") # Or in-memory (data lost on restart) client = chromadb.Client() ``` ChromaDB version matters. Version 0.4.x changed the API significantly from 0.3.x. The examples here use 0.4.22. Common setup error: trying to use ChromaDB with an older version of the `chromadb` package that conflicts with another dependency. If you see `ImportError: cannot import name 'Client' from 'chromadb'`, check your installed version: ```bash pip show chromadb ``` The ChromaDB package was renamed from `chromadb` to `chromadb`—confusing, but make sure you have the correct package installed and not the deprecated `chroma-db` or `chromadb-old` packages from testing phases.

Local verification checkpoint

Run the smallest example from this chapter in a local workspace and record the package version, runtime, data path, and observed output. If the result depends on model size, vector count, CPU/GPU backend, or available memory, note that constraint beside the exercise so the lesson remains reproducible.

Local verification checkpoint

Run the smallest example from this chapter in a local workspace and record the package version, runtime, data path, and observed output. If the result depends on model size, vector count, CPU/GPU backend, or available memory, note that constraint beside the exercise so the lesson remains reproducible.

EXERCISE

Install ChromaDB, create a PersistentClient, and verify the database directory was created on disk.

← Chapter 2
Embedding Models Compared
Chapter 4 →
ChromaDB Collections