This document is relevant for: Inf1, Inf2, Trn1, Trn2, Trn3
Install AWS Neuron SDK#
Install the AWS Neuron SDK to enable deep learning acceleration on Inferentia and Trainium instances.
Note
New to Neuron? Start with the quickstart guide for a complete end-to-end tutorial.
Quick Start Decision Tree#
Answer these questions to find your installation path:
1. Which framework?
2. Installation method?
AWS Deep Learning AMI — fastest setup, pre-configured with all dependencies. Best for getting started and single-user development.
Deep Learning Container — Docker-based, portable across EC2, ECS, EKS. Best for production deployments and CI/CD pipelines.
Manual installation — full control over packages and versions. Best for custom OS images and shared clusters.
Instance Comparison#
Instance |
NeuronCore |
Use Case |
Status |
|---|---|---|---|
Trn3 |
Training and inference (latest generation) |
Current |
|
Trn2 |
Training and inference |
Current |
|
Trn1 |
Training and inference |
Current |
|
Inf2 |
Inference |
Current |
|
Inf1 |
Legacy inference |
Legacy |
Installation by Framework#
Multi-framework DLAMI#
Common Issues#
⚠️ Module not found errors
If you see “No module named ‘torch_neuronx’” or similar:
Verify virtual environment is activated
Check Python version:
python --version(3.12 or later for TorchNeuron)Reinstall:
pip install --force-reinstall torch-neuronx
See Installation Troubleshooting for more details.
⚠️ Instance type not recognized
Ensure you’re using a Neuron-supported instance:
Check with:
aws ec2 describe-instance-types --instance-types <type>Verify Neuron devices:
neuron-ls
See Installation Troubleshooting for more details.
⚠️ Version compatibility issues
Check version compatibility:
TorchNeuron requires PyTorch 2.13 or 2.14 and Python 3.12 to 3.14; see the TorchNeuron release notes for the support matrix
See AWS Neuron SDK Release Notes for other components
See Installation Troubleshooting for more details.
Legacy Inf1 Support#
Warning
Inf1 uses the legacy NeuronCore v1 architecture. For new projects, use Trn2 or Trn3.
Current-generation NeuronCores (v3 on Trn2, v4 on Trn3)
Broader framework support (TorchNeuron, JAX, vLLM Neuron)
Active development and feature updates
Additional Resources#
Amazon EC2 - Launch Inf/Trn instances on Amazon EC2
Deploy on AWS - Use Deep Learning Containers
Installation Troubleshooting - Installation troubleshooting guide
AWS Neuron SDK Release Notes - Version compatibility information
This document is relevant for: Inf1, Inf2, Trn1, Trn2, Trn3