forked from ruvnet/RuVector
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcloudrun.yaml
More file actions
277 lines (269 loc) · 8.21 KB
/
cloudrun.yaml
File metadata and controls
277 lines (269 loc) · 8.21 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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
# =============================================================================
# RuVector Cloud Run Service Configuration
# Multi-service deployment with GPU, Raft, and Replication support
# =============================================================================
# -----------------------------------------------------------------------------
# Benchmark Service (GPU-enabled)
# -----------------------------------------------------------------------------
apiVersion: serving.knative.dev/v1
kind: Service
metadata:
name: ruvector-benchmark
labels:
app: ruvector
component: benchmark
annotations:
run.googleapis.com/description: "RuVector GPU Benchmark Service"
run.googleapis.com/launch-stage: BETA
spec:
template:
metadata:
annotations:
# GPU Configuration
run.googleapis.com/execution-environment: gen2
run.googleapis.com/gpu-type: nvidia-l4
run.googleapis.com/gpu-count: "1"
# Scaling Configuration
autoscaling.knative.dev/minScale: "0"
autoscaling.knative.dev/maxScale: "10"
# Performance Configuration
run.googleapis.com/cpu-throttling: "false"
run.googleapis.com/startup-cpu-boost: "true"
spec:
containerConcurrency: 80
timeoutSeconds: 3600
serviceAccountName: ruvector-sa
containers:
- name: ruvector
image: gcr.io/PROJECT_ID/ruvector-benchmark:latest
ports:
- containerPort: 8080
resources:
limits:
cpu: "4"
memory: "8Gi"
nvidia.com/gpu: "1"
env:
- name: RUVECTOR_GPU_ENABLED
value: "true"
- name: RUST_LOG
value: "info"
- name: RUVECTOR_MODE
value: "benchmark"
startupProbe:
httpGet:
path: /health
port: 8080
initialDelaySeconds: 10
periodSeconds: 10
failureThreshold: 3
livenessProbe:
httpGet:
path: /health
port: 8080
periodSeconds: 30
readinessProbe:
httpGet:
path: /health
port: 8080
periodSeconds: 10
---
# -----------------------------------------------------------------------------
# Attention/GNN Service (High Memory GPU)
# -----------------------------------------------------------------------------
apiVersion: serving.knative.dev/v1
kind: Service
metadata:
name: ruvector-attention
labels:
app: ruvector
component: attention
annotations:
run.googleapis.com/description: "RuVector Attention/GNN Inference Service"
spec:
template:
metadata:
annotations:
run.googleapis.com/execution-environment: gen2
run.googleapis.com/gpu-type: nvidia-l4
run.googleapis.com/gpu-count: "1"
autoscaling.knative.dev/minScale: "1"
autoscaling.knative.dev/maxScale: "5"
run.googleapis.com/cpu-throttling: "false"
spec:
containerConcurrency: 20
timeoutSeconds: 3600
containers:
- name: ruvector
image: gcr.io/PROJECT_ID/ruvector-benchmark:latest
ports:
- containerPort: 8080
resources:
limits:
cpu: "8"
memory: "16Gi"
nvidia.com/gpu: "1"
env:
- name: RUVECTOR_MODE
value: "attention"
- name: RUVECTOR_GNN_LAYERS
value: "3"
- name: RUVECTOR_GNN_HEADS
value: "8"
- name: RUVECTOR_GNN_HIDDEN_DIM
value: "512"
- name: RUST_LOG
value: "info"
---
# -----------------------------------------------------------------------------
# Raft Consensus Node (Stateful)
# -----------------------------------------------------------------------------
apiVersion: serving.knative.dev/v1
kind: Service
metadata:
name: ruvector-raft-node-1
labels:
app: ruvector
component: raft
raft-node-id: "0"
annotations:
run.googleapis.com/description: "RuVector Raft Consensus Node"
spec:
template:
metadata:
annotations:
autoscaling.knative.dev/minScale: "1"
autoscaling.knative.dev/maxScale: "1"
run.googleapis.com/cpu-throttling: "false"
spec:
containerConcurrency: 100
timeoutSeconds: 3600
containers:
- name: ruvector
image: gcr.io/PROJECT_ID/ruvector-benchmark:latest
ports:
- containerPort: 8080
resources:
limits:
cpu: "2"
memory: "4Gi"
env:
- name: RUVECTOR_MODE
value: "raft"
- name: RUVECTOR_NODE_ID
value: "0"
- name: RUVECTOR_CLUSTER_SIZE
value: "3"
- name: RUVECTOR_RAFT_ELECTION_TIMEOUT
value: "150"
- name: RUVECTOR_RAFT_HEARTBEAT_INTERVAL
value: "50"
- name: RUST_LOG
value: "info,raft=debug"
volumeMounts:
- name: raft-data
mountPath: /data/raft
volumes:
- name: raft-data
emptyDir:
sizeLimit: "10Gi"
---
# -----------------------------------------------------------------------------
# Replication Primary Node
# -----------------------------------------------------------------------------
apiVersion: serving.knative.dev/v1
kind: Service
metadata:
name: ruvector-primary
labels:
app: ruvector
component: replication
role: primary
annotations:
run.googleapis.com/description: "RuVector Primary Node (Replication)"
spec:
template:
metadata:
annotations:
run.googleapis.com/execution-environment: gen2
run.googleapis.com/gpu-type: nvidia-l4
run.googleapis.com/gpu-count: "1"
autoscaling.knative.dev/minScale: "1"
autoscaling.knative.dev/maxScale: "1"
run.googleapis.com/cpu-throttling: "false"
spec:
containerConcurrency: 100
timeoutSeconds: 3600
containers:
- name: ruvector
image: gcr.io/PROJECT_ID/ruvector-benchmark:latest
ports:
- containerPort: 8080
resources:
limits:
cpu: "4"
memory: "8Gi"
nvidia.com/gpu: "1"
env:
- name: RUVECTOR_MODE
value: "primary"
- name: RUVECTOR_REPLICATION_FACTOR
value: "3"
- name: RUVECTOR_SYNC_MODE
value: "async"
- name: RUST_LOG
value: "info"
---
# -----------------------------------------------------------------------------
# Replication Replica Node
# -----------------------------------------------------------------------------
apiVersion: serving.knative.dev/v1
kind: Service
metadata:
name: ruvector-replica
labels:
app: ruvector
component: replication
role: replica
annotations:
run.googleapis.com/description: "RuVector Replica Node (Replication)"
spec:
template:
metadata:
annotations:
run.googleapis.com/execution-environment: gen2
run.googleapis.com/gpu-type: nvidia-l4
run.googleapis.com/gpu-count: "1"
autoscaling.knative.dev/minScale: "2"
autoscaling.knative.dev/maxScale: "5"
run.googleapis.com/cpu-throttling: "false"
spec:
containerConcurrency: 100
timeoutSeconds: 3600
containers:
- name: ruvector
image: gcr.io/PROJECT_ID/ruvector-benchmark:latest
ports:
- containerPort: 8080
resources:
limits:
cpu: "4"
memory: "8Gi"
nvidia.com/gpu: "1"
env:
- name: RUVECTOR_MODE
value: "replica"
- name: RUVECTOR_PRIMARY_URL
value: "https://ruvector-primary-HASH.run.app"
- name: RUST_LOG
value: "info"
---
# -----------------------------------------------------------------------------
# Service Account
# -----------------------------------------------------------------------------
apiVersion: iam.cnrm.cloud.google.com/v1beta1
kind: IAMServiceAccount
metadata:
name: ruvector-sa
spec:
displayName: "RuVector Cloud Run Service Account"