AWS Developer Tools Blog

Announcing end of support for Neuron Conda packages in Deep Learning AMI

We are changing the way AWS Neuron the SDK of Inf1 instances is installed and upgraded in Deep Learning AMI (DLAMI). Starting with Neuron SDK 1.14.0, we will no longer support conda packages to install Neuron SDK framework in DLAMI and we will no longer update conda packages used to install Neuron SDK framework (Neuron conda packages) with new versions.

Starting with Neuron SDK 1.14.0, pip packages (Neuron pip packages) will be used to install Neuron SDK framework in DLAMI conda environment. To upgrade Neuron SDK framework DLAMI users should use pip upgrade commands instead of conda update commands. Instructions are available in this blog and in Neuron SDK documentation.

Why are we making the change?

  • To solve upgrade issues related to Neuron conda packages that were reported by users. For example, in some cases the upgrade using conda update <framework> cannot be used even though newer versions existed in known conda channel. By moving to pip upgrade flow we expect those issues to be solved.
  • To maintain consistency with the way software packages are installed in DLAMI where pip packages are used in most cases.

How does this impact me?

Starting with Neuron SDK 1.14.0, do not use conda update <framework> inside the conda environment to upgrade Neuron SDK framework to latest Neuron SDK releases. Instead, run one of the following commands to upgrade to latest Neuron framework of your choice:

  • To upgrade Neuron PyTorch:
source activate aws_neuron_pytorch_p36
pip config set global.extra-index-url https://pip.repos.neuron.amazonaws.com
pip install --upgrade torch-neuron neuron-cc[tensorflow] torchvision
  • To upgrade Neuron TensorFlow:
source activate aws_neuron_tensorflow_p36
pip config set global.extra-index-url https://pip.repos.neuron.amazonaws.com
pip install --upgrade tensorflow-neuron tensorboard-neuron neuron-cc
  • To upgrade Neuron MXNet:
source activate aws_neuron_mxnet_p36
pip config set global.extra-index-url https://pip.repos.neuron.amazonaws.com
pip install --upgrade mxnet-neuron neuron-cc

How do I upgrade to latest Neuron SDK version if I am using versions before 1.14.0 ?

If you are using Neuron SDK versions before 1.14.0 and want to upgrade to latest Neuron SDK version you should use pip upgrade commands described above instead of conda update commands.

How do I know what Neuron SDK version included in what DLAMI version ?

See “Deep Learning AMI (DLAMI) and Neuron SDK versions Matrix” in Neuron documentation.

Do the pip upgrade commands upgrade all Neuron packages ?

The pip upgrade commands applies to Neuron framework (in addition to the Neuron compiler). To upgrade Neuron runtime and tools, see Neuron SDK documentation.

What happens if I try to do conda update <framework>?

Attempting to do conda update <framework> in newer versions of DLAMI would result in “PackageNotInstalledError: Package is not installed in prefix.” error:

(aws_neuron_tensorflow_36) ubuntu@ip-xxx-xx-xx-xx:~$ conda update tensorflow-neuron
PackageNotInstalledError: Package is not installed in prefix.
prefix: /home/ubuntu/anaconda3/envs/aws_neuron_tensorflow
package name: tensorflow-neuron

Next steps

Starting with Neuron SDK 1.14.0, Neuron conda packages used to install Neuron SDK framework in DLAMI will no longer be supported. Instead, pip packages will be used to install Neuron SDK in DLAMI. Moving to pip packages will solve installation and upgrade issues reported by users and will be consistent with how other packages are installed in DLAMI.
To upgrade Neuron SDK framework, DLAMI users should use pip upgrade commands instead of conda update commands as explained above. If you have any questions or concerns about this change or if you are facing issues please open
Github issue, or post a question in Neuron AWS forums.