The Windows guide to setting up a Google Cloud instance for the fast.ai course

Updated for fast.ai version 2

How Khang
AI Saturdays
3 min readDec 29, 2017

--

This is a quick guide for the Windows users who are attending AI Saturdays and need a cloud instance with GPU to run the fast.ai notebooks.

Step 1: Follow the steps here until you complete Step 6.

Step 2: Download and install the Google Cloud SDK interactive installer for Windows with Python bundled (link edited).

Final screen for installation

Run the interactive installer with all the default options (ensure option to install Python is checked) until installation is complete.

Step 3: Link your Google account to the Cloud SDK

Log in to your Google account and select the project you created in Step 1. Select ‘Y’ to configure Google Compute Engine and check your zone.

Step 4: Click here to download the setup script (link updated)

Updated on 2 Jan 2018

Right-click on the page, “Save as…” and select a folder on your machine. But before you hit Save, add double quotes “ ” around the file name and choose Save as type: All Files.

Edited (1 Jan 2018): I have updated the script based on feedback from the last AI Saturday session. The later version now obtains your Google Cloud SDK default configuration settings, checks for your regional quota limits and includes error handling. I will also be updating the screenshots as a result.

Step 5: Run the setup script using PowerShell

Go to the folder where you downloaded the script. Select the file, right-click and choose “Run with PowerShell”. The PowerShell terminal will launch and create a Google Cloud instance.

Updated 2 Jan 2018

Step 6: Connecting to your Google Cloud instance

There should now be two new files in the folder. Open the file fastai-instance-<#>-commands.txt and copy the command for connecting to your VM instance and paste it into a new PowerShell terminal (to launch, click the Windows Start Menu and type PowerShell).

A PuTTY terminal should launch and connect you to the VM instance.

Step 7: Run the bash script to install all the drivers and libraries

curl https://raw.githubusercontent.com/howkhang/fastai-v2-setup/master/setup.sh | bash

Step 8: Reconnect to your Jupyter notebooks for fast.ai

Reconnect and in the VM terminal, type jupyter notebook and hit Enter.

Copy the IP address, paste it into your browser with an added :8888 behind.

For the token, copy the long string of characters shown after the “=” .

And we are good to go! Happy training!

--

--