---
title: "Run Embedding Models and Unlock Semantic Search with Docker Model Runner"
description: "Docker Model Runner can serve embedding models locally, so semantic search and RAG pipelines run without sending private data to a hosted API and without per-call costs."
url: "https://swe.quest/articles/run-embedding-models-and-unlock-semantic-search-with-docker-model-runner-9d62d61c93466830"
canonical: "https://www.docker.com/blog/run-embedding-models-for-semantic-search/"
source: "Docker"
published: "2025-12-01"
difficulty: "medium"
kind: "How-to"
reading_minutes: 6
tags: ["vector-search","inference","search","rag","containers"]
---

# Run Embedding Models and Unlock Semantic Search with Docker Model Runner

A post on [Docker](https://swe.quest/sources/docker.md), published 2025-12-01, 6 min read, How-to. Original: [https://www.docker.com/blog/run-embedding-models-for-semantic-search/](https://www.docker.com/blog/run-embedding-models-for-semantic-search/)

## Summary

Docker Model Runner can serve embedding models locally, so semantic search and RAG pipelines run without sending private data to a hosted API and without per-call costs. Embeddings map text and code to vectors where semantically related items cluster, and cosine similarity ranks documents against a query. Getting started takes two steps: pull a model such as ai/qwen3-embedding, then call the OpenAI-style /engines/v1/embeddings endpoint on localhost. A sketched code-search workflow chunks a codebase, embeds the chunks, stores the vectors (a file in the demo, a vector database like Milvus, Qdrant or pgvector in practice) and ranks them by cosine similarity.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Vector search](https://swe.quest/tags/vector-search.md) (Data & databases)
- [Inference & serving](https://swe.quest/tags/inference.md) (AI & ML)
- [Search](https://swe.quest/tags/search.md) (Backend & APIs)
- [RAG & retrieval](https://swe.quest/tags/rag.md) (AI & ML)
- [Containers](https://swe.quest/tags/containers.md) (Infrastructure)

## Prerequisites

- Docker basics ([easy posts on Containers](https://swe.quest/tags/containers.md?difficulty=easy))
- HTTP APIs ([easy posts on API design](https://swe.quest/tags/api-design.md?difficulty=easy))

## Keywords

Docker Model Runner, Qwen3 Embedding, cosine similarity, OCI artifacts, pgvector, Qdrant, Milvus

## Related posts

- [How Hugging Face Inference Endpoints, Jobs, and Buckets Power Search on Papers with Code](https://swe.quest/articles/how-hugging-face-inference-endpoints-jobs-and-buckets-power-search-on-papers-ac5d7c4e21a2638e.md): Hugging Face · 2026-08-21 · Medium · 10 min read · Search, Vector search, PostgreSQL, Inference & serving, Data pipelines
  Papers with Code search combines PostgreSQL full-text search with pgvector semantic search over Qwen3-Embedding-0.6B vectors, fused by weighted reciprocal rank fusion (k=60), with exact-title, arXiv-ID and navigational matches pinned on top.
- [Getting Started With Embeddings](https://swe.quest/articles/getting-started-with-embeddings-f83c278b13779a68.md): Hugging Face · 2022-06-23 · Medium · 11 min read · Search, Machine learning, Python, Vector search
  Embeddings turn text or images into fixed-length vectors that capture meaning, so semantic similarity becomes a distance calculation.
- [Storing OpenAI embeddings in Postgres with pgvector](https://swe.quest/articles/storing-openai-embeddings-in-postgres-with-pgvector-19a5d03614f86fc6.md): Supabase · 2023-02-06 · Medium · 11 min read · Vector search, PostgreSQL, RAG & retrieval, LLMs
  pgvector adds a vector data type and distance operators (Euclidean \<-\>, negative inner product \<#\>, cosine \<=\>) to Postgres, so OpenAI text-embedding-ada-002 embeddings (1536 dimensions) can be stored and queried for similarity directly in the database.
- [Local RAG with Ollama, Mistral, and Turso](https://swe.quest/articles/local-rag-with-ollama-mistral-and-turso-c9414cc4e6a29ef6.md): Turso · 2025-01-08 · Medium · 8 min read · RAG & retrieval, Vector search, SQLite, Local-first & sync, TypeScript
  A local retrieval-augmented generation pipeline can be built in TypeScript using Ollama's Mistral model for both embeddings and generation, with libSQL storing documents and 4096-dimension F32\_BLOB vectors in a single SQLite file indexed via libsql\_vector\_idx.
- [Building AI Search on Heroku](https://swe.quest/articles/building-ai-search-on-heroku-fdce052b7ed2fc31.md): Heroku Engineering · 2026-01-29 · Medium · 3 min read · RAG & retrieval, Vector search, PostgreSQL, Search, LLMs
  A reference RAG architecture on Heroku pairs pgvector cosine-similarity search (top 20 chunks) with a cross-encoder reranker (Cohere Rerank 3.5, top 5), so answers come from documents that actually address the query rather than ones that are merely semantically close.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
