Reference: Test GPU functionality - Amazon Batch
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Reference: Test GPU functionality

The following example job definition tests if the GPU workload AMI described in Use a GPU workload AMI is configured properly. This example job definition runs the TensorFlow deep MNIST classifier example from 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" }

You can create a file with the preceding JSON text called tensorflow_mnist_deep.json and then register an Amazon Batch job definition with the following command:

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