-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathecosystem.config.js
More file actions
146 lines (136 loc) · 3.57 KB
/
ecosystem.config.js
File metadata and controls
146 lines (136 loc) · 3.57 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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
/**
* PM2 Ecosystem Configuration for CODEC
*
* Usage:
* pm2 start ecosystem.config.js # Start all services
* pm2 start ecosystem.config.js --only codec-dashboard # Start one service
* pm2 stop ecosystem.config.js # Stop all
* pm2 restart ecosystem.config.js # Restart all
*
* Requires: Python 3.10+, mlx-lm, whisper, kokoro installed
*/
module.exports = {
apps: [
// ── Core CODEC (voice + text agent) ──
{
name: "codec",
script: "python3",
args: "codec.py",
cwd: __dirname,
max_memory_restart: "512M",
restart_delay: 3000,
max_restarts: 10,
autorestart: true,
},
// ── Dashboard API (FastAPI on :8090) ──
{
name: "codec-dashboard",
script: "python3",
args: "-m uvicorn codec_dashboard:app --host 0.0.0.0 --port 8090",
cwd: __dirname,
max_memory_restart: "256M",
restart_delay: 2000,
max_restarts: 15,
autorestart: true,
},
// ── Heartbeat (health checks + task executor) ──
{
name: "codec-heartbeat",
script: "python3",
args: "codec_heartbeat.py",
cwd: __dirname,
max_memory_restart: "128M",
restart_delay: 5000,
max_restarts: 10,
autorestart: true,
},
// ── Scheduler (cron-like task runner) ──
{
name: "codec-scheduler",
script: "python3",
args: "codec_scheduler.py",
cwd: __dirname,
max_memory_restart: "128M",
restart_delay: 5000,
max_restarts: 10,
autorestart: true,
},
// ── Hotkey listener (keyboard shortcuts) ──
{
name: "codec-hotkey",
script: "python3",
args: "codec_keyboard.py",
cwd: __dirname,
max_memory_restart: "64M",
restart_delay: 2000,
max_restarts: 10,
autorestart: true,
},
// ── MCP Server (tool integration) ──
{
name: "codec-mcp",
script: "python3",
args: "codec_mcp.py",
cwd: __dirname,
max_memory_restart: "128M",
restart_delay: 3000,
max_restarts: 10,
autorestart: true,
},
// ── Dictation service ──
{
name: "codec-dictate",
script: "python3",
args: "codec_dictate.py",
cwd: __dirname,
max_memory_restart: "128M",
restart_delay: 3000,
max_restarts: 5,
autorestart: true,
},
// ── LLM Server (Qwen via mlx_lm) ──
{
name: "qwen35b",
script: "bash",
args: "-c 'python3 -m mlx_lm.server --model mlx-community/Qwen3.5-35B-A3B-4bit --port 8081'",
cwd: __dirname,
max_memory_restart: "8G",
restart_delay: 10000,
max_restarts: 5,
autorestart: true,
},
// ── Vision Model Server ──
{
name: "qwen-vision",
script: "bash",
args: "-c 'python3 -m mlx_lm.server --model mlx-community/Qwen2.5-VL-7B-Instruct-4bit --port 8082'",
cwd: __dirname,
max_memory_restart: "4G",
restart_delay: 10000,
max_restarts: 5,
autorestart: true,
},
// ── Whisper STT Server ──
{
name: "whisper-stt",
script: "python3",
args: "whisper_server.py",
cwd: __dirname,
max_memory_restart: "1G",
restart_delay: 5000,
max_restarts: 5,
autorestart: true,
},
// ── Kokoro TTS Server ──
{
name: "kokoro-82m",
script: "python3",
args: "kokoro_server.py",
cwd: __dirname,
max_memory_restart: "512M",
restart_delay: 5000,
max_restarts: 5,
autorestart: true,
},
],
};