disagg_planner.yaml 4.57 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# 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
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
17
      componentType: frontend
18
19
20
      replicas: 1
      extraPodSpec:
        mainContainer:
21
          image: my-registry/sglang-runtime:my-tag
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
    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
      pvc:
        create: false
48
        name: dynamo-pvc # Must be pre-created before deployment and SLA profiler must have been run
49
        mountPoint: /data
50
51
      extraPodSpec:
        mainContainer:
52
          image: my-registry/sglang-runtime:my-tag
53
          workingDir: /workspace/components/planner/src/dynamo/planner
julienmancuso's avatar
julienmancuso committed
54
55
56
          command:
            - /bin/sh
            - -c
57
          args:
julienmancuso's avatar
julienmancuso committed
58
59
60
61
62
            - >-
              python3 -m planner_sla
              --environment=kubernetes
              --backend=sglang
              --adjustment-interval=60
63
              --profile-results-dir=/data/profiling_results
64
    Prometheus: # NOTE: this is set on Prometheus to ensure a service is created for the Prometheus component. This is a workaround and should be managed differently.
65
      dynamoNamespace: dynamo
66
      componentType: frontend
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
      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
      extraPodSpec:
        mainContainer:
92
          image: my-registry/sglang-runtime:my-tag
93
94
95
96
97
98
          workingDir: /workspace/components/backends/sglang
          command:
            - /bin/sh
            - -c
          args:
            - "python3 -m dynamo.planner.prometheus"
99
    decode:
100
101
102
103
104
105
106
107
108
      dynamoNamespace: dynamo
      envFromSecret: hf-token-secret
      componentType: worker
      replicas: 2
      resources:
        limits:
          gpu: "1"
      extraPodSpec:
        mainContainer:
109
          image: my-registry/sglang-runtime:my-tag
110
          workingDir: /workspace/components/backends/sglang
julienmancuso's avatar
julienmancuso committed
111
          command:
112
            - python3
113
          args:
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
            - -m
            - dynamo.sglang
            - --model-path
            - Qwen/Qwen3-0.6B
            - --served-model-name
            - Qwen/Qwen3-0.6B
            - --page-size
            - "16"
            - --tp
            - "1"
            - --trust-remote-code
            - --skip-tokenizer-init
            - --disaggregation-mode
            - decode
            - --disaggregation-transfer-backend
            - nixl
130
    prefill:
131
132
133
134
135
136
137
138
139
      dynamoNamespace: dynamo
      envFromSecret: hf-token-secret
      componentType: worker
      replicas: 2
      resources:
        limits:
          gpu: "1"
      extraPodSpec:
        mainContainer:
140
          image: my-registry/sglang-runtime:my-tag
141
          workingDir: /workspace/components/backends/sglang
julienmancuso's avatar
julienmancuso committed
142
          command:
143
            - python3
144
          args:
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
            - -m
            - dynamo.sglang
            - --model-path
            - Qwen/Qwen3-0.6B
            - --served-model-name
            - Qwen/Qwen3-0.6B
            - --page-size
            - "16"
            - --tp
            - "1"
            - --trust-remote-code
            - --skip-tokenizer-init
            - --disaggregation-mode
            - prefill
            - --disaggregation-transfer-backend
            - nixl