deploy.yaml 3.16 KB
Newer Older
1
# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2
# SPDX-License-Identifier: Apache-2.0
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
apiVersion: v1
kind: ConfigMap
metadata:
  name: llm-config
data:
  config.yaml: |
    enable_attention_dp: true
    cuda_graph_config:
        max_batch_size: 800
        enable_padding: true
    kv_cache_config:
      enable_block_reuse: false
    stream_interval: 20
    moe_config:
        backend: CUTLASS
---
19
20
21
apiVersion: nvidia.com/v1alpha1
kind: DynamoGraphDeployment
metadata:
22
  name: gpt-oss-agg
23
24
spec:
  backendFramework: trtllm
25
  pvcs:
26
    - name: model-cache
27
      create: false
28
  services:
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
    Frontend:
      componentType: frontend
      extraPodSpec:
        affinity:
          podAntiAffinity:
            requiredDuringSchedulingIgnoredDuringExecution:
            - labelSelector:
                matchExpressions:
                - key: nvidia.com/dynamo-graph-deployment-name
                  operator: In
                  values:
                  - gpt-oss-agg-frontend
              topologyKey: kubernetes.io/hostname
        mainContainer:
          args:
          - python3 -m dynamo.frontend --router-mode round-robin --http-port 8000
          command:
          - /bin/sh
          - -c
48
          image: nvcr.io/nvidia/ai-dynamo/tensorrtllm-runtime:0.8.0
49
      replicas: 1
50
    TrtllmWorker:
51
      componentType: worker
52
      envFromSecret: hf-token-secret
53
      volumeMounts:
54
        - name: model-cache
55
          mountPoint: /opt/models
56
57
58
59
60
61
62
      sharedMemory:
        size: 80Gi
      extraPodSpec:
        affinity:
          nodeAffinity:
            requiredDuringSchedulingIgnoredDuringExecution:
              nodeSelectorTerms:
63
64
65
66
67
              - matchExpressions:
                - key: nvidia.com/gpu.present
                  operator: In
                  values:
                  - "true"
68
69
70
71
        mainContainer:
          args:
          - |
            python3 -m dynamo.trtllm \
72
73
74
75
76
77
              --model-path "${MODEL_PATH}" \
              --served-model-name "openai/gpt-oss-120b" \
              --extra-engine-args "${ENGINE_ARGS}" \
              --tensor-parallel-size 4 \
              --expert-parallel-size 4 \
              --max-batch-size 800 \
78
79
80
81
              --free-gpu-memory-fraction 0.9
          command:
          - /bin/sh
          - -c
82
          image: nvcr.io/nvidia/ai-dynamo/tensorrtllm-runtime:0.8.0
83
84
85
86
87
88
89
90
91
92
          env:
          - name: TRTLLM_ENABLE_PDL
            value: "1"
          - name: TRT_LLM_DISABLE_LOAD_WEIGHTS_IN_PARALLEL
            value: "True"
          - name: SERVED_MODEL_NAME
            value: "openai/gpt-oss-120b"
          - name: ENGINE_ARGS
            value: "/opt/dynamo/configs/config.yaml"
          - name: MODEL_PATH
93
            value: "openai/gpt-oss-120b"
94
95
          - name: HF_HOME
            value: /opt/models
96
97
98
99
          volumeMounts:
          - mountPath: /opt/dynamo/configs
            name: llm-config
            readOnly: true
100
          workingDir: /workspace/examples/backends/trtllm
101
102
103
104
        volumes:
        - configMap:
            name: llm-config
          name: llm-config
105
      replicas: 1
106
107
108
109
110
      resources:
        limits:
          gpu: "4"
        requests:
          gpu: "4"