Everything in this page (the steps) should go after your VM set up:


Step 1: Connect to VM

# On your local terminal, we need to log in to the gcloud 
export PATH=$PATH:YOUR_OWN_PATH_TO/google-cloud-sdk/bin (change to your directly)
gcloud auth login 

# You can do: 
gcloud config set project project_ID
gcloud compute instances start VM_instance_name

# Or, you can directly run this one below
gcloud compute ssh --zone "zone" "vm_name" --project "project_id" --ssh-flag="-L 6007:localhost:6007"

There will be some places where you need to set & enter passcode for the process. Just enter something simple that you can remember;

Step 2: Get files up to the VM

# You need to first cd to the correct directory before the following step. 

# Then: (on your local terminal)

# zip the file first 
zip -r student.zip student/

gcloud compute scp student.zip vm_name:~/ --zone "zone of your choice" --project "project id"

After step 2, you will need to use the last command from Step 1 to log back into your vm terminal and follow the “How to Train the NMT System on the Cloud VM” section in the Assignment 3 pdf.


Potential bugs:

  1. Error: nvidia-smi command not found - no gpu drivers
    1. Solution: https://www.murhabazi.com/install-nvidia-driver
    2. If you still get error because of the version, copy the error and ask Claude — it will direct you to the solution step by step (great quality answer!)