AMCT (ONNX)

Use the AMCT installation user to install the dependent software. If the installation user is a non-root user, ensure that the user has the sudo permission. Run the su - username command to switch to the non-root user and run the following commands. If the installation user is root, delete --user from the command for installing the dependent software. .

Table 1 Dependency list

Dependency

Version

Installation Command

ONNX

1.14.0, 1.10.0, 1.9.0, 1.8.0

  • ONNX 1.14.0
    pip3 install onnx==1.14.0 --user
  • ONNX 1.10.0
    pip3 install onnx==1.10.0 --user
  • ONNX 1.9.0
    pip3 install onnx==1.9.0 --user
  • ONNX 1.8.0
    pip3 install onnx==1.8.0 --user

ONNX Runtime

1.16.0, 1.9.0, 1.8.0, 1.6.0

For ONNX Runtime CPU, see the following commands. For ONNX Runtime earlier than 1.9.0 of GPU version, you need to install it yourself.

  • ONNX Runtime 1.16.0
    • CPU version
      pip3 install onnxruntime==1.16.0 --user
    • GPU version. Before installation, install CUDA 11.8 and cuDNN 8.2.4–8.9.0 first. EulerOS (AArch64) does not support quantization on the GPU.
      pip3 install onnxruntime-gpu==1.16.0 --user 
  • ONNX Runtime 1.9.0
    pip3 install onnxruntime==1.9.0 --user

    Before installing the ONNX Runtime GPU, install CUDA11.4 and cuDNN 8.2.4.

  • ONNX Runtime 1.8.0
    pip3 install onnxruntime==1.8.0 --user

    Before installing the ONNX Runtime GPU, install CUDA11.0 and cuDNN 8.0.5.

  • ONNX Runtime 1.6.0
    pip3 install onnxruntime==1.6.0 --user

    Before installing the ONNX Runtime GPU, install CUDA10.2 and cuDNN 8.0.3.

Python

Version 3.9.2 is used as an example.

For Ubuntu, see Python 3.9.2 Installation on Ubuntu.

numpy

  • ONNX 1.14.0 works with NumPy 1.21.6–1.26.4.
  • ONNX 1.10.0, 1.9.0, and 1.8.0 works with NumPy 1.20.0–1.23.5.
  • ONNX 1.14.0
    pip3 install numpy==1.21.6 --user
  • ONNX 1.10.0, 1.9.0, or 1.8.0
    pip3 install numpy==1.20.0 --user

protobuf

  • ONNX 1.14.0 works with Protobuf 3.20.2–3.20.3.
  • ONNX 1.10.0, 1.9.0, and 1.8.0 works with Protobuf 3.13.0+.
  • ONNX 1.14.0
    pip3 install protobuf==3.20.2 --user
  • ONNX 1.10.0, 1.9.0, or 1.8.0
    pip3 install protobuf==3.13.0 --user