#!/usr/bin/env bash set -ex if [[ $AMI_TYPE != "al2inf" && $AMI_TYPE != "al2023neu" ]]; then exit 0 fi # docs about installing neuron docker environment on inferentia instances: # https://awsdocs-neuron.readthedocs-hosted.com/en/latest/neuron-deploy/tutorials/tutorial-docker-env-setup.html # https://awsdocs-neuron.readthedocs-hosted.com/en/latest/neuron-intro/mxnet-setup/mxnet-install.html#install-neuron-mxnet # Copy the neuron repo cat >/tmp/neuron.repo <>/tmp/ecs/ecs.config sudo mv /tmp/ecs/ecs.config /var/lib/ecs/ecs.config # Copy neuron runtime to docker runtime to be accessed as one of the runtimes supported. if [ ! -f $NEURON_RUNTIME ]; then sudo cp /opt/aws/neuron/bin/oci_neuron_hook_wrapper.sh $NEURON_RUNTIME sudo chmod +x $NEURON_RUNTIME fi