How does colab mount google cloud disk

The steps to mount Google cloud disk in colab are as follows:

  1. Create a new notebook in colab.

  2. Enter the following code in the code cell and when run you will be prompted to authorize with a link:

from google.colab import drive
drive.mount('/content/drive')
  1. Click the link to jump to the authorization page, log in to the Google account, obtain the authorization code, and then copy the authorization code.

  2. Paste the authorization code into the colab notebook, and press Enter to authorize.

  3. After the authorization is successful, you can mount the Google cloud disk through the following code:

!mkdir -p /content/drive
!google-drive-ocamlfuse /content/drive
  1. After the mount is successful, you can browse and edit the files in the Google cloud disk through folders.

Guess you like

Origin blog.csdn.net/weixin_43031220/article/details/130608321