This document is relevant for: Inf1, Inf2, Trn1, Trn2

Select a Different Platform for Setup

PyTorch Neuron Setup Guide for Rocky Linux 9#

Get Started with Latest Release of PyTorch Neuron#

This section provides links that will assist you to quickly start with a fresh installation of PyTorch Neuron (torch-neuronx , torch-neuron).

Launch the Instance
  • Please follow the instructions at launch an Amazon EC2 Instance to launch an instance. When choosing the instance type at the EC2 console, please make sure to select the correct instance type.

  • To get more information about instances sizes and pricing see: Trn1 web page, Inf2 web page

  • Select Rocky-9-EC2-Base AMI

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

  • After launching the instance, follow the instructions in Connect to your instance to connect to the instance

Install Drivers and Tools
Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/awsdocs-neuron/checkouts/latest/src/helperscripts/n2-helper.py", line 1140, in <module>
    print(n2_manifest.generate_script(args))
  File "/home/docs/checkouts/readthedocs.org/user_builds/awsdocs-neuron/checkouts/latest/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/latest/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/latest/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

Please continue with the installation instructions for EFA and PyTorch Neuron by following the corresponding AL2023 setup guide below (please skip the “Launch the Instance” and “Install Drivers and Tools” sections).

Pytorch Neuron (torch-neuronx) Setup on Amazon Linux 2023
Pytorch Neuron (torch-neuron) Setup on Amazon Linux 2023

This document is relevant for: Inf1, Inf2, Trn1, Trn2