Skip to content

Set up SVF Teaching using Google Computer Platform (GCP)

Xiao edited this page Aug 17, 2023 · 2 revisions

Problem: debugging with the M1 chip does not work

  • The solution is to use Google Computer Platform (GCP)
    • Students can freely register and gain $300 credit for the first time.
    • Follow the instructions below to debug your assignments.

Deploy GCP

1.Register in GCP and open the GCP console

2.Create a new instance

3.Config Server

  • Choose a Sydney server location
  • Choose the E2 CPU series
  • Choose memory capacity under machine type (the more memory you deploy, the more money you will pay from your trial amount)

  • Choose Ubuntu 20.04 LTS and at least 10GB disk volume

4.Config in browser

  • Select open in browser window and remember the external IP which will be used in step 6

5.Set the remote login permission

  • Login to root sudo -i

  • Change passwd and input twice passwd

  • Config remote login

    sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/g' /etc/ssh/sshd_config

    sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config


6.Open the local VSCode

  • Install Remote - SSH & Remote - SSH:editing

  • Select remote-ssh you have installed and config it with your external IP in GCP

  • Double click the folder icon and enter the password you have set

Now you should be all set with the GCP virtual machine, then you can follow the Configure IDE in the same way to debug.