Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

create custom N1 instance with T4 GPU through Google Batch

Hi,
I wanted to create a custom N1 instance with T4 GPU (custom-32-225280-ext (4 NVIDIA T4)).
I could do that through the web console by 'create an instance' and also with the gcloud compute command below:
gcloud compute instances create custom-machine-with-gpu \
--machine-type=custom-4-43008-ext \
--accelerator=count=1,type=nvidia-tesla-t4 \

However, I wan't able to create the jobs through Google Batch

gcloud batch jobs submit job-custom-machine-with-gpu --location us-central1 --config - <<EOD
{"taskGroups":[{"taskCount":"1","parallelism":"1","taskSpec":{"computeResource":{"cpuMilli":"1000","memoryMib":"512"},"runnables":[{"script":{"text":"echo \"Hello\""}}],"volumes":[]}}],"allocationPolicy":{"instances":[{"policy":{,"accelerators":{"count":1,"type":"nvidia-tesla-t4"},"machineType":"custom-4-43008-ext"}}]}}
EOD
ERROR: (gcloud.batch.jobs.submit) INVALID_ARGUMENT: Accelerator field is invalid. Accelerator with machine type custom-4-43008-ext is not supported. Please make sure that the configuration meets this requirement: https://cloud.google.com/compute/docs/gpus.
 
It seems like Google Batch doesn't support custom N1 machine with GPU?
Wonder if there's a way around it?
1 2 431
2 REPLIES 2

Thanks for reporting the issue. Apparently, this is a limitation in Batch and we'll work on a fix.

It should now be possible to use machines with extended memory when creating Batch jobs with gcloud. Feel free to give it a try!