forked from valiantlynx/ollama-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-ollama-gpu.yaml
58 lines (54 loc) · 1.2 KB
/
docker-compose-ollama-gpu.yaml
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
version: '3.8'
services:
app:
build: .
ports:
- 8000:8000
- 5678:5678
volumes:
- .:/code
command: uvicorn src.main:app --host 0.0.0.0 --port 8000 --reload
restart: always
depends_on:
- ollama
- ollama-webui
networks:
- ollama-docker
ollama:
volumes:
- ./ollama/ollama:/root/.ollama
container_name: ollama
pull_policy: always
tty: true
restart: unless-stopped
image: ollama/ollama:latest
ports:
- 11434:11434
networks:
- ollama-docker
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
ollama-webui:
image: ghcr.io/ollama-webui/ollama-webui:main
container_name: ollama-webui
volumes:
- ./ollama/ollama-webui:/app/backend/data
depends_on:
- ollama
ports:
- 8080:8080
environment:
- '/ollama/api=http://ollama:11434/api'
extra_hosts:
- host.docker.internal:host-gateway
restart: unless-stopped
networks:
- ollama-docker
networks:
ollama-docker:
external: false