Preparing an Inference Image

Obtaining an Inference Image

Use either of the following methods to obtain an inference image:

  • (Recommended) Download the base inference image (such as ascend-infer or infer-modelzoo) from Ascend Hub based on the system architecture (Arm or x86). Change the default user in the container to root based on the base inference image. (In versions later than 21.0.4, the default user of the base inference image is non-root.) The base image does not contain files such as the inference model and script. You need to customize the files (for example, add the inference script code and model) before using them.
  • You can customize your own inference image based on the inference base image. For details, see Common Operations.

You can rename the customized inference image, for example, ubuntu-infer:v1.

(Recommended) Hardening the Image

For details, see Hardening Container Security.