-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
125 lines (116 loc) · 2.92 KB
/
docker-compose.yml
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
services:
caddy:
image: caddy:2.7
restart: unless-stopped
ports:
- 127.0.0.1:3000:80
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile
- caddy_data:/data
- caddy_config:/config
networks:
- caddy
environment:
- FQDN=$FQDN
- OPENAI_API_KEY=$OPENAI_API_KEY
litellm:
image: ghcr.io/berriai/litellm:main-v1.42.12
restart: unless-stopped
volumes:
- ./litellm_config.yaml:/app/litellm_config.yaml
- $GOOGLE_CREDENTIAL_PATH:/app/google_credentials.json
networks:
- caddy
- postgres
- ollama
ports:
- 127.0.0.1:4000:4000
command: [ "--config", "/app/litellm_config.yaml", "--port", "4000", "--num_workers", "4" ]
environment:
- ANTHROPIC_API_KEY=$ANTHROPIC_API_KEY
- GOOGLE_APPLICATION_CREDENTIALS=/app/google_credentials.json
- GOOGLE_VERTEX_LOCATION=$GOOGLE_VERTEX_LOCATION
- GOOGLE_VERTEX_PROJECT=$GOOGLE_VERTEX_PROJECT
- GROQ_API_KEY=$GROQ_API_KEY
- OPENAI_API_KEY=$OPENAI_API_KEY
- POSTGRES_DB_URL=$POSTGRES_DB_URL
- UI_PASSWORD=$UI_PASSWORD
- UI_USERNAME=$UI_USERNAME
postgres:
image: postgres:16.2
restart: unless-stopped
shm_size: 128mb
volumes:
- postgres_db:/var/lib/postgresql/data
networks:
- postgres
environment:
- POSTGRES_USER=$POSTGRES_USER
- POSTGRES_PASSWORD=$POSTGRES_PASSWORD
ollama:
image: ollama/ollama:0.3.3
restart: unless-stopped
volumes:
- ollama:/root/.ollama
- ./models:/models
ports:
- 127.0.0.1:11434:11434
environment:
- OLLAMA_HOST=0.0.0.0
- OLLAMA_ORIGINS=*
networks:
- ollama
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
open-webui:
image: ghcr.io/open-webui/open-webui:v0.3.11
restart: unless-stopped
init: true
volumes:
- ollama-webui:/app/backend/data
networks:
- caddy
environment:
- OPENAI_API_BASE_URL=http://litellm:4000
- OPENAI_API_KEY=sk-openwebui
yakgpt:
image: yakgpt/yakgpt:latest
restart: unless-stopped
networks:
- caddy
nextchat:
image: ${NEXTCHAT_IMAGE:-yidadaa/chatgpt-next-web:v2.12.3}
restart: unless-stopped
networks:
- caddy
environment:
- OPENAI_API_KEY=any
- BASE_URL=http://litellm:4000/
- HIDE_USER_API_KEY=1
- CUSTOM_MODELS=-all,openai-gpt-4o,openai-gpt-4-turbo,openai-gpt-3.5-turbo,google-gemini-1.5-pro,anthropic-claude-3-sonnet,anthropic-claude-3-opus
ollama-webui:
image: ollama-webui:local
restart: unless-stopped
init: true
environment:
- OLLAMA_API_BASE_URL=http://ollama:11434/api
networks:
- caddy
- ollama
profiles:
- custom-ui
networks:
caddy:
postgres:
ollama:
volumes:
caddy_config:
caddy_data:
postgres_db:
ollama-webui:
ollama: