Build Full Stack LLM Chat App with Docker Model Runner, LangChain and Streamlit

Python Simplified β€’ July 17, 2025
Video Thumbnail
Python Simplified Logo

Python Simplified

@pythonsimplified

About

Hi everyone! My name is Mariya and I'm a software developer from Sofia, Bulgaria. I film programming tutorials about Computer Science Concepts, GUI Applications, Machine Learning and Artificial Intelligence, Automation and Web Scraping, Data Science and even Math! πŸ€“ I'm here to help you with your programming journey (in particular - your Python programming journey πŸ˜‰) and show you how many beautiful and powerful things we can do with code! πŸ’ͺπŸ’ͺπŸ’ͺ

Video Description

In this tutorial, I’ll show you how to build a complete AI assistant app from scratch! πŸš€ You’ll learn how to run open-source LLMs locally using Docker’s brand-new Model Runner (via CLI and as a backend service). We will then combine it with a clean, traditional, chat interface using Streamlit (a very quick and simple GUI library!) And the best part is - we will easily switch from chatting with a small local model to a powerful cloud-based model on OpenRouter - all while saving the conversation history so you don’t have to repeat yourself. YES, BOTH MODELS WILL BE AWARE OF THE ENTIRE CONVERSATION! EVEN THE PARTS WHERE IT WASN'T TALKING! 🀯🀯🀯 πŸ“¦ Tools Used ---------------------------------------------- πŸ”Ή Docker Model Runner πŸ”Ή Langchain πŸ”Ή Streamlit πŸ”Ή OpenRouter πŸ”Ή Docker Compose πŸ› οΈ What You'll Build -------------------------------------------------- πŸ”Ή Local LLM serving with Docker Model Runner πŸ€– πŸ”Ή A chat GUI with Streamlit πŸ’» πŸ”Ή Memory for past chat messages πŸ’‘ πŸ”Ή One-click switch to a big cloud model ☁️ πŸ”Ή Fully containerized setup with Docker Compose πŸ‹ By the end of this video, you’ll have a production-ready AI chatbot πŸ€– that runs both locally and in the cloud, with all dependencies packaged in Docker containers! This project is the perfect foundation for more advanced AI apps (coming soon... πŸ˜‰). πŸ’» Code and Resources: -------------------------------------------------- ⭐ Full Tutorial Code: https://github.com/MariyaSha/simple_AI_assistant.git ⭐ Docker Model Runner documentation: https://dockr.ly/4nT2saM ⭐ Docker AI Namespace - Find the model you need here: https://dockr.ly/4eTeLQl πŸƒβ€β™€οΈβ€βž‘οΈ Base URL for Docker Model Runner: -------------------------------------------------- http://model-runner.docker.internal/engines/llama.cpp/v1 ⏰ Time Stamps: -------------------------------------------------- 01:25 - Docker Desktop Setup 02:14 - Docker Model Runner CLI 03:22 - Intro to Building Apps with Docker 04:30 - Basic App with Docker Compose [CLI] 08:39 - Docker Model Runner in Docker Compose and Langchain 11:19 - Chat App GUI with Streamlit 18:02 - Store Chat History in User Sessions 21:57 - LLM Chat Context 23:26 - Run Cloud LLM via OpenRouter 28:42 - Best Practices 30:04 - Thanks for Watching! πŸŽ₯ Related Videos: -------------------------------------------------- ⭐ Docker Quickstart for Beginners: https://youtu.be/-l7YocEQtA0 ⭐ WSL Setup: https://youtu.be/luM5kwH6tjQ If you find this tutorial helpful, don’t forget to like πŸ‘ subscribe πŸ”” and drop your questions in the comments πŸ’Œ. Happy coding! 🎯 The Workflow: -------------------------------------------------- 1. A step by step pipeline of bringing the chat app to life. 2. How to install and enable Docker Model Runner. 3. Creating a minimal Python + Docker app. 4. Setting up Docker Compose with local model services. 5. Building a Streamlit chat interface. 6. Storing and passing conversation context. 7. Connecting to OpenRouter for large models. 8. Best practices for environment variables, requirements, and healthchecks. 🀝 Let's Connect 🀝 -------------------------------------------------- πŸ”— Github: https://github.com/mariyasha πŸ”— X: https://x.com/MariyaSha888 πŸ”— LinkedIn: https://ca.linkedin.com/in/mariyasha888 πŸ”— Blog: https://www.pythonsimplified.org πŸ”— Discord: https://discord.com/invite/wgTTmsWmXA πŸ’³ Credits πŸ’³ -------------------------------------------------- - beautiful icons by FlatIcon - beautiful graphics by Freepik #python #docker #pythonprogramming #LLM #LangChain #LocalLLM #Streamlit #AgenticAI #coding #software #ai

You May Also Like

Craft Your AI Chat App Today

AI-recommended products based on this video

Loading...
[2025 New Version] CuleedTec Wireless Switch Controller, Switch Pro Controller Compatible with Switch/Lite/OLED, Manette Switch Remote Gamepad with 6-Axis Gyro, Dual Motors, Wake-up and Turbo

[2025 New Version] CuleedTec Wireless Switch Controller, Switch Pro Controller Compatible with Switch/Lite/OLED, Manette Switch Remote Gamepad with 6-Axis Gyro, Dual Motors, Wake-up and Turbo

(8,834)
$25.99
600+ bought in past month
Loading...
Samsung 9100 PRO Series - 4TB PCIe 5.0 x4, NVMe 2.0, M.2 Internal SSD, Up to 14,800MB/s, Fast Speed, Thermal Contorl, MZ-VAP4T0B/AM [Canada Version]

Samsung 9100 PRO Series - 4TB PCIe 5.0 x4, NVMe 2.0, M.2 Internal SSD, Up to 14,800MB/s, Fast Speed, Thermal Contorl, MZ-VAP4T0B/AM [Canada Version]

(167)
$679.97$632.37
FREE delivery Tue, Jun 17
Loading...
SAMSUNG 990 PRO SSD 4TB PCIe Gen4 NVMe M.2 Internal Solid State Hard Drive, Up to 7,450MB/s, Heat Control, Direct Storage and Memory Expansion, MZ-V9P4T0B/AM [Canada Version]

SAMSUNG 990 PRO SSD 4TB PCIe Gen4 NVMe M.2 Internal Solid State Hard Drive, Up to 7,450MB/s, Heat Control, Direct Storage and Memory Expansion, MZ-V9P4T0B/AM [Canada Version]

(12,872)
$499.97$407.80
FREE delivery Tue, Jun 17
300+ bought in past month
Loading...
Seasonic Focus V4 GX-1000 (ATX3) - 1000W - 80+ Gold - ATX 3.0 & PCIe 5.1 Ready -Full-Modular -ATX Form Factor -Premium Japanese Capacitor -10 Year Warranty -Nvidia RTX 30/40 Super & AMD GPU Compatible

Seasonic Focus V4 GX-1000 (ATX3) - 1000W - 80+ Gold - ATX 3.0 & PCIe 5.1 Ready -Full-Modular -ATX Form Factor -Premium Japanese Capacitor -10 Year Warranty -Nvidia RTX 30/40 Super & AMD GPU Compatible

(22)
$423.35
FREE delivery Oct 8 - 10
Loading...
PNY NVIDIA Quadro RTX 4000 - The World’S First Ray Tracing GPU

PNY NVIDIA Quadro RTX 4000 - The World’S First Ray Tracing GPU

(203)
$670.57$399.99
FREE delivery Feb 23 - 27
Loading...
【DDR3 RAM Laptop Only】 GIGASTONE 16GB Kit (2x8GB) DDR3/DDR3L 1600MHz (1333MHz) PC3-12800 (PC3-10600) CL11 1.35V/1.5V 2Rx8 SODIMM 204 Pin Unbuffered Non ECC High Performance Notebook Memory Upgrade

【DDR3 RAM Laptop Only】 GIGASTONE 16GB Kit (2x8GB) DDR3/DDR3L 1600MHz (1333MHz) PC3-12800 (PC3-10600) CL11 1.35V/1.5V 2Rx8 SODIMM 204 Pin Unbuffered Non ECC High Performance Notebook Memory Upgrade

(1,599)
$32.99
FREE delivery Sun, Jun 15 on your first order
50+ bought in past month
Loading...
TEAMGROUP Elite DDR4 16GB Kit (2 x 8GB) 3200MHz PC4-25600 CL22 Unbuffered Non-ECC 1.2V SODIMM 260-Pin Laptop Notebook PC Computer Memory Module Ram Upgrade - TED416G3200C22DC-S01

TEAMGROUP Elite DDR4 16GB Kit (2 x 8GB) 3200MHz PC4-25600 CL22 Unbuffered Non-ECC 1.2V SODIMM 260-Pin Laptop Notebook PC Computer Memory Module Ram Upgrade - TED416G3200C22DC-S01

(3,629)
$57.46
$7.05 delivery Jun 17 - 20Only 3 left in stock.