- LiteLLM proxy with langfuse callbacks, postgres backends, and OpenRouter fallbacks. - Langfuse observability UI. - Pipecat voice pipeline (LiveKit + STT + TTS + LLM) and Silero TTS build contexts. - Ollama tuned for GPU (OLLAMA_NUM_GPU=999, mem_limit=4g, max 2 loaded models). - open-webui wired to litellm + faster-whisper + silero for voice. - litellm-config.yaml publishes oO's model aliases (tip-generator, embedder, judge) pointing at the host ollama on :11434 so ml/serving can call them via LiteLLM. .env skipped (secrets). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
186 lines
5.5 KiB
YAML
186 lines
5.5 KiB
YAML
services:
|
|
ollama:
|
|
image: ollama/ollama
|
|
container_name: ollama
|
|
ports:
|
|
- "11436:11434"
|
|
volumes:
|
|
- /mnt/ssd/ai/ollama:/root/.ollama
|
|
- /mnt/ssd/ai/open-webui:/app/backend/data
|
|
restart: always
|
|
environment:
|
|
# Allow qwen3:8b + qwen2.5:1.5b to coexist in VRAM (~6.7-7.7 GB on 8 GB GPU)
|
|
- OLLAMA_MAX_LOADED_MODELS=2
|
|
# One GPU inference at a time — prevents compute contention between models
|
|
- OLLAMA_NUM_PARALLEL=1
|
|
# Force all layers to GPU — fail instead of falling back to CPU
|
|
- OLLAMA_NUM_GPU=999
|
|
runtime: nvidia
|
|
mem_limit: 4g
|
|
|
|
ollama-cpu:
|
|
image: ollama/ollama
|
|
container_name: ollama-cpu
|
|
ports:
|
|
- "11435:11434"
|
|
volumes:
|
|
- /mnt/ssd/ai/ollama-cpu:/root/.ollama
|
|
restart: always
|
|
|
|
open-webui:
|
|
image: ghcr.io/open-webui/open-webui:main
|
|
container_name: open-webui
|
|
ports:
|
|
- "3125:8080"
|
|
volumes:
|
|
- /mnt/ssd/ai/open-webui:/app/backend/data
|
|
extra_hosts:
|
|
- "host.docker.internal:host-gateway"
|
|
restart: always
|
|
deploy:
|
|
resources:
|
|
reservations:
|
|
devices:
|
|
- driver: nvidia
|
|
count: all
|
|
capabilities: [gpu]
|
|
environment:
|
|
- ANTHROPIC_API_KEY=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
|
|
- OPENAI_API_BASE_URL=http://host.docker.internal:4000/v1
|
|
- OPENAI_API_KEY=dummy
|
|
# STT — Faster-Whisper large-v3-turbo
|
|
- AUDIO_STT_ENGINE=openai
|
|
- AUDIO_STT_OPENAI_API_BASE_URL=http://host.docker.internal:8880/v1
|
|
- AUDIO_STT_OPENAI_API_KEY=dummy
|
|
- AUDIO_STT_MODEL=deepdml/faster-whisper-large-v3-turbo-ct2
|
|
# TTS — Silero v4
|
|
- AUDIO_TTS_ENGINE=openai
|
|
- AUDIO_TTS_OPENAI_API_BASE_URL=http://host.docker.internal:8881/v1
|
|
- AUDIO_TTS_OPENAI_API_KEY=dummy
|
|
- AUDIO_TTS_MODEL=silero
|
|
- AUDIO_TTS_VOICE=onyx
|
|
|
|
litellm-db:
|
|
image: postgres:16-alpine
|
|
container_name: litellm-db
|
|
environment:
|
|
- POSTGRES_DB=litellm
|
|
- POSTGRES_USER=litellm
|
|
- POSTGRES_PASSWORD=litellm
|
|
volumes:
|
|
- /mnt/ssd/dbs/litellm/postgres:/var/lib/postgresql/data
|
|
restart: always
|
|
|
|
litellm:
|
|
image: ghcr.io/berriai/litellm:main-latest
|
|
container_name: litellm
|
|
ports:
|
|
- "4000:4000"
|
|
volumes:
|
|
- ./litellm-config.yaml:/app/config.yaml
|
|
environment:
|
|
- DATABASE_URL=postgresql://litellm:litellm@litellm-db:5432/litellm
|
|
- LITELLM_MASTER_KEY=sk-fjQC1BxAiGFSMs
|
|
- LANGFUSE_PUBLIC_KEY=${LANGFUSE_PUBLIC_KEY:-changeme}
|
|
- LANGFUSE_SECRET_KEY=${LANGFUSE_SECRET_KEY:-changeme}
|
|
- LANGFUSE_HOST=http://langfuse:3000
|
|
- OPENROUTER_API_KEY=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
|
|
command: ["--config", "/app/config.yaml", "--port", "4000"]
|
|
extra_hosts:
|
|
- "host.docker.internal:host-gateway"
|
|
depends_on:
|
|
- litellm-db
|
|
- langfuse
|
|
restart: always
|
|
|
|
langfuse-db:
|
|
image: postgres:16-alpine
|
|
container_name: langfuse-db
|
|
environment:
|
|
- POSTGRES_DB=langfuse
|
|
- POSTGRES_USER=langfuse
|
|
- POSTGRES_PASSWORD=langfuse
|
|
volumes:
|
|
- /mnt/ssd/dbs/langfuse/postgres:/var/lib/postgresql/data
|
|
restart: always
|
|
|
|
langfuse:
|
|
image: ghcr.io/langfuse/langfuse:2
|
|
container_name: langfuse
|
|
ports:
|
|
- "3200:3000"
|
|
environment:
|
|
- DATABASE_URL=postgresql://langfuse:langfuse@langfuse-db:5432/langfuse
|
|
- NEXTAUTH_URL=https://lf.alogins.net
|
|
- NEXTAUTH_SECRET=532a746b24ac40afa39f9d317031cab94d4d6881107ea3b1209b28020f1a9761
|
|
- SALT=7927b3b0092afe4542274940b557becea6418a5fed79f7acd25c3a789349fdc9
|
|
- AUTH_DISABLE_SIGNUP=true
|
|
depends_on:
|
|
- langfuse-db
|
|
restart: always
|
|
|
|
searxng:
|
|
image: docker.io/searxng/searxng:latest
|
|
container_name: searxng
|
|
volumes:
|
|
- /mnt/ssd/ai/searxng/config/:/etc/searxng/
|
|
- /mnt/ssd/ai/searxng/data/:/var/cache/searxng/
|
|
restart: always
|
|
ports:
|
|
- "11437:8080"
|
|
|
|
qdrant:
|
|
image: qdrant/qdrant
|
|
container_name: qdrant
|
|
ports:
|
|
- "6333:6333"
|
|
- "6334:6334"
|
|
restart: always
|
|
volumes:
|
|
- /mnt/ssd/dbs/qdrant:/qdrant/storage:z
|
|
|
|
faster-whisper:
|
|
image: fedirz/faster-whisper-server:latest-cuda
|
|
container_name: faster-whisper
|
|
runtime: nvidia
|
|
ports:
|
|
- "8880:8000"
|
|
environment:
|
|
- WHISPER__MODEL=deepdml/faster-whisper-large-v3-turbo-ct2
|
|
- WHISPER__INFERENCE_DEVICE=cuda
|
|
- WHISPER__COMPUTE_TYPE=int8
|
|
- WHISPER__LANGUAGE=ru
|
|
- NVIDIA_VISIBLE_DEVICES=all
|
|
- NVIDIA_DRIVER_CAPABILITIES=compute,utility
|
|
volumes:
|
|
- /mnt/ssd/ai/faster-whisper:/root/.cache/huggingface
|
|
restart: always
|
|
|
|
silero-tts:
|
|
build: ./silero-tts
|
|
container_name: silero-tts
|
|
ports:
|
|
- "8881:8881"
|
|
volumes:
|
|
- /mnt/ssd/ai/silero-tts:/cache/torch
|
|
restart: always
|
|
|
|
pipecat:
|
|
build: ./pipecat
|
|
container_name: pipecat
|
|
ports:
|
|
- "8882:8882"
|
|
environment:
|
|
- LIVEKIT_URL=ws://host.docker.internal:7880
|
|
- LIVEKIT_PUBLIC_URL=wss://lk.alogins.net
|
|
- LIVEKIT_API_KEY=devkey
|
|
- LIVEKIT_SECRET=ef3ef4b903ca8469b09b2dd7ab6af529c4d2f3c95668f53832fc351cf67777a9
|
|
- ADOLF_URL=http://host.docker.internal:8000/v1
|
|
- STT_URL=http://host.docker.internal:8880/v1
|
|
- TTS_URL=http://host.docker.internal:8881/v1
|
|
- STT_MODEL=deepdml/faster-whisper-large-v3-turbo-ct2
|
|
- TTS_VOICE=onyx
|
|
extra_hosts:
|
|
- "host.docker.internal:host-gateway"
|
|
restart: unless-stopped
|