This document is relevant for: Inf2, Trn1, Trn2

Install PyTorch NeuronX#

Develop on AWS ML accelerator instance#

Note

  • For a successful installation or update, execute each line of the instructions below separately or copy the contents of the code block into a script file and source its contents.

  • When launching a Trn1, please adjust your primary EBS volume size to a minimum of 512GB.

  • While launching the instance, please use the AMI with the name Deep Learning Base Neuron AMI (Amazon Linux 2) <Latest_Date>.

  • To launch an instance using a specific AMI, please refer to the instructions mentioned here.

Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/awsdocs-neuron/checkouts/v2.25.0/src/helperscripts/n2-helper.py", line 1143, in <module>
    print(n2_manifest.generate_script(args))
  File "/home/docs/checkouts/readthedocs.org/user_builds/awsdocs-neuron/checkouts/v2.25.0/src/helperscripts/n2-helper.py", line 138, in generate_script
    str_python = self.set_python_venv(args)
  File "/home/docs/checkouts/readthedocs.org/user_builds/awsdocs-neuron/checkouts/v2.25.0/src/helperscripts/n2-helper.py", line 575, in set_python_venv
    packages_supporting_python_versions = self.get_pip_packages_supporting_python_versions(args)
  File "/home/docs/checkouts/readthedocs.org/user_builds/awsdocs-neuron/checkouts/v2.25.0/src/helperscripts/n2-helper.py", line 82, in get_pip_packages_supporting_python_versions
    framework_python_versions = df_framework.loc[
IndexError: index 0 is out of bounds for axis 0 with size 0

Note

  • For a successful installation or update, execute each line of the instructions below separately or copy the contents of the code block into a script file and source its contents.

  • When launching a Trn1, please adjust your primary EBS volume size to a minimum of 512GB.

  • While launching the instance, please use the AMI with the name Deep Learning Base Neuron AMI (Ubuntu 20.04) <Latest_Date>.

  • To launch an instance using a specific AMI, please refer to the instructions mentioned here.

Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/awsdocs-neuron/checkouts/v2.25.0/src/helperscripts/n2-helper.py", line 1143, in <module>
    print(n2_manifest.generate_script(args))
  File "/home/docs/checkouts/readthedocs.org/user_builds/awsdocs-neuron/checkouts/v2.25.0/src/helperscripts/n2-helper.py", line 138, in generate_script
    str_python = self.set_python_venv(args)
  File "/home/docs/checkouts/readthedocs.org/user_builds/awsdocs-neuron/checkouts/v2.25.0/src/helperscripts/n2-helper.py", line 575, in set_python_venv
    packages_supporting_python_versions = self.get_pip_packages_supporting_python_versions(args)
  File "/home/docs/checkouts/readthedocs.org/user_builds/awsdocs-neuron/checkouts/v2.25.0/src/helperscripts/n2-helper.py", line 82, in get_pip_packages_supporting_python_versions
    framework_python_versions = df_framework.loc[
IndexError: index 0 is out of bounds for axis 0 with size 0

Note

  • When launching a Trn1, please adjust your primary EBS volume size to a minimum of 512GB.

  • While launching the instance, please use the AMI with the name Deep Learning AMI Neuron PyTorch 1.13.1 (Amazon Linux 2) <Latest_Date>.

  • To launch an instance using a specific AMI, please refer to the instructions mentioned here.

Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/awsdocs-neuron/checkouts/v2.25.0/src/helperscripts/n2-helper.py", line 1143, in <module>
    print(n2_manifest.generate_script(args))
  File "/home/docs/checkouts/readthedocs.org/user_builds/awsdocs-neuron/checkouts/v2.25.0/src/helperscripts/n2-helper.py", line 138, in generate_script
    str_python = self.set_python_venv(args)
  File "/home/docs/checkouts/readthedocs.org/user_builds/awsdocs-neuron/checkouts/v2.25.0/src/helperscripts/n2-helper.py", line 575, in set_python_venv
    packages_supporting_python_versions = self.get_pip_packages_supporting_python_versions(args)
  File "/home/docs/checkouts/readthedocs.org/user_builds/awsdocs-neuron/checkouts/v2.25.0/src/helperscripts/n2-helper.py", line 82, in get_pip_packages_supporting_python_versions
    framework_python_versions = df_framework.loc[
IndexError: index 0 is out of bounds for axis 0 with size 0

Note

  • When launching a Trn1, please adjust your primary EBS volume size to a minimum of 512GB.

  • While launching the instance, please use the AMI with the name Deep Learning AMI Neuron PyTorch 1.13.1 (Ubuntu 20.04) <Latest_Date>.

  • To launch an instance using a specific AMI, please refer to the instructions mentioned here.

Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/awsdocs-neuron/checkouts/v2.25.0/src/helperscripts/n2-helper.py", line 1143, in <module>
    print(n2_manifest.generate_script(args))
  File "/home/docs/checkouts/readthedocs.org/user_builds/awsdocs-neuron/checkouts/v2.25.0/src/helperscripts/n2-helper.py", line 138, in generate_script
    str_python = self.set_python_venv(args)
  File "/home/docs/checkouts/readthedocs.org/user_builds/awsdocs-neuron/checkouts/v2.25.0/src/helperscripts/n2-helper.py", line 575, in set_python_venv
    packages_supporting_python_versions = self.get_pip_packages_supporting_python_versions(args)
  File "/home/docs/checkouts/readthedocs.org/user_builds/awsdocs-neuron/checkouts/v2.25.0/src/helperscripts/n2-helper.py", line 82, in get_pip_packages_supporting_python_versions
    framework_python_versions = df_framework.loc[
IndexError: index 0 is out of bounds for axis 0 with size 0

Note

  • Please refer to the instructions under the tab Amazon Linux 2 DLAMI Base.

Note

  • Please refer to the instructions under the tab Ubuntu 20 DLAMI Base.

This document is relevant for: Inf2, Trn1, Trn2