.. _dlc-then-ecs-devflow: Deploy Neuron Container on Elastic Container Service (ECS) =========================================================== .. contents:: Table of Contents :local: :depth: 2 Description ----------- |image| .. |image| image:: /images/dlc-on-ecs-dev-flow.png :width: 750 :alt: Neuron developer flow for DLC on ECS :align: middle You can use the Neuron version of the `AWS Deep Learning Containers `_ to run inference on Amazon Elastic Container Service (ECS). In this developer flow, you set up an ECS cluster with inf1 instances, create a task description for your inference service and deploy it to your cluster. This developer flow assumes: 1. The model has already been compiled through :ref:`Compilation with Framework API on EC2 instance ` or through :ref:`Compilation with Sagemaker Neo `. 2. You already set up your container to retrieve it from storage. .. _dlc-then-ecs-setenv: Setup Environment ----------------- 1. Set up an Amazon ECS cluster: Follow the instructions on `Setting up Amazon ECS for Deep Learning Containers `_ 2. Define an Inference Task: Use the instruction on the `DLC Inference on ECS Tutorial `_ to define a task and create a service for the appropriate framework. When creating tasks for inf1 instances on ECS, be aware of the considerations and requirements listed in `Working with inference workloads on Amazon ECS `_. 3. Use the container image created using :ref:`how-to-build-neuron-container` as the ``image`` in your task definition. .. _push_to_ecr_note: .. note:: Before deploying your task definition to your ECS cluster, make sure to push the image to ECR. Refer to `Pushing a Docker image `_ for more information.