This document is relevant for: Trn1

Dockerfile for Application Container#

 1# Example pytorch neuron container
 2# To build:
 3#    docker build . -f Dockerfile.pt -t neuron-container:pytorch
 4# To run on EC2 Inf1 instances with AWS DLAMI:
 5#    docker run -it --net=host --device=/dev/neuron0 neuron-container:pytorch
 6
 7FROM 763104351884.dkr.ecr.us-west-2.amazonaws.com/pytorch-training-neuron:1.11.0-neuron-py38-sdk2.3.0-ubuntu20.04
 8RUN pip install torchvision==0.12 --no-deps
 9RUN mkdir -p /opt/ml
10COPY model.py /opt/ml/model.py
11COPY mlp_train.py /opt/ml/mlp_train.py

This document is relevant for: Trn1