apiVersion: apps/v1
kind: Deployment
metadata:
  name: resnetinfer1-1-deploy
  labels:
      app: infers
spec:
  replicas: 1
  selector:
    matchLabels:
      app: infers
  template:
    metadata:
      labels:
         app: infers
         fault-scheduling: grace       # Add this Labels, will reschedule pods in the event of chip failures.
         ring-controller.atlas: ascend-310P # Add this Label, used to check job kind.
         vnpu-dvpp: "null"                 # For NPU dynamic segmentation,null means don't care dvpp resource ,yes means used dvpp,no means ndvpp
         vnpu-level: low                # For NPU dynamic segmentation,low means low-level configuration,high means performance first,default low.
    spec:
      schedulerName: volcano
      automountServiceAccountToken: false
      containers:
      - image: ubuntu-infer:v1                  # Inference image name
        imagePullPolicy: IfNotPresent
        name: resnet50infer
        resources:
          requests:
            huawei.com/npu-core: 1             # Number of required NPUs. The maximum value is 8. You can add lines below to configure resources such as memory and CPU.
          limits:
            huawei.com/npu-core: 1             # The value should be the same as that of requests .
        volumeMounts:
        - name: slog
          mountPath: /var/log/npu/conf/slog/    #Log path
        - name: localtime                       #The container time must be the same as the host time.
          mountPath: /etc/localtime
      volumes:
      - name: slog
        hostPath:
          path: /var/log/npu/conf/slog/
      - name: localtime
        hostPath:
          path: /etc/localtime