Architecture (voir docs/ARCHITECTURE-LITELLM.md):
open-webui -> LiteLLM:4000
|- qwen3.6-27b -> jean-proxy:3012 -> Jean (.11:8080)
|- llama3.1-8b -> wol-proxy:3011 -> Ollama (.11:11434)
Nouveaux fichiers:
- wol-proxy/ (versionne l'app.py de prod deja en place)
- jean-proxy/ (clone du wol-proxy avec HEALTH_PATH=/health + retry post-WoL
pour services qui mettent du temps a demarrer apres WoL, ex: Jean qui
charge 14 Go en VRAM)
- litellm/config.yaml (routing par nom de modele, drop_params=true)
- docker-compose.litellm.yml (override ADDITIF: ajoute uniquement jean-proxy
et litellm, ne redemarre PAS open-webui/wol-proxy/hermes)
Teste en prod sur .27: Jean + Ollama repondent via LiteLLM:4000 avec
path-through de chat_template_kwargs.enable_thinking (raisonnement Qwen3.6
desactivable par requete). Zero impact hermes-webui/wol-proxy.
Basculer open-webui reste une etape manuelle (step 3 de la doc).
53 lines
2.6 KiB
YAML
53 lines
2.6 KiB
YAML
# ═══════════════════════════════════════════════════════════
|
||
# OVERRIDE litellm — Ajoute LiteLLM + jean-proxy a la stack Effi
|
||
#
|
||
# Usage :
|
||
# docker compose -f docker-compose.yml -f docker-compose.litellm.yml up -d litellm jean-proxy
|
||
#
|
||
# IMPORTANT : n ajoute QUE les services litellm + jean-proxy.
|
||
# Les services existants (open-webui, wol-proxy, hermes, qdrant, ...)
|
||
# ne sont PAS modifies, donc PAS de redemarrage involontaire.
|
||
#
|
||
# Une fois LiteLLM valide (curl :4000/v1/models), on pourra repointer
|
||
# open-webui en passant OLLAMA_BASE_URL=http://litellm:4000 — mais c est
|
||
# une etape de validation utilisateur, pas automatique.
|
||
# ═══════════════════════════════════════════════════════════
|
||
|
||
services:
|
||
|
||
# ─────────────────────────────────────────────────────────
|
||
# 1. jean-proxy — Reverse-proxy vers Jean (.11:8080) + WOL
|
||
# Clone du wol-proxy, meme MAC cible, port cible = 8080
|
||
# Ecoute :3012 sur le host (network_mode: host)
|
||
# ─────────────────────────────────────────────────────────
|
||
jean-proxy:
|
||
build: ./jean-proxy
|
||
container_name: jean-proxy
|
||
restart: unless-stopped
|
||
network_mode: host
|
||
environment:
|
||
- TARGET_HOST=${OLLAMA_HOST}
|
||
- TARGET_PORT=8080
|
||
- TARGET_MAC=${PC_GAMING_MAC}
|
||
- LISTEN_PORT=3012
|
||
- WAKE_TIMEOUT=60
|
||
- CHECK_INTERVAL=5
|
||
- BROADCAST_IP=${BROADCAST_IP}
|
||
|
||
# ─────────────────────────────────────────────────────────
|
||
# 2. LiteLLM proxy — Endpoint OpenAI unique pour open-webui
|
||
# Ecoute :4000 sur le host (network_mode: host pour joindre
|
||
# wol-proxy :3011 et jean-proxy :3012 sur le host)
|
||
# ─────────────────────────────────────────────────────────
|
||
litellm:
|
||
image: ghcr.io/berriai/litellm:main-stable
|
||
container_name: litellm
|
||
restart: unless-stopped
|
||
network_mode: host
|
||
volumes:
|
||
- ./litellm/config.yaml:/app/config.yaml:ro
|
||
command:
|
||
- "--config=/app/config.yaml"
|
||
- "--port=4000"
|
||
- "--num_workers=1"
|