AIBRUH commited on
Commit
fa87f13
·
verified ·
1 Parent(s): bac35d4

Upload docker-compose.yml with huggingface_hub

Browse files
Files changed (1) hide show
  1. docker-compose.yml +189 -0
docker-compose.yml ADDED
@@ -0,0 +1,189 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ version: "3.9"
2
+
3
+ x-gpu: &gpu
4
+ deploy:
5
+ resources:
6
+ reservations:
7
+ devices:
8
+ - driver: nvidia
9
+ count: all
10
+ capabilities: [gpu]
11
+
12
+ x-shared-env: &shared-env
13
+ HF_TOKEN: ${HF_TOKEN}
14
+ HF_XET_HIGH_PERFORMANCE: "1"
15
+ HF_HUB_ENABLE_HF_TRANSFER: "1"
16
+ MODELS_DIR: /models
17
+ SHARED_DIR: /shared
18
+
19
+ services:
20
+ # ── FastAPI Gateway ──────────────────────────────────────────────
21
+ gateway:
22
+ build: .
23
+ ports:
24
+ - "8000:8000"
25
+ environment:
26
+ <<: *shared-env
27
+ XAI_API_KEY: ${XAI_API_KEY}
28
+ ANTHROPIC_API_KEY: ${ANTHROPIC_API_KEY:-}
29
+ ROUTER_URL: http://router:8100
30
+ WATCHDOG_URL: http://watchdog:8200
31
+ volumes:
32
+ - frame-output:/shared/frames
33
+ - audio-queue:/shared/audio
34
+ - reference-images:/shared/reference
35
+ - memory:/shared/memory
36
+ depends_on:
37
+ router:
38
+ condition: service_started
39
+ command: >
40
+ uvicorn gateway.main:app
41
+ --host 0.0.0.0 --port 8000 --workers 1
42
+ restart: unless-stopped
43
+
44
+ # ── Pipeline Router ─────────────────────────────────────────────
45
+ router:
46
+ build: .
47
+ <<: *gpu
48
+ environment:
49
+ <<: *shared-env
50
+ P0_URL: http://pipeline0:8010
51
+ P1_URL: http://pipeline1:8011
52
+ P2_URL: http://pipeline2:8012
53
+ P3_URL: http://pipeline3:8013
54
+ P4_URL: http://pipeline4:8014
55
+ XAI_API_KEY: ${XAI_API_KEY}
56
+ RUNPOD_API_KEY: ${RUNPOD_API_KEY:-}
57
+ RUNPOD_POD_ID: ${RUNPOD_POD_ID:-}
58
+ RUNPOD_IDLE_TIMEOUT_S: ${RUNPOD_IDLE_TIMEOUT_S:-300}
59
+ volumes:
60
+ - frame-output:/shared/frames
61
+ - audio-queue:/shared/audio
62
+ - reference-images:/shared/reference
63
+ depends_on:
64
+ - pipeline0
65
+ - pipeline1
66
+ - pipeline2
67
+ command: >
68
+ uvicorn router.main:app
69
+ --host 0.0.0.0 --port 8100 --workers 1
70
+ restart: unless-stopped
71
+
72
+ # ── Pipeline 0: MuseTalk (Primary) ──────────────────────────────
73
+ pipeline0:
74
+ build: .
75
+ <<: *gpu
76
+ environment:
77
+ <<: *shared-env
78
+ PIPELINE_ID: "0"
79
+ PIPELINE_NAME: "musetalk"
80
+ volumes:
81
+ - models:/models
82
+ - frame-output:/shared/frames
83
+ - audio-queue:/shared/audio
84
+ - reference-images:/shared/reference
85
+ command: >
86
+ uvicorn pipelines.p0_musetalk.server:app
87
+ --host 0.0.0.0 --port 8010 --workers 1
88
+ restart: unless-stopped
89
+
90
+ # ── Pipeline 1: InfiniteTalk (Mid-tier) ─────────────────────────
91
+ pipeline1:
92
+ build: .
93
+ <<: *gpu
94
+ environment:
95
+ <<: *shared-env
96
+ PIPELINE_ID: "1"
97
+ PIPELINE_NAME: "infinitetalk"
98
+ volumes:
99
+ - models:/models
100
+ - frame-output:/shared/frames
101
+ - audio-queue:/shared/audio
102
+ - reference-images:/shared/reference
103
+ command: >
104
+ uvicorn pipelines.p1_infinitetalk.server:app
105
+ --host 0.0.0.0 --port 8011 --workers 1
106
+ restart: unless-stopped
107
+
108
+ # ── Pipeline 2: Ditto ───────────────────────────────────────────
109
+ pipeline2:
110
+ build: .
111
+ <<: *gpu
112
+ environment:
113
+ <<: *shared-env
114
+ PIPELINE_ID: "2"
115
+ PIPELINE_NAME: "ditto"
116
+ volumes:
117
+ - models:/models
118
+ - frame-output:/shared/frames
119
+ - audio-queue:/shared/audio
120
+ - reference-images:/shared/reference
121
+ command: >
122
+ uvicorn pipelines.p2_ditto.server:app
123
+ --host 0.0.0.0 --port 8012 --workers 1
124
+ restart: unless-stopped
125
+
126
+ # ── Pipeline 3: StableAvatar ────────────────────────────────────
127
+ pipeline3:
128
+ build: .
129
+ <<: *gpu
130
+ environment:
131
+ <<: *shared-env
132
+ PIPELINE_ID: "3"
133
+ PIPELINE_NAME: "stableavatar"
134
+ profiles: ["full"]
135
+ volumes:
136
+ - models:/models
137
+ - frame-output:/shared/frames
138
+ - audio-queue:/shared/audio
139
+ - reference-images:/shared/reference
140
+ command: >
141
+ uvicorn pipelines.p3_stableavatar.server:app
142
+ --host 0.0.0.0 --port 8013 --workers 1
143
+ restart: unless-stopped
144
+
145
+ # ── Pipeline 4: LiveAvatar 14B FP8 (Nuclear) ────────────────────
146
+ pipeline4:
147
+ build: .
148
+ <<: *gpu
149
+ environment:
150
+ <<: *shared-env
151
+ PIPELINE_ID: "4"
152
+ PIPELINE_NAME: "liveavatar"
153
+ profiles: ["full"]
154
+ volumes:
155
+ - models:/models
156
+ - frame-output:/shared/frames
157
+ - audio-queue:/shared/audio
158
+ - reference-images:/shared/reference
159
+ command: >
160
+ uvicorn pipelines.p4_liveavatar.server:app
161
+ --host 0.0.0.0 --port 8014 --workers 1
162
+ restart: unless-stopped
163
+
164
+ # ── Watchdog Sidecar ─────────────────────────���──────────────────
165
+ watchdog:
166
+ build: .
167
+ environment:
168
+ <<: *shared-env
169
+ ROUTER_URL: http://router:8100
170
+ volumes:
171
+ - frame-output:/shared/frames
172
+ command: >
173
+ uvicorn watchdog.main:app
174
+ --host 0.0.0.0 --port 8200 --workers 1
175
+ depends_on:
176
+ - router
177
+ restart: unless-stopped
178
+
179
+ volumes:
180
+ models:
181
+ driver: local
182
+ driver_opts:
183
+ type: none
184
+ o: bind
185
+ device: ${MODELS_PATH:-./models}
186
+ frame-output:
187
+ audio-queue:
188
+ reference-images:
189
+ memory: