本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。
在以下示例中,作业定义测试使用 GPU 工作负载 AMI中所述的 GPU 工作负载 AMI 是否正确配置。此示例作业定义运行中的 TensorFlow 深层 MNIST 分类器示例
{
"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
然后使用以下命令注册 AWS Batch 作业定义:
aws batch register-job-definition --cli-input-json file://tensorflow_mnist_deep.json