-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.gpu.yml
More file actions
66 lines (63 loc) · 1.45 KB
/
Copy pathdocker-compose.gpu.yml
File metadata and controls
66 lines (63 loc) · 1.45 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
services:
ollama:
image: ollama/ollama:latest
ports:
- "11434:11434"
environment:
OLLAMA_HOST: "0.0.0.0:11434"
OLLAMA_ORIGINS: "*"
volumes:
# Replace with the line below to use host's Ollama cache
- ollama_data:/root/.ollama
# - ${HOME}/.ollama:/root/.ollama
healthcheck:
test: ["CMD", "ollama", "list"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
restart: unless-stopped
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
ollama-init:
image: ollama/ollama:latest
depends_on:
ollama:
condition: service_healthy
environment:
OLLAMA_HOST: ollama:11434
entrypoint: ["/bin/sh", "-c"]
command:
- |
ollama pull glm-ocr:latest
ollama pull kaelri/hy-mt2:1.8b
restart: "no"
glm-ocr:
build: ./glm-ocr
ports:
- "5002:5002"
environment:
GLMOCR_OLLAMA_ENDPOINT: "http://ollama:11434"
volumes:
- glm_ocr_models:/app/models
extra_hosts:
- "host.docker.internal:host-gateway"
depends_on:
ollama:
condition: service_healthy
restart: unless-stopped
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
volumes:
ollama_data:
glm_ocr_models: