-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
58 lines (55 loc) · 1.39 KB
/
docker-compose.yml
File metadata and controls
58 lines (55 loc) · 1.39 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
services:
# 1. The Ollama Service
ollama:
image: ollama/ollama:latest
container_name: tad_ollama
volumes:
- ollama_data:/root/.ollama
ports:
- "11434:11434"
networks:
- ollama_network
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "ollama list || exit 1"]
interval: 20s
timeout: 10s
retries: 5
start_period: 20s
# ONLY Keep this section if you have an NVIDIA GPU.
# If on Mac or Standard PC, COMMENT THIS OUT or it will crash.
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
# 2. The Streamlit Application
app:
build: .
container_name: tad_app
ports:
- "8501:8501"
environment:
- OLLAMA_BASE_URL=http://ollama:11434
volumes:
# Persist Uploaded Files
- ./uploaded_docs:/app/uploaded_docs
# Persist the Vector Database
- ./vector_database:/app/vector_database.db
# Persist the SQLite History
- ./chat_history:/app/chat_history.db
# Persist the Images folder
- ./chat_images:/app/chat_images
depends_on:
ollama:
condition: service_healthy
# REMOVED: "restart: true" (This is invalid syntax here)
networks:
- ollama_network
volumes:
ollama_data: {}
networks:
ollama_network:
driver: bridge