-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
130 lines (122 loc) · 3.99 KB
/
docker-compose.yml
File metadata and controls
130 lines (122 loc) · 3.99 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# ══════════════════════════════════════════════════════════════════
# TinAI v7 – docker-compose.yml (TOUT est optionnel)
# ══════════════════════════════════════════════════════════════════
services:
# ── llama.cpp (optionnel)
llama:
profiles: ["llama"]
image: ghcr.io/ggml-org/llama.cpp:server
container_name: tinai-llama
restart: unless-stopped
ports:
- "${PORT_LLAMA:-8081}:8080"
volumes:
- ${MODELS_DIR:-./models}:/models
- ./scripts/llama-entrypoint.sh:/llama-entrypoint.sh
entrypoint: ["sh", "/llama-entrypoint.sh"]
environment:
LLAMA_HF_REPO: ${LLAMA_HF_REPO:-Qwen/Qwen3-1.7B-GGUF}
LLAMA_HF_FILE: ${LLAMA_HF_FILE:-Qwen3-1.7B-Q5_K_M.gguf}
LLAMA_ARG_MODEL: /models/${LLAMA_HF_FILE}
LLAMA_ARG_HOST: 0.0.0.0
LLAMA_ARG_PORT: 8080
LLAMA_ARG_CTX_SIZE: ${LLAMA_CTX_SIZE:-8192}
LLAMA_ARG_N_PARALLEL: ${LLAMA_N_PARALLEL:-1}
LLAMA_ARG_THREADS: ${LLAMA_THREADS:-4}
LLAMA_ARG_N_GPU_LAYERS: ${LLAMA_GPU_LAYERS:-0}
LLAMA_ARG_API_KEY: ${TINAI_API_KEY:-sk-tinai}
LLAMA_ARG_ALIAS: ${LLAMA_MODEL_ALIAS:-qwen3-1.7b}
mem_limit: ${MEM_LIMIT:-6g}
healthcheck:
test: ["CMD", "curl", "-sf", "http://localhost:8080/health"]
interval: 30s
timeout: 10s
start_period: 120s
networks:
- tinai-net
# ── OpenFang (optionnel)
tinai:
profiles: ["openfang"]
build: .
image: tinai:v7
container_name: tinai-openfang
restart: unless-stopped
ports:
- "${PORT_OPENFANG:-4200}:4200"
volumes:
- ${OPENFANG_DATA_DIR:-./data/openfang}:/root/.openfang
environment:
LLAMA_PORT: 8081
LLAMA_HOST: llama
TINAI_API_KEY: ${TINAI_API_KEY:-sk-tinai}
ANTHROPIC_API_KEY: ${ANTHROPIC_API_KEY:-}
OPENAI_API_KEY: ${OPENAI_API_KEY:-}
GROQ_API_KEY: ${GROQ_API_KEY:-}
networks:
- tinai-net
# ── LiteLLM (optionnel)
litellm:
profiles: ["litellm"]
image: ghcr.io/berriai/litellm:main-stable
container_name: tinai-litellm
restart: unless-stopped
ports:
- "${PORT_LITELLM:-4000}:4000"
volumes:
- ./litellm/config.yaml:/app/config.yaml:ro
environment:
LITELLM_MASTER_KEY: ${LITELLM_MASTER_KEY:-sk-tinai-litellm}
networks:
- tinai-net
depends_on:
llama:
condition: service_healthy
# ── Hermès Agent (optionnel)
hermes:
profiles: ["hermes"]
image: nousresearch/hermes-agent:latest
container_name: tinai-hermes
restart: unless-stopped
ports:
- "${PORT_HERMES:-4201}:8080"
volumes:
- ${HERMES_DATA_DIR:-./data/hermes}:/opt/data
environment:
HERMES_LLM_BASE_URL: http://llama:8080/v1
HERMES_LLM_API_KEY: ${TINAI_API_KEY:-sk-tinai}
command: gateway run
networks:
- tinai-net
# ── Open WebUI (optionnel)
webui:
profiles: ["webui"]
image: ghcr.io/open-webui/open-webui:main-slim
container_name: tinai-webui
restart: unless-stopped
depends_on:
llama:
condition: service_healthy
ports:
- "${PORT_WEBUI:-3000}:8080"
volumes:
- ${WEBUI_DATA_DIR:-./data/webui}:/app/backend/data
environment:
OPENAI_API_BASE_URL: http://llama:8080/v1
OPENAI_API_KEY: ${TINAI_API_KEY:-sk-tinai}
WEBUI_SECRET_KEY: ${WEBUI_SECRET_KEY:-tinai-secret-change-me}
networks:
- tinai-net
# ── Monitoring (optionnel)
monitor:
profiles: ["monitoring"]
build: ./monitoring
image: tinai-monitor:latest
container_name: tinai-monitor
restart: unless-stopped
ports:
- "9000:19999"
networks:
- tinai-net
networks:
tinai-net:
driver: bridge