mirror of
https://github.com/open-webui/benchmark.git
synced 2026-07-21 09:15:24 -04:00
41 lines
1.3 KiB
YAML
41 lines
1.3 KiB
YAML
# Docker Compose configuration for Open WebUI benchmarking
|
|
# This configuration includes resource constraints based on compute profiles
|
|
|
|
services:
|
|
open-webui:
|
|
image: ghcr.io/open-webui/open-webui:${WEBUI_DOCKER_TAG:-main}
|
|
container_name: open-webui-benchmark
|
|
volumes:
|
|
- open-webui-benchmark-data:/app/backend/data
|
|
ports:
|
|
# Maps host port (default 8080) to container port 8080 (Open WebUI default)
|
|
- "${OPEN_WEBUI_PORT:-8080}:8080"
|
|
environment:
|
|
- WEBUI_SECRET_KEY=${WEBUI_SECRET_KEY:-benchmark-secret-key}
|
|
- ENABLE_WEBSOCKET_SUPPORT=true
|
|
- OLLAMA_BASE_URL=${OLLAMA_BASE_URL:-}
|
|
- ENABLE_CHANNELS=${ENABLE_CHANNELS:-true}
|
|
- OPENAI_API_KEY=${OPENAI_API_KEY:-}
|
|
extra_hosts:
|
|
- host.docker.internal:host-gateway
|
|
restart: unless-stopped
|
|
# Resource constraints - adjust based on compute profile
|
|
# Default profile: 2 CPUs, 8GB RAM
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
cpus: "${CPU_LIMIT:-2.0}"
|
|
memory: "${MEMORY_LIMIT:-8g}"
|
|
reservations:
|
|
cpus: "${CPU_RESERVATION:-1.0}"
|
|
memory: "${MEMORY_RESERVATION:-4g}"
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 40s
|
|
|
|
volumes:
|
|
open-webui-benchmark-data:
|