-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
74 lines (71 loc) · 1.76 KB
/
Copy pathdocker-compose.yml
File metadata and controls
74 lines (71 loc) · 1.76 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
services:
postgres:
container_name: pgpm-postgres
image: docker.io/constructiveio/postgres-plus:18
shm_size: "2g"
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=password
ports:
- "5432:5432"
volumes:
- pgdata:/var/lib/postgresql/data
command:
- "postgres"
- "-c"
- "shared_buffers=512MB"
- "-c"
- "work_mem=64MB"
- "-c"
- "maintenance_work_mem=512MB"
- "-c"
- "max_wal_size=2GB"
- "-c"
- "checkpoint_completion_target=0.9"
- "-c"
- "effective_cache_size=2GB"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
# Ollama for embedding generation.
#
# Three modes — pick one:
#
# CPU (default): docker compose up -d
# GPU (NVIDIA): docker compose --profile gpu up -d
# External / host: docker compose up -d postgres
# (then point OLLAMA_URL at your host Ollama)
#
ollama:
container_name: pgpm-ollama
image: ollama/ollama:latest
ports:
- "11434:11434"
volumes:
- ollama_data:/root/.ollama
restart: unless-stopped
# GPU-accelerated Ollama (opt-in, mutually exclusive with CPU ollama).
# Requires NVIDIA Container Toolkit:
# https://docs.nvidia.com/datacenter/cloud-native/container-toolkit
ollama-gpu:
container_name: pgpm-ollama
image: ollama/ollama:latest
ports:
- "11434:11434"
volumes:
- ollama_data:/root/.ollama
restart: unless-stopped
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
profiles:
- gpu
volumes:
pgdata:
ollama_data: