Setup Google Cloud GPU Instance

November 1, 2020

Things to know

GPU are only available at specific zones.

GPUs are currently only supported with general-purpose N1 machine types.

Performance comparison of GPUs (T4, P4, V100, P100, K80)

The cheapest GPU available is NVIDIA® Tesla® T4 (16GB GPU memory), which cost $0.35/hour or $178.85/month after 30% sustained use dicount. If you don’t to run it all the time, you will need to pay a higher rate (less sustained use discount).

For further discount, you can opt for preemptible (use the resource when no one else is using) or committed use discounts (pre-pay for resource reservation for 1 or 3 years). Check GPU pricing.

Google GPU is actually Google Compute Engine, which you can’t run an instance with just GPU. You need a CPU, Memory and Disk, and charged for Network Usage as well. The cheapest configuration pricing is as of the following

1 vCPU with 3.75GB memory, attached with 1 NVIDIA Tesla T4 (16 GB memory)

$207.92 per month estimated
Effective hourly rate $0.285 (730 hours per month)

Item                                                  Estimated costs
Google Compute Engine Costs
VM instance: 1 vCPU + 3.75 GB memory (n1-standard-1)  $34.67/month
Standard persistent disk: 100 GB                      $4.80/month
NVIDIA Tesla T4 GPU                                   $255.50/month
Sustained-use discount                              − $87.05/month
Total                                                 $207.92/month

There are 2 ways to start a GPU instance

Create GPU Instance with Deep Learning VM Marketplace

  • Goto https://console.cloud.google.com/marketplace/details/click-to-deploy-images/deeplearning and click Launch
  • Deployment name: test-gpu
  • Zone: us-west1-b (check zones which support GPU)
  • Machine type: 1 vCPU (3.75 GB memory)
  • GPUs
    • Number of GPUs: 1
    • GPU type: NVIDIA Tesla T4
  • Framework: TensorFlow Enterprise 2.3 (CUDA 11)
  • GPU - Check Install NVIDIA GPU driver automatically on first startup?
  • OPTIONAL: Access to the Jupyter Lab - Enable access to JupyterLab via URL instead of SSH. (Beta)
  • Boot Disk
    • Boot disk type: Standard Persistent Disk
    • Boot disk size in GB: 50 GB (Although minumum is 30GB, but you bump into Requested disk size cannot be smaller than the image size (50 GB) error during instance creation).
  • Click Deploy.

You might see You've gone over GPUs (all regions) quota by 1 GPU. Please increase your quota in the quotas page. at the top of the page, where you need to increase your GPU quota from 0 to 1.

Manage GPU Instance

This work is licensed under a
Creative Commons Attribution-NonCommercial 4.0 International License.