This document is relevant for: Inf1
Neuron Runtime Dockerfile#
1# Example neuron-rtd dockerfile.
2
3# To build:
4# docker build . -f Dockerfile.neuron-rtd -t neuron-rtd
5
6# Note: the container must start with CAP_IPC_LOCK capability
7
8# To run on EC2 Inf1 instances with AWS DLAMI:
9# sudo service neuron-rtd stop
10# docker run --env AWS_NEURON_VISIBLE_DEVICES="0" --cap-add IPC_LOCK -v /tmp/neuron_rtd_sock/:/sock neuron-rtd
11
12
13FROM amazonlinux:2
14
15RUN echo $'[neuron] \n\
16name=Neuron YUM Repository \n\
17baseurl=https://yum.repos.neuron.amazonaws.com \n\
18enabled=1' > /etc/yum.repos.d/neuron.repo
19
20RUN rpm --import https://yum.repos.neuron.amazonaws.com/GPG-PUB-KEY-AMAZON-AWS-NEURON.PUB
21
22RUN yum install -y aws-neuron-tools
23RUN yum install -y aws-neuron-runtime
24RUN yum install -y tar gzip
25
26ENV PATH="/opt/aws/neuron/bin:${PATH}"
27
28CMD neuron-rtd -g unix:/sock/neuron.sock --log-console
This document is relevant for: Inf1