apiVersion: apps/v1
kind: Deployment
metadata:
  name: infer-env-quick-validation
spec:
  replicas: 1
  selector:
    matchLabels:
      app: infers
  template:
    metadata:
      labels:
         app: infers
    spec:
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
              - matchExpressions:
                  - key: servertype
                    operator: NotIn
                    values:
                      - soc
      schedulerName: volcano
      containers:
      - image: ascend-k8sdeviceplugin:v3.0.0                  # Inference image name
        imagePullPolicy: IfNotPresent
        name: infer-env-quick-validation
        command: [ "/bin/bash", "-c", "npu-smi info;sleep 100000;" ]
        resources:
          requests:
            huawei.com/Ascend310: 1             # Number of the Ascend 310 Processors. If the Ascend 310P Processor is used, change it to huawei.com/Ascend310P.
          limits:
            huawei.com/Ascend310: 1             # The value should be the same as that of requests . If the Ascend 310P Processor is used, change it to huawei.com/Ascend310P.
        volumeMounts:
          - name: ascend-driver
            mountPath: /usr/local/Ascend/driver
          - name: npu-smi
            mountPath: /usr/local/bin/npu-smi
      volumes:
        - name: ascend-driver
          hostPath:
            path: /usr/local/Ascend/driver
        - name: npu-smi
          hostPath:
            path: /usr/local/bin/npu-smi