-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
89 lines (85 loc) · 1.8 KB
/
Copy pathdocker-compose.yml
File metadata and controls
89 lines (85 loc) · 1.8 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
services:
ollama:
image: ollama/ollama:latest
restart: unless-stopped
profiles:
- ollama
ports:
- "11434:11434"
environment:
OLLAMA_KEEP_ALIVE: ${OLLAMA_KEEP_ALIVE:-30m}
volumes:
- ollama_storage:/root/.ollama
healthcheck:
test: ["CMD", "ollama", "list"]
interval: 20s
timeout: 10s
retries: 10
start_period: 20s
ollama-pull:
image: ollama/ollama:latest
restart: "no"
profiles:
- ollama
depends_on:
ollama:
condition: service_healthy
environment:
OLLAMA_HOST: http://ollama:11434
OLLAMA_PULL_MODEL: ${OLLAMA_PULL_MODEL:-llama3:latest}
entrypoint:
- /bin/sh
- -c
command:
- ollama pull "$OLLAMA_PULL_MODEL"
frontend:
build:
context: .
dockerfile: Dockerfile
image: autooptions/app:local
restart: unless-stopped
env_file:
- .env
- .env.docker
environment:
PYTHONPATH: /app
STREAMLIT_SERVER_FILE_WATCHER_TYPE: none
extra_hosts:
- "host.docker.internal:host-gateway"
ports:
- "8501:8501"
volumes:
- .:/app
- hf_cache:/opt/hf-cache
- xdg_cache:/opt/xdg-cache
command:
- streamlit
- run
- Frontend/app.py
- --server.port=8501
- --server.address=0.0.0.0
- --server.fileWatcherType=none
worker:
image: autooptions/app:local
restart: "no"
profiles:
- worker
env_file:
- .env
- .env.docker
environment:
PYTHONPATH: /app
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
- .:/app
- hf_cache:/opt/hf-cache
- xdg_cache:/opt/xdg-cache
command:
- python
- -c
- "import time; time.sleep(10**9)"
volumes:
ollama_storage:
hf_cache:
xdg_cache: