Blogs

illustrations illustrations illustrations illustrations illustrations illustrations illustrations

DHA: Private, Containerized LLM and RAG Infrastructure

Published on Nov 24, 2026 by Samer Kharboush on LLM RAG FastAPI

DHA: Private, Containerized LLM and RAG Infrastructure

For DHA I built a private, containerized LLM/RAG infrastructure that runs entirely locally, giving the team real-time chat grounded in their own documents without sending data to external services.

Overview

DHA is a private deployment: a containerised retrieval-augmented generation stack that keeps both the documents and the model on the client’s own infrastructure. The system provides real-time chat over the client’s document base, with speech input, and is packaged so it can be moved between environments without rebuilding by hand. Nothing in the design depends on an external model API: inference, retrieval and state all run inside the client’s perimeter.

Goals

The goal is a self-hosted assistant that answers from the client’s own documents rather than the model’s memory, with no data leaving the premises. That means local inference, persistent session state that survives restarts, support for multiple users without a shared external database, and a deployment story simple enough for the client to host and extend themselves.

My role

I built the system end to end: the service layer, the retrieval and orchestration, local inference, session state, speech-to-text, and the containerised packaging. I own the architecture and the deployment, and the same image can be handed over and run by the client.

Architecture

The backend is a containerised RAG service. FastAPI provides the service layer; LangChain handles orchestration of the retrieval and generation steps; Ollama serves local LLM inference, so no external API is involved and no document text leaves the machine. Redis holds state and supports real-time chat sessions, so conversations survive restarts and multiple users can be served without a shared external database. Retrieval keeps answers grounded in the user’s own documents rather than the model’s memory, which is what makes the answers specific to the client rather than generic. Whisper provides speech-to-text so users can speak to the assistant instead of typing, which matters for hands-busy workflows. Everything is packaged with Docker for reproducible, on-premise deployment, so the same image can be moved between environments without rebuilding it by hand.

Tech stack

FastAPI, LangChain, Ollama, Redis, Whisper, Docker. The system is a client deployment, so the document corpus, the choice of local model and the client’s own configuration are private and not described here; what is public is the shape of the system — containers for the service layer, orchestration, inference, state and speech, all running inside the client’s perimeter. The private repository is not published.

Results & achievements

No public metrics are published for this private system, so results are stated as delivered capabilities. The delivered system provides real-time chat grounded in the client’s documents; local LLM inference with no external calls; persistent sessions that survive restarts; multi-user support without a shared external database; speech input for hands-busy workflows; and a reproducible containerised deployment the client can host and extend. The private repository is available on request.

No public repository; the DHA code is private and available on request.

Similar Stories