测试 GPU 功能 - Amazon Batch
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅 中国的 Amazon Web Services 服务入门 (PDF)

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

测试 GPU 功能

在以下示例中,作业定义测试使用 GPU 工作负载 AMI中所述的 GPU 工作负载 AMI 是否正确配置。此示例作业定义运行中的 TensorFlow 深层 MNIST 分类器示例。 GitHub

{ "containerProperties": { "image": "tensorflow/tensorflow:1.8.0-devel-gpu", "resourceRequirements": [ { "type": "MEMORY", "value": "32000" }, { "type": "VCPU", "value": "8" } ], "command": [ "sh", "-c", "cd /tensorflow/tensorflow/examples/tutorials/mnist; python mnist_deep.py" ] }, "type": "container", "jobDefinitionName": "tensorflow_mnist_deep" }

您可以使用前面的 JSON 文本创建名为的文件,tensorflow_mnist_deep.json然后使用以下命令注册 Amazon Batch 作业定义:

aws batch register-job-definition --cli-input-json file://tensorflow_mnist_deep.json