AMCT (PyTorch)

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

CPU or GPU version of PyTorch

2.1.0, 1.10.0, 1.8.0, 1.5.0, 1.4.0

When installing PyTorch, ensure that the pip version is earlier than 23.0.1. Otherwise, you may get the error "ModuleNotFoundError:No module named 'torch'". If the pip version is later than 23.0.1 and you do not want to downgrade the version, install the wheel package first by using the pip3 install wheel --user command and then perform subsequent operations.

  • CPU or GPU version of PyTorch 2.1.0:
    • CPU
      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
    • GPU version
      python3 -m pip --trusted-host=download.pytorch.org install torch==2.1.0 torchvision==0.16.0  -f https://download.pytorch.org/whl/torch_stable.html --user
  • (Recommended) CPU or GPU version of PyTorch 1.10.0:
    • CPU
      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
    • GPU version
      python3 -m pip --trusted-host=download.pytorch.org install torch==1.10.0 torchvision==0.11.0  -f https://download.pytorch.org/whl/torch_stable.html --user
  • CPU or GPU version of PyTorch 1.8.0:
    • CPU
      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
    • GPU version
      python3 -m pip --trusted-host=download.pytorch.org install torch==1.8.0+cu101 torchvision==0.9.0+cu101 -f https://download.pytorch.org/whl/torch_stable.html --user
  • CPU or GPU version of PyTorch 1.5.0:
    • CPU
      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
    • GPU version
      python3 -m pip --trusted-host=download.pytorch.org install torch==1.5.0+cu101 torchvision==0.6.0+cu101 -f https://download.pytorch.org/whl/torch_stable.html --user
  • CPU or GPU version of PyTorch 1.4.0 (not recommended due to disturbing warnings):

    • CPU
      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
    • GPU version
      python3 -m pip --trusted-host=download.pytorch.org install torch==1.4.0+cu100 torchvision==0.5.0+cu100 -f https://download.pytorch.org/whl/torch_stable.html --user

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

  • ONNX Runtime 1.16.0
    pip3 install onnxruntime==1.16.0 --user
  • ONNX Runtime 1.9.0
    pip3 install onnxruntime==1.9.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 Ubuntu, see Python 3.9.2 Installation on Ubuntu.

For EulerOS, see Python Python3.9.2 Installation on EulerOS.

numpy

  • 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.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.1.0 works with Protobuf 3.20.2 and later versions.
  • PyTorch 1.10.0, 1.8.0, 1.5.0, and 1.4.0 work with Protobuf 3.13.0 and later versions.
  • PyTorch 2.1.0
    pip3 install protobuf==3.20.2 --user
  • PyTorch 1.10.0, 1.8.0, 1.5.0, and 1.4.0
    pip3 install protobuf==3.13.0 --user