Skip to content

Instantly share code, notes, and snippets.

@nateclos
Created November 29, 2025 19:54
Show Gist options
  • Select an option

  • Save nateclos/8f7c49d4c66f3db20b2f5d1901ff7f0c to your computer and use it in GitHub Desktop.

Select an option

Save nateclos/8f7c49d4c66f3db20b2f5d1901ff7f0c to your computer and use it in GitHub Desktop.
Local LLM Docker Compose
services:
ollama:
image: ollama/ollama
container_name: ollama
volumes:
- ollama:/root/.ollama
ports:
- "11434:11434"
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
restart: unless-stopped
open-webui:
image: ghcr.io/open-webui/open-webui:main
container_name: open-webui
volumes:
- open-webui:/app/backend/data
ports:
- "3000:8080"
environment:
- ENABLE_RAG_WEB_SEARCH=true
- RAG_WEB_SEARCH_ENGINE=searxng
- RAG_WEB_SEARCH_RESULT_COUNT=5
- RAG_WEB_SEARCH_CONCURRENT_REQUESTS=10
- SEARXNG_QUERY_URL=http://searxng:8080/search?q=<query>&format=json
extra_hosts:
- "host.docker.internal:host-gateway"
restart: unless-stopped
stable-diffusion-webui:
image: universonic/stable-diffusion-webui:latest
container_name: stable-diffusion
volumes:
- stable-diffusion:/data
- ~/docker/llms/sd-outputs:/app/stable-diffusion-webui/outputs
ports:
- "7860:8080"
environment:
- NVIDIA_VISIBLE_DEVICES=all
- COMMANDLINE_ARGS=--api --xformers --listen --port 8080 --enable-insecure-extension-access
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
restart: unless-stopped
searxng:
image: searxng/searxng:latest
container_name: searxng
ports:
- "8080:8080"
volumes:
- ./searxng:/etc/searxng:rw
restart: unless-stopped
volumes:
ollama:
open-webui:
stable-diffusion:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment