AMCT (PyTorch)

Install software as the AMCT installation user. If the said user is a non-root user, check that the user has the sudo permission. Then run the su - username command to switch to the non-root user and run the commands listed in the following table. (If the installation user is root, delete --user from the dependency installation command.)

Table 1 Dependencies

Dependency

Version

Installation Command

CPU of the PyTorch version

2.7.1, 2.1.0, 1.10.0, 1.8.0, 1.5.0, 1.4.0

  • Installation command for the CPU version of PyTorch 2.7.1
    python3 -m pip --trusted-host=download.pytorch.org install torch==2.7.1 torchvision==0.22.1  -f https://download.pytorch.org/whl/torch_stable.html --user
  • Installation command for the CPU version of PyTorch 2.1.0
    python3 -m pip --trusted-host=download.pytorch.org install torch==2.1.0+cpu torchvision==0.16.0+cpu  -f https://download.pytorch.org/whl/torch_stable.html --user
  • Installation command for the CPU version of PyTorch 1.10.0 (recommended)
    python3 -m pip --trusted-host=download.pytorch.org install torch==1.10.0+cpu torchvision==0.11.0+cpu  -f https://download.pytorch.org/whl/torch_stable.html --user
  • Installation command for the CPU version of PyTorch 1.8.0
    python3 -m pip --trusted-host=download.pytorch.org install torch==1.8.0+cpu torchvision==0.9.0+cpu -f https://download.pytorch.org/whl/torch_stable.html --user
  • Installation command for the CPU version of PyTorch 1.5.0
    python3 -m pip --trusted-host=download.pytorch.org install torch==1.5.0+cpu torchvision==0.6.0+cpu -f https://download.pytorch.org/whl/torch_stable.html --user
  • Installation command for the CPU version of PyTorch 1.4.0 (not recommended, as a warning message will be displayed when it is used)
    python3 -m pip --trusted-host=download.pytorch.org install torch==1.4.0+cpu torchvision==0.5.0+cpu -f https://download.pytorch.org/whl/torch_stable.html --user

ONNX

1.18.0, 1.16.1, 1.14.0, 1.9.0, 1.8.0

  • ONNX 1.18.0
    pip3 install onnx==1.18.0 --user
  • ONNX 1.16.1
    pip3 install onnx==1.16.1 --user
  • ONNX 1.14.0
    pip3 install onnx==1.14.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.20.0, 1.16.0, 1.8.0, 1.6.0

  • ONNX Runtime 1.20.0
    pip3 install onnxruntime==1.20.0 --user
  • ONNX Runtime 1.16.0
    pip3 install onnxruntime==1.16.0 --user
  • ONNX Runtime 1.8.0
    pip3 install onnxruntime==1.8.0 --user
  • ONNX Runtime 1.6.0
    pip3 install onnxruntime==1.6.0 --user

Python

Version 3.9.2 is used as an example.

For the Ubuntu OS, see Python 3.9.2 Installation on Ubuntu.

For EulerOS, see Python3.9.2 Installation on EulerOS.

Ascend Extension for PyTorch

-

For the installation command, click here and see "Environment Setup > Installing PyTorch."

NumPy

  • PyTorch 2.7.1 and Python 3.12/3.13 work with NumPy 2.0.0 and later versions.
  • PyTorch 2.7.1 and Python 3.11.x work with NumPy 1.24.2–1.26.4.
  • PyTorch 2.1.0 works with NumPy 1.21.6 and later versions.
  • PyTorch 1.10.0, 1.8.0, 1.5.0, and 1.4.0 work with NumPy 1.20.0–1.23.5.
  • PyTorch 2.7.1
    pip3 install numpy==1.24.2 --user
  • PyTorch 2.1.0
    pip3 install numpy==1.21.6 --user
  • PyTorch 1.10.0, 1.8.0, 1.5.0, and 1.4.0
    pip3 install numpy==1.20.0 --user

Protobuf

  • PyTorch 2.7.1 and Python 3.12/3.13 work with Protobuf 3.20.3.
  • PyTorch 2.7.1 and Python 3.11.x work with Protobuf 3.20.2–3.20.3.
  • PyTorch 2.1.0, 1.10.0, 1.8.0, 1.5.0, and 1.4.0 work with Protobuf 3.20.2 and later versions.
pip3 install protobuf==3.20.3 --user

Or

pip3 install protobuf==3.20.2 --user

pyyaml

-

pip3 install pyyaml --user

transformers

5.5.4

pip3 install transformers==5.5.4 --user

loguru

-

pip3 install loguru --user

datasets

-

pip3 install datasets --user

accelerate

-

pip3 install accelerate --user

compressed_tensors

0.15.0.1

pip3 install compressed_tensors==0.15.0.1 --user

scipy

-

pip3 install scipy --user

torchao

-

pip3 install torchao --user

einops

-

pip3 install einops --user

sentencepiece

-

pip3 install sentencepiece --user

datasets

4.8.4

pip3 install datasets==4.8.4 --user

zstandard

0.25.0

pip3 install zstandard==0.25.0 --user