user135237
user135237

Reputation: 389

How do I attach a GPU to a Google Cloud build?

I am trying to run a CI/CD on my codebase, but in order to run my tests, I need a GPU-enabled VM (to produce deep learning results).

However, the only configurable machine option I see is the machine type (number of cores and memory). I don't see an option for adding an accelerator type (GPU).

Is there a way to attach a GPU to the build VM, and if not, is there another method for triggering a test on another GPU enabled VM?

Thanks!

Upvotes: 3

Views: 1522

Answers (1)

LundinCast
LundinCast

Reputation: 9810

Google Cloud Build doesn't provide machine types equipped with GPUs at the moment. One option though is to use the remote-builder cloud builder. It allows you to run your builds on a Compute Engine instances running in your project. You can use the INSTANCE_ARGS option to customize the instance to fit your specific needs, adding one or more GPUs in this case. You can have a look here for some example configs. You can use any flag available with the gcloud compute instances create command, including the --accelerator flag for GPUs.

Upvotes: 6

Related Questions