forked from libre-webui/libre-webui
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.gpu.yml
More file actions
96 lines (93 loc) · 4.1 KB
/
Copy pathdocker-compose.dev.gpu.yml
File metadata and controls
96 lines (93 loc) · 4.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
services:
libre-webui:
image: librewebui/libre-webui:dev
ports:
- '${WEBUI_BIND_ADDRESS:-127.0.0.1}:${WEBUI_PORT:-8080}:3001'
extra_hosts:
- 'host.docker.internal:host-gateway'
environment:
- NODE_ENV=production
- DOCKER_ENV=true
# Docker Desktop reaches host-loopback Work ports through this name.
# Native Linux should override WORK_PREVIEW_BIND with its Docker bridge gateway.
- WORK_PREVIEW_BIND=${WORK_PREVIEW_BIND:-127.0.0.1}
- WORK_DOCKER_PUBLISHED_HOST=${WORK_DOCKER_PUBLISHED_HOST:-host.docker.internal}
- PORT=3001
- OLLAMA_BASE_URL=http://ollama:11434
# For network access, add your IP/hostname to CORS_ORIGIN:
- CORS_ORIGIN=http://localhost:8080
- ENABLE_SIGNUP=${ENABLE_SIGNUP:-false}
# JWT_SECRET: Generate with 'openssl rand -hex 64' and set via .env file or environment
- JWT_SECRET=${JWT_SECRET:-}
- JWT_EXPIRES_IN=7d
# Encryption: Optional 64-character hex key. If not provided, one will be auto-generated
# and stored in the persistent data volume for security across container restarts
- ENCRYPTION_KEY=${ENCRYPTION_KEY:-}
# Platform foundation selectors. Shared backends remain fail-closed;
# Redis coordination is usable in solo mode with an external REDIS_URL.
- LIBRE_PLATFORM_MODE=${LIBRE_PLATFORM_MODE:-solo}
- DATABASE_BACKEND=${DATABASE_BACKEND:-sqlite}
- DATABASE_URL=${DATABASE_URL:-}
- BLOB_STORE_BACKEND=${BLOB_STORE_BACKEND:-local}
- VECTOR_STORE_BACKEND=${VECTOR_STORE_BACKEND:-embedded}
- COORDINATION_BACKEND=${COORDINATION_BACKEND:-local}
- REDIS_URL=${REDIS_URL:-}
- REDIS_KEY_PREFIX=${REDIS_KEY_PREFIX:-libre}
- REDIS_CONNECT_TIMEOUT_MS=${REDIS_CONNECT_TIMEOUT_MS:-5000}
- JOB_WORKER_MODE=${JOB_WORKER_MODE:-embedded}
- STORAGE_ENCRYPTION_KEYS=${STORAGE_ENCRYPTION_KEYS:-}
- STORAGE_ENCRYPTION_ACTIVE_KEY_ID=${STORAGE_ENCRYPTION_ACTIVE_KEY_ID:-}
# Timeout configuration for large models on multiple GPUs
- OLLAMA_TIMEOUT=${OLLAMA_TIMEOUT:-300000}
- OLLAMA_LONG_OPERATION_TIMEOUT=${OLLAMA_LONG_OPERATION_TIMEOUT:-900000}
- VITE_API_TIMEOUT=${VITE_API_TIMEOUT:-300000}
# Database path - points to the volume mount
- DATA_DIR=/app/backend/data
- PLATFORM_PREFLIGHT_TMP_DIR=/app/backend/temp/preflight
# GitHub OAuth2 SSO Configuration
- GITHUB_CLIENT_ID=${GITHUB_CLIENT_ID:-}
- GITHUB_CLIENT_SECRET=${GITHUB_CLIENT_SECRET:-}
- GITHUB_CALLBACK_URL=${GITHUB_CALLBACK_URL:-http://localhost:8080/api/auth/oauth/github/callback}
# Hugging Face OAuth2 SSO Configuration
- HUGGINGFACE_CLIENT_ID=${HUGGINGFACE_CLIENT_ID:-}
- HUGGINGFACE_CLIENT_SECRET=${HUGGINGFACE_CLIENT_SECRET:-}
- HUGGINGFACE_CALLBACK_URL=${HUGGINGFACE_CALLBACK_URL:-http://localhost:8080/api/auth/oauth/huggingface/callback}
- SESSION_SECRET=${SESSION_SECRET:-}
volumes:
- libre_webui_dev_data:/app/backend/data
- libre_webui_dev_temp:/app/backend/temp
# Work runs isolated task containers on this host's Docker daemon.
# Removing this mount disables Work; it does not otherwise affect the app.
- ${DOCKER_SOCKET:-/var/run/docker.sock}:/var/run/docker.sock
# Group that owns the Docker socket, so the non-root app user can open it.
# Docker Desktop uses 0. On Linux set DOCKER_GID in .env to the docker group:
# DOCKER_GID=$(docker run --rm -v /var/run/docker.sock:/var/run/docker.sock \
# alpine stat -c '%g' /var/run/docker.sock)
group_add:
- '${DOCKER_GID:-0}'
depends_on:
- ollama
restart: unless-stopped
networks:
- libre-webui-network
ollama:
image: ollama/ollama:latest
volumes:
- ollama_dev_data:/root/.ollama
restart: unless-stopped
networks:
- libre-webui-network
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
volumes:
libre_webui_dev_data:
libre_webui_dev_temp:
ollama_dev_data:
networks:
libre-webui-network:
driver: bridge