在 Amazon ECS 任務定義中指定深度學習 - Amazon Elastic Container Service

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

在 Amazon ECS 任務定義中指定深度學習

若要在 Amazon ECS 上執行 Habana Gaudi 加速深度學習容器,您的任務定義必須包含預先建置容器的容器定義,該容器使用 AWS 深度學習容器提供的 Habana SynapseAI 為 TensorFlow 或 PyTorch 提供深度學習模型。

以下容器映像擁有 TensorFlow 2.7.0 和 Ubuntu 20.04。在 GitHub 上維護為 Habana Gaudi 加速器最佳化的預先建置的 Deep Learning Containers 完整清單。如需詳細資訊,請參閱 Habana Training Containers (Habana 訓練容器)。

763104351884.dkr.ecr.us-east-1.amazonaws.com/tensorflow-training-habana:2.7.0-hpu-py38-synapseai1.2.0-ubuntu20.04

以下是 Amazon EC2 上的 Linux 容器任務定義範例,顯示了要使用的語法。此範例使用包含 Habana 實驗室系統管理介面工具 (HL-SMI) 的映像,請參閱:vault.habana.ai/gaudi-docker/1.1.0/ubuntu20.04/habanalabs/tensorflow-installer-tf-cpu-2.6.0:1.1.0-614

{ "family": "dl-test", "requiresCompatibilities": ["EC2"], "placementConstraints": [ { "type": "memberOf", "expression": "attribute:ecs.os-type == linux" }, { "type": "memberOf", "expression": "attribute:ecs.instance-type == dl1.24xlarge" } ], "networkMode": "host", "cpu": "10240", "memory": "1024", "containerDefinitions": [ { "entryPoint": [ "sh", "-c" ], "command": ["hl-smi"], "cpu": 8192, "environment": [ { "name": "HABANA_VISIBLE_DEVICES", "value": "all" } ], "image": "vault.habana.ai/gaudi-docker/1.1.0/ubuntu20.04/habanalabs/tensorflow-installer-tf-cpu-2.6.0:1.1.0-614", "essential": true, "name": "tensorflow-installer-tf-hpu" } ] }