disagg_planner.yaml 7.46 KB
Newer Older
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
# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

apiVersion: nvidia.com/v1alpha1
kind: DynamoGraphDeployment
metadata:
  name: sglang-disagg-planner
  annotations:
    nvidia.com/enable-grove: "false"
spec:
  envs:
    - name: DYNAMO_SERVICE_CONFIG
      value: '{"Prometheus":{"global":{"scrape_interval":"5s"},"scrape_configs":[{"job_name":"prometheus","static_configs":[{"targets":["localhost:9090"]}]},{"job_name":"frontend","static_configs":[{"targets":["sglang-disagg-planner-frontend:8000"]}]}]}}'
    - name: DYNAMO_NAMESPACE
      value: "dynamo"
  services:
    Frontend:
      dynamoNamespace: dynamo
      livenessProbe:
        httpGet:
          path: /health
          port: 8000
        initialDelaySeconds: 20
        periodSeconds: 5
        timeoutSeconds: 5
        failureThreshold: 3
      readinessProbe:
        exec:
          command:
            - /bin/sh
            - -c
            - 'curl -s http://localhost:8000/health | jq -e ".status == \"healthy\""'
        initialDelaySeconds: 60
        periodSeconds: 60
        timeoutSeconds: 30
        failureThreshold: 10
      componentType: main
      replicas: 1
      resources:
        requests:
          cpu: "10"
          memory: "10Gi"
        limits:
          cpu: "32"
          memory: "40Gi"
      extraPodSpec:
        mainContainer:
          image: nvcr.io/nvidian/nim-llm-dev/sglang-runtime:hzhou-0811-1
          workingDir: /workspace/components/backends/sglang
          command: ["sh", "-c"]
          args:
            - "python3 -m dynamo.sglang.utils.clear_namespace --namespace sglang-disagg && python3 -m dynamo.frontend --http-port=8000"
    Planner:
      dynamoNamespace: dynamo
      envFromSecret: hf-token-secret
      componentType: planner
      replicas: 1
      livenessProbe:
        exec:
          command:
            - /bin/sh
            - -c
            - "exit 0"
        periodSeconds: 60
        timeoutSeconds: 30
        failureThreshold: 10
      readinessProbe:
        exec:
          command:
            - /bin/sh
            - -c
            - "exit 0"
        initialDelaySeconds: 60
        periodSeconds: 60
        timeoutSeconds: 30
        failureThreshold: 10
      resources:
        requests:
          cpu: "2"
          memory: "2Gi"
        limits:
          cpu: "8"
          memory: "16Gi"
      pvc:
        create: false
        name: profiling-pvc # Must be pre-created before deployment and SLA profiler must have been run
        mountPoint: /workspace/profiling_results
      extraPodSpec:
        mainContainer:
          image: nvcr.io/nvidian/nim-llm-dev/sglang-runtime:hzhou-0811-1
          workingDir: /workspace/components/planner/src/dynamo/planner
          args:
            - python
            - -m
            - planner_sla
            - --environment=kubernetes
            - --backend=sglang
            - --adjustment-interval=60
            - --profile-results-dir=/workspace/profiling_results
    Prometheus:
      dynamoNamespace: dynamo
      componentType: main
      replicas: 1
      envs:
        - name: PYTHONPATH
          value: "/workspace/components/planner/src"
      livenessProbe:
        exec:
          command:
            - /bin/sh
            - -c
            - "exit 0"
        periodSeconds: 60
        timeoutSeconds: 30
        failureThreshold: 10
      readinessProbe:
        exec:
          command:
            - /bin/sh
            - -c
            - "exit 0"
        initialDelaySeconds: 30
        periodSeconds: 60
        timeoutSeconds: 30
        failureThreshold: 10
      resources:
        requests:
          cpu: "2"
          memory: "2Gi"
        limits:
          cpu: "8"
          memory: "16Gi"
      extraPodSpec:
        mainContainer:
          image: nvcr.io/nvidian/nim-llm-dev/sglang-runtime:hzhou-0811-1
          workingDir: /workspace/components/backends/sglang
          command:
            - /bin/sh
            - -c
          args:
            - "python3 -m dynamo.planner.prometheus"
    SGLangDecodeWorker:
      dynamoNamespace: dynamo
      envFromSecret: hf-token-secret
      livenessProbe:
        httpGet:
          path: /live
          port: 9090
        periodSeconds: 5
        timeoutSeconds: 30
        failureThreshold: 1
      readinessProbe:
        httpGet:
          path: /health
          port: 9090
        periodSeconds: 10
        timeoutSeconds: 30
        failureThreshold: 60
      componentType: worker
      replicas: 2
      resources:
        requests:
          cpu: "10"
          memory: "20Gi"
          gpu: "1"
        limits:
          cpu: "32"
          memory: "80Gi"
          gpu: "1"
      envs:
        - name: DYN_SYSTEM_ENABLED
          value: "true"
        - name: DYN_SYSTEM_USE_ENDPOINT_HEALTH_STATUS
          value: "[\"generate\"]"
        - name: DYN_SYSTEM_PORT
          value: "9090"
      extraPodSpec:
        mainContainer:
          startupProbe:
            httpGet:
              path: /live
              port: 9090
            periodSeconds: 10
            failureThreshold: 60
          image: nvcr.io/nvidian/nim-llm-dev/sglang-runtime:hzhou-0811-1
          workingDir: /workspace/components/backends/sglang
          args:
            - "python3"
            - "-m"
            - "dynamo.sglang.decode_worker"
            - "--model-path"
            - "deepseek-ai/DeepSeek-R1-Distill-Llama-8B"
            - "--served-model-name"
            - "deepseek-ai/DeepSeek-R1-Distill-Llama-8B"
            - "--page-size"
            - "16"
            - "--tp"
            - "1"
            - "--trust-remote-code"
            - "--skip-tokenizer-init"
            - "--disaggregation-mode"
            - "decode"
            - "--disaggregation-transfer-backend"
            - "nixl"
    SGLangPrefillWorker:
      dynamoNamespace: dynamo
      envFromSecret: hf-token-secret
      livenessProbe:
        httpGet:
          path: /live
          port: 9090
        periodSeconds: 5
        timeoutSeconds: 30
        failureThreshold: 1
      readinessProbe:
        httpGet:
          path: /health
          port: 9090
        periodSeconds: 10
        timeoutSeconds: 30
        failureThreshold: 60
      componentType: worker
      replicas: 2
      resources:
        requests:
          cpu: "10"
          memory: "20Gi"
          gpu: "1"
        limits:
          cpu: "32"
          memory: "80Gi"
          gpu: "1"
      envs:
        - name: DYN_SYSTEM_ENABLED
          value: "true"
        - name: DYN_SYSTEM_USE_ENDPOINT_HEALTH_STATUS
          value: "[\"generate\"]"
        - name: DYN_SYSTEM_PORT
          value: "9090"
      extraPodSpec:
        mainContainer:
          startupProbe:
            httpGet:
              path: /health
              port: 9090
            periodSeconds: 10
            failureThreshold: 60
          image: nvcr.io/nvidian/nim-llm-dev/sglang-runtime:hzhou-0811-1
          workingDir: /workspace/components/backends/sglang
          args:
            - "python3"
            - "-m"
            - "dynamo.sglang.worker"
            - "--model-path"
            - "deepseek-ai/DeepSeek-R1-Distill-Llama-8B"
            - "--served-model-name"
            - "deepseek-ai/DeepSeek-R1-Distill-Llama-8B"
            - "--page-size"
            - "16"
            - "--tp"
            - "1"
            - "--trust-remote-code"
            - "--skip-tokenizer-init"
            - "--disaggregation-mode"
            - "prefill"
            - "--disaggregation-transfer-backend"
            - "nixl"