How to Run a Vector Database Locally! Weaviate in Docker, No API Key
Most vector database tutorials start by handing you an API key. This one runs Weaviate and its embedding model locally in Docker, with no key, sign-up, or bill. I build a local Weaviate vector database from one Docker Compose file: Weaviate in one container, a MiniLM embedding model in the other. Then I load 5,000 support tickets and search them by meaning on a laptop. Along the way: why you have to publish both the REST and gRPC ports (and the confusing hang you get if you don't), the localhost trap inside Docker networking, why an explicit schema beats auto-schema, and why only the text that carries meaning should be vectorized. Then batch loading and where the bottleneck really is, why the index lives in RAM, semantic search with near_text, filtered search, and when hybrid search is the only way to find an exact invoice number. ⏱️ Chapters 0:00 - Why run a vector database locally 1:03 - Architecture: Weaviate + a local embedding model 2:36 - The Docker Compose file 2:54 - REST and gRPC: why you need both ports 3:40 - Wiring in the vectorizer (and the localhost trap) 4:43 - Starting the stack 5:03 - MiniLM: 384 dimensions and the trade-off 5:41 - Generating 5,000 support tickets 7:10 - Creating an explicit collection schema 9:16 - Client timeouts: fail fast, never hang 10:06 - Batch loading and the real bottleneck 12:12 - Disk vs memory: sizing the machine 12:47 - Semantic search with near_text 14:58 - Filtered vector search 16:00 - Hybrid search for exact identifiers 17:30 - Recap: three things to remember 🔗 Links Weaviate: https://weaviate.io Weaviate Docker Compose docs: https://docs.weaviate.io/deploy/installation-guides/docker-installation Weaviate Python client: https://docs.weaviate.io/weaviate/client-libraries/python sentence-transformers all-MiniLM-L6-v2: https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2 Docker: https://www.docker.com