-
-
Notifications
You must be signed in to change notification settings - Fork 126
Expand file tree
/
Copy pathdocker-compose-gpu.yml
More file actions
executable file
·65 lines (62 loc) · 1.68 KB
/
docker-compose-gpu.yml
File metadata and controls
executable file
·65 lines (62 loc) · 1.68 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
services:
ollama-gpu:
extends:
file: docker-compose.yml
service: ollama
container_name: ollama-service-gpu
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [ gpu ]
environment:
- NVIDIA_VISIBLE_DEVICES=all
pdf-document-layout-analysis-gpu:
container_name: pdf-document-layout-analysis-gpu
entrypoint: [ "gunicorn", "-k", "uvicorn.workers.UvicornWorker", "--chdir", "./src", "drivers.rest.app:app", "--bind", "0.0.0.0:5060", "--timeout", "10000"]
init: true
restart: unless-stopped
build:
context: .
dockerfile: Dockerfile
ports:
- "5060:5060"
depends_on:
ollama-gpu:
condition: service_healthy
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [ gpu ]
environment:
- RESTART_IF_NO_GPU=$RESTART_IF_NO_GPU
- OLLAMA_HOST=http://ollama-gpu:11434
networks:
- pdf-analysis-network
pdf-document-layout-analysis-gui-gpu:
container_name: pdf-document-layout-analysis-gui-gpu
entrypoint: [ "python", "./src/drivers/gradio_app.py" ]
init: true
restart: unless-stopped
build:
context: .
dockerfile: Dockerfile.gradio
ports:
- "7860:7860"
depends_on:
ollama-gpu:
condition: service_healthy
pdf-document-layout-analysis-gpu:
condition: service_started
environment:
- API_BASE_URL=http://pdf-document-layout-analysis-gpu:5060
networks:
- pdf-analysis-network
networks:
pdf-analysis-network:
driver: bridge