Copying files from host raspberry pi to GCP (Google Cloud Platform) VM instance

Viewed 221

My goal is to perform object detection on my raspberry pi 4B using TensorFlow, though I run out of memory when I try to train the CNN on the pi directly. So I created a VM instance using GCP in the hope of performing training using GCP and then simply copying the frozen inference graph back to my raspberry pi after training is complete. (If there is an easier way to go about this, please let me know. I am new to both object detection and GCP)

I am currently trying to copy files from my host raspberry pi to the GCP VM instance using the following command, where IP_Address is the address of my pi:

gcloud compute scp --recurse pi@<IP_Address>:~/Desktop/tensorflow1/models/research/object_detection instance-1:~/tensorflow/models/research

But I get the following error:

ERROR: (gcloud.compute.scp) All sources must be local files when destination is remote.

I have tried several different variations of the above command, but I am unable to copy files from my local raspberry pi to the VM instance. Does anyone know how to accomplish this? The VM is Ubuntu 18.04 and my pi is running the latest version of Raspian. Thanks so much!

1 Answers

As it was suggested by @John Hanley, you are trying to copy files from one remote system to another remote system. The source must be the system running the gcloud command. Copy the files from the PI to your desktop and then copy to the VM in two steps.

As it was suggested by @Jackie Staiger, in case of Windows OS you can use WinSCP to copy files from Pi to Windows PC. After that, follow this guide o transfer the files from Windows PC to GCP VM.

Related