This document is relevant for: Inf1

Update to latest PyTorch Neuron (torch-neuron)#

If you already have a previous Neuron release installed, this section provide links that will assist you to update to latest Neuron release.

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.

# Activate Python venv 
source aws_neuron_venv_pytorch_inf1/bin/activate 

# Install Jupyter notebook kernel
pip install ipykernel 
python3.10 -m ipykernel install --user --name aws_neuron_venv_pytorch_inf1 --display-name "Python (torch-neuron)"
pip install jupyter notebook
pip install environment_kernels

# Set pip repository pointing to the Neuron repository 
python -m pip config set global.extra-index-url https://pip.repos.neuron.amazonaws.com

# Update PyTorch Neuron
python -m pip install --upgrade torch-neuron neuron-cc[tensorflow] "protobuf" torchvision

This document is relevant for: Inf1