Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Colab: Google drive file stream access permission is a hassle. Is there a better way?

I use Google Colab extensively. In order to get an easy access to files in my Google drive, I mount the drive to the file system of the virtual machine that runs Colab. Like that:

from google.colab import drive as cdrive
cdrive.mount('/content/gdrive')
% cd /content/gdrive/'My Drive'/'Colab Notebooks'/my_directory

Colab sessin. Each time

In the beginning of each session, I need to give a permission to access my drive. In order to do that, I need to press 'Allow', copy a one-time-password and paste it to a dedicated text area. It's a bit tedious.

Is there a better way? can I give a permanent permission based on my machine? any other ideas?

like image 364
Ori Mosenzon Avatar asked Jan 30 '20 13:01

Ori Mosenzon


People also ask

What are the limitations of Google Colab?

Colab Pro limits RAM to 32 GB while Pro+ limits RAM to 52 GB. Colab Pro and Pro+ limit sessions to 24 hours. Colab Pro does not provide background execution, while Pro+ does. Colab Pro and Pro+ do not offer a full version of JupyterLab.

Does Internet speed affect Google Colab?

I think yes, Google Colab's speed is affected by our Internet connection.


1 Answers

At this moment, we can access google drive with the Mount Drive button on the left menu bar.

enter image description here

Confirm the access Google Drive action.

enter image description here

Then it will be mounted to your Colab notebook.

enter image description here

like image 167
huy Avatar answered Oct 13 '22 21:10

huy