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. What’s your use case?
Training ML models → Use Trn1, Trn2, or Trn3
Running inference → Use Inf2, Trn1, Trn2, or Trn3
Legacy Inf1 support → See Legacy Inf1 Support
2. Which framework?
3. 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(should be 3.10+)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:
PyTorch 2.9+ requires neuronx-cc 2.15+
See AWS Neuron SDK Release Notes for compatibility matrix
See Installation Troubleshooting for more details.
Legacy Inf1 Support#
Warning
Inf1 uses legacy NeuronCore v1 architecture. For new projects, use Inf2, Trn1, Trn2, or Trn3 with NeuronCore v2.
Inf2 offers 3x better price-performance than Inf1
Broader framework support (PyTorch 2.x, JAX)
Active development and feature updates
Additional Resources#
Amazon EC2 - Launch Inf/Trn instances on Amazon EC2
Neuron Containers - Use Deep Learning Containers
Installation Troubleshooting - Installation troubleshooting guide
AWS Neuron SDK Release Notes - Version compatibility information
Other Platforms#
This document is relevant for: Inf1, Inf2, Trn1, Trn2, Trn3