title: How to use Google Compute Python API to create custom machine type or instance with GPU?
body: <p>I am just looking into using <code>GCP</code> for cloud computing stuff. So far I have been using <code>AWS</code> and the <code>boto3</code> library and was trying to use the google python client API for launching instances.</p>
  
  <p>So an example I came across was from their docs <a href="https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/compute/api/create_instance.py" rel="nofollow noreferrer">here</a>. The instance machine type is specified as:</p>
  
  <pre><code>machine_type = "zones/%s/machineTypes/n1-standard-1" % zone
  </code></pre>
  
  <p>and then it passed to the configuration as:</p>
  
  <pre><code>config = {
          'name': name,
          'machineType': machine_type,
  ....
  </code></pre>
  
  <p>I wonder how does one go about specifying machines with GPU and custom RAM and processors etc. from the python API?</p>