# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
apiVersion: nvidia.com/v1alpha1
kind: DynamoGraphDeployment
metadata:
  name: agg-kvbm-qwen3-32b
spec:
  pvcs:
  - create: false
    name: model-cache
  - create: false
    name: compilation-cache
  services:
    Frontend:
      componentType: frontend
      envs:
        - name: HF_HOME
          value: /home/dynamo/.cache/huggingface
      extraPodSpec:
        mainContainer:
          image: nvcr.io/nvidia/ai-dynamo/vllm-runtime:1.0.0
          workingDir: /workspace
          command:
            - python3
            - -m
            - dynamo.frontend
          args:
            - --router-reset-states
      replicas: 1
      subComponentType: null
    VllmDecodeWorker:
      componentType: worker
      envFromSecret: hf-token-secret
      volumeMounts:
      - name: model-cache
        mountPoint: /home/dynamo/.cache/huggingface
      - name: compilation-cache
        mountPoint: /home/dynamo/.cache/vllm
        useAsCompilationCache: true
      extraPodSpec:
        mainContainer:
          args:
          - --model
          - Qwen/Qwen3-32B
          - --kv-transfer-config
          - '{"kv_connector":"DynamoConnector","kv_role":"kv_both","kv_connector_module_path":"kvbm.vllm_integration.connector"}'
          command:
          - python3
          - -m
          - dynamo.vllm
          image: nvcr.io/nvidia/ai-dynamo/vllm-runtime:1.0.0
          env:
          - name: DYN_HEALTH_CHECK_ENABLED
            value: "false"
          - name: HF_HOME
            value: /home/dynamo/.cache/huggingface
          # NOTE: change this to tune the CPU cache size for your system
          - name: DYN_KVBM_CPU_CACHE_GB
            value: "100"
          workingDir: /workspace
      replicas: 1
      resources:
        limits:
          gpu: "1"
          memory: "200Gi"
        requests:
          gpu: "1"
          memory: "150Gi"
