# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
apiVersion: batch/v1
kind: Job
metadata:
  name: profile-sla
  namespace: ${NAMESPACE}
spec:
  template:
    spec:
      serviceAccountName: dynamo-sa
      containers:
      - name: profile-sla
        image: ${DOCKER_IMAGE}
        resources:
          requests:
            cpu: "32"
            memory: "50Gi"
        env:
          - name: HUGGING_FACE_HUB_TOKEN
            valueFrom:
              secretKeyRef:
                name: hf-token-secret
                key: HF_TOKEN
          - name: NATS_SERVER
            value: nats://${NAMESPACE}-nats:4222
          - name: ETCD_ENDPOINTS
            value: ${NAMESPACE}-etcd:2379
        workingDir: /sgl-workspace/dynamo
        command: ["python", "-m", "benchmarks.profiler.profile_sla"]
        args:
          - --config
          - /sgl-workspace/dynamo/recipes/deepseek-r1/sglang-wideep/tep16p-dep16d-disagg.yaml
          - --output-dir
          - /data/profiling_results
          - --namespace
          - ${NAMESPACE}
          - --backend
          - sglang
          - --is-moe-model
          - --min-num-gpus-per-engine
          - "8"
          - --max-num-gpus-per-engine
          - "16"
          - --isl
          - "3000"
          - --osl
          - "150"
          - --ttft
          - "200"
          - --itl
          - "20"
        volumeMounts:
          - name: output-volume
            mountPath: /data
      restartPolicy: Never
      volumes:
        - name: output-volume
          persistentVolumeClaim:
            claimName: dynamo-pvc
  backoffLimit: 0
