-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
64 lines (61 loc) · 2.07 KB
/
Copy pathdocker-compose.yml
File metadata and controls
64 lines (61 loc) · 2.07 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
services:
# ── Ollama Server ────────────────────────────────────────────────
# Rulează serverul Ollama. Modelele sunt stocate persistent în volum.
ollama:
image: ollama/ollama
container_name: clutterkill_ollama
ports:
- "11434:11434"
volumes:
- ollama_data:/root/.ollama
- ./ai:/app/ai
restart: unless-stopped
healthcheck:
test: ["CMD", "ollama", "list"]
interval: 10s
timeout: 5s
retries: 10
start_period: 30s
# ── Ollama Init (one-shot) ───────────────────────────────────────
# Descarcă modelele de bază și creează modelele custom la PRIMA rulare.
# Rulează O SINGURĂ DATĂ, apoi se oprește. La următoarele docker-compose up,
# modelele există deja în volum și comanda termină instant.
ollama-setup:
image: ollama/ollama
container_name: clutterkill_ollama_setup
depends_on:
ollama:
condition: service_healthy
volumes:
- ollama_data:/root/.ollama
- ./ai:/app/ai
environment:
- OLLAMA_HOST=http://ollama:11434
entrypoint: >
sh -c "
echo '=== ClutterKill: Verificare și descărcare modele AI ===' &&
ollama pull gemma2:2b &&
ollama pull llava:7b &&
ollama create ck-model -f /app/ai/Modelfile &&
ollama create ck-extractor -f /app/ai/Modelfile.extractor &&
ollama create ck-vision -f /app/ai/Modelfile.vision &&
echo '=== Toate modelele sunt gata! ==='
"
restart: "no"
# ── App Container (opțional, pentru teste) ───────────────────────
app:
build: .
container_name: clutterkill_app
depends_on:
ollama:
condition: service_healthy
volumes:
- .:/app
working_dir: /app
env_file:
- .env
environment:
- OLLAMA_BASE_URL=http://ollama:11434
command: tail -f /dev/null
volumes:
ollama_data: