I am starting this tutorial series because I couldn’t find a good step-by-step tutorial on exploring deep-learning from scratch using GCP. I use GCP because my MacBook doesn’t have a GPU and you can easily use a computer instance with a high-end GPU using Google Compute Engine (GCE). GCE is an infrastructure as a service (IaaS) that is part of Google Cloud Platform and lets users launch and use virtual machines on demand. Although none of the services of Google Cloud Platform is free, Google lets you sign up for a free trial that lasts for 12 months (a full year!) and gives you $300 US in credit so you can play around and explore all the services without spending any money. To learn more about Google Compute Engine, you can check their documentation page here. To sign up for the free trial, go to Google Cloud website here and sign in with your
Using the Google Cloud Platform Console:
Go to Google Cloud Platform page and log in, then click “Go To Console” button. Click “create” to create a project or select
- 3 horizontal lines at the top left
cornerof your console and select Billing.
- Click the New billing account button.
- Enter the name of the billing account and enter your billing information. The options you see depend on the country of your billing address. Note that for United States accounts, you cannot change tax status after the account is created.
- Click Submit and enable billing.
By default, the person who creates the billing account is a billing administrator for the account. Create an instance: Click on 3 horizontal lines at the top left corner of your console and scroll down to find Compute engine. You can pin this service so you don’t have to scroll down to find it every time. Hover over “Compute Engine”, and click “VM instances” and create an instance. Here you can select “Machine type” and add cores, memory, and GPUs to your instance. There are four classes of predefined machine types with a fixed collection of resources which are managed by Google Compute Engine.
- Standard machine types: Standard machine types are suitable for tasks that have a balance of CPU and memory needs. They have 3.75 GB of system memory per virtual CPU.
- High-memory machine types: High-memory machine types are ideal for tasks that require more memory relative to virtual CPUs. They have 6.50GB of system memory per virtual CPU.
- High-CPU machine types: High-CPU machine types are ideal for tasks that require more virtual CPUs relative to memory. High-CPU machine types have 0.90 GB of system memory per virtual CPU.
- Shared-core machine types: Shared-core machine types provide one virtual CPU that is allowed to run for a portion of the time on a single hardware hyper-thread on the host CPU running your instance. They can be more cost-effective for running small, non-resource intensive applications than standard, high- memory or high-CPU machine types.
For more information on
- 2.6 GHz Intel Xeon E5 (Sandy Bridge)
- 2.5 GHz Intel Xeon E5 v2 (Ivy Bridge)
- 2.3 GHz Intel Xeon E5 v3 (Haswell)
- 2.2 GHz Intel Xeon E5 v4 (Broadwell)
- 2.0 GHz Intel Xeon (Skylake)
You can attach GPUs only to instances with a predefined machine type or custom machine type that you are able to create in a zone. GPUs are not supported on shared-core machine types. Instances with lower numbers of GPUs are limited to a maximum number of vCPUs. In general, higher numbers of GPU
To the right of your instance specs, you can see the price of the instance that is automatically updated when you change the specifications.
In the Boot Disk section, You can choose operating system images to create boot disks for your instances. Choose Ubuntu 17.
In the Firewall section, select Allow HTTP traffic and click Create to create the instance.
To connect to your instance, click SSH in the row of the instance and now you have a terminal window for interacting with your Linux instance.