Sign inSign up

natanfreeman/rag-openwebui

By natanfreeman

•Updated 2 months ago

Qdrant and Better Pic Docling document ingestion in one container.

Image
0

141

natanfreeman/rag-openwebui repository overview

⁠Better Pic Docling + Qdrant

The container runs Qdrant on port 6333 and the Docling ingestion API on port 8000.

This is a Linux AMD64 container for turning documents into a searchable Qdrant knowledge base.

⁠What the parts do

  • Qdrant is the vector database. It stores document chunks and their embedding vectors, then finds the chunks closest to a search query.
  • Better Pic Docling is the document indexer. It accepts PDFs, Office files, images, HTML, Markdown, and other supported files. It converts them to Markdown, creates chunks, requests embeddings, and writes the result to Qdrant.

Qdrant and Docling run inside this container. The large AI models do not.

  • OCR text and figure descriptions are generated by a remote vision model using an OpenAI-compatible /v1/chat/completions endpoint.
  • Embeddings are generated by a separate remote model using an OpenAI-compatible /v1/embeddings endpoint.

Those endpoints can be two keyless vLLM servers, authenticated OpenAI-compatible servers, or supported hosted providers. They may use different hosts, ports, models, and API keys. Open WebUI is not included in this image.

⁠Ports

PortPurpose
8000File upload and ingestion-job API
6333Qdrant REST API and dashboard
6334Qdrant gRPC API

⁠Run it

Create .env. This example uses two keyless vLLM servers:

COLLECTION=engineering-documents

GENERATION_BASE_URL=http://host.docker.internal:8001/v1
GENERATION_MODEL=your-vision-model

EMBEDDING_MODE=openai-compatible
EMBEDDING_BASE_URL=http://host.docker.internal:8002/v1
EMBEDDING_MODEL=your-embedding-model

For authenticated servers, also set the appropriate keys:

GENERATION_API_KEY=...
EMBEDDING_API_KEY=...

Start the container:

docker run --detach \
  --name docling-qdrant \
  --restart unless-stopped \
  --publish 127.0.0.1:8000:8000 \
  --publish 127.0.0.1:6333:6333 \
  --publish 127.0.0.1:6334:6334 \
  --env-file .env \
  --add-host host.docker.internal:host-gateway \
  --volume docling-qdrant-data:/data \
  natanfreeman/rag-openwebui:latest

Upload a document:

curl --fail-with-body \
  -F "[email protected]" \
  -F "collection=engineering-documents" \
  http://127.0.0.1:8000/v1/ingestions

The upload returns a job ID. Poll its status with:

curl http://127.0.0.1:8000/v1/ingestions/JOB_ID

Open the interfaces in a browser:

  • Upload API: http://127.0.0.1:8000/docs
  • Qdrant dashboard: http://127.0.0.1:6333/dashboard

All Qdrant data, uploads, Markdown, and job state are stored in the docling-qdrant-data volume. Set separate INGEST_API_KEY and QDRANT_API_KEY values before exposing either HTTP port beyond localhost.

Open WebUI should connect to the Qdrant collection and use the same embedding model and query-prefix convention as the indexer.

Tag summary

Content type

Image

Digest

sha256:189bb5e77…

Size

1.5 GB

Last updated

2 months ago

docker pull natanfreeman/rag-openwebui