The process of using other schedulers on the CLI is the same as that of using Volcano. The only difference is that the required job YAML files are different. Prepare and use the corresponding YAML files by referring to Use on the CLI (Volcano).
Job Type |
Hardware Model |
YAML File Name |
How to Obtain |
|---|---|---|---|
Jobs of Kubernetes or other schedulers |
Atlas 200I SoC A1 core board |
infer-310p-1usoc.yaml |
Click here. |
Inference nodes of other types |
infer.yaml |
Parameter |
Value |
Description |
|---|---|---|
image |
- |
Inference image name. Change it based on your actual requirements. (It is the name of the image created in the image preparation section.) |
replicas |
Integer |
Number of job replicas. Generally, the value is 1. |
requests |
Example: huawei.com/Ascend310: 1 |
Type and number of requested NPUs. Change them as required. For requests and limits, the processor name and quantity must be the same. |
limits |
||
(Optional) host-arch |
ARM environment: huawei-arm x86_64 environment: huawei-x86 |
Architecture of the node where an inference job is executed. Set this parameter as required. The Atlas 200I SoC A1 core board supports only huawei-arm. |
servertype |
soc |
Server type.
|
Feature |
Operation Reference |
|---|---|
Full NPU scheduling |
Creating a Single-Processor Job on Atlas Inference Products (non-Atlas 200I SoC A1 Core Board) |
Creating a Single-Processor Job on the Atlas 200I SoC A1 Core Board |
|
Creating a Single-Processor Job on the Atlas 800I A2 Inference Server |
|
Static vNPU scheduling |
Creating a Single-Processor Job on Atlas Inference Products (Non-Atlas 200I SoC A1 Core Board) |
apiVersion: batch/v1
kind: Job
metadata:
name: resnetinfer1-1
spec:
template:
spec:
nodeSelector:
host-arch: huawei-arm # (Optional) Set it as required.
affinity: # The job is not scheduled to the Atlas 200I SoC A1 core board.
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: servertype
operator: NotIn
values:
- soc
containers:
- image: ubuntu-infer:v1
...
resources:
requests:
huawei.com/Ascend310P: 1
limits:
huawei.com/Ascend310P: 1
...
apiVersion: batch/v1
kind: Job
metadata:
name: resnetinfer1-1-1usoc
spec:
template:
spec:
nodeSelector:
host-arch: huawei-arm # (Optional) Set it as required.
servertype: soc # The job is scheduled only to the Atlas 200I SoC A1 core board.
containers:
- image: ubuntu-infer:v1
...
resources:
requests:
huawei.com/Ascend310P: 1
limits:
huawei.com/Ascend310P: 1
...
The directories and files to be mounted to the node of the Atlas 200I SoC A1 core board are different from those to other types of nodes. To avoid inference failure, if Atlas inference product are required and the node of the Atlas 200I SoC A1 core board exists in a cluster but you do not want to schedule jobs to this type of node, add the affinity field to the example YAML file. This prevents scheduling jobs to the nodes with the servertype=soc label.
apiVersion: batch/v1
kind: Job
metadata:
name: resnetinfer1-1
spec:
template:
spec:
nodeSelector:
host-arch: huawei-arm # (Optional) Set it as required.
...
containers:
- image: ubuntu-infer:v1
...
resources:
requests:
huawei.com/Ascend910: 1
limits:
huawei.com/Ascend910: 1
...
apiVersion: batch/v1
kind: Job
metadata:
name: resnetinfer1-1
spec:
template:
spec:
nodeSelector:
host-arch: huawei-arm # (Optional) Set it as required.
containers:
- image: ubuntu-infer:v1
...
resources:
requests:
huawei.com/Ascend310P-2c: 1
limits:
huawei.com/Ascend310P-2c: 1
...