-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
45 lines (43 loc) · 1.14 KB
/
docker-compose.yml
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
services:
# Ollama service
ollama:
# Build the Ollama image from the Dockerfile.ollama
build:
context: .
dockerfile: Dockerfile.ollama
container_name: ollama-server
# Security options to enhance container security
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
cap_add:
- NET_BIND_SERVICE
# Expose port 11434 for the Ollama service
ports:
- "11434:11434"
# Mount a volume for model persistence
volumes:
- ollama_models:/models
# Gradio app service
app:
# Build the Gradio app image from the Dockerfile.app
build:
context: .
dockerfile: Dockerfile.app
container_name: gradio-app
# Environment variables for the Gradio app
environment:
- AT_USERNAME=${AT_USERNAME}
- AT_API_KEY=${AT_API_KEY}
- LANGTRACE_API_KEY=${LANGTRACE_API_KEY}
- OLLAMA_HOST=http://ollama:11434
# Expose port 7860 for the Gradio web interface
ports:
- "7860:7860"
# Ensure the Ollama service is started before the Gradio app
depends_on:
- ollama
# Define a volume for model persistence
volumes:
ollama_models: