Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 16420

Mount Google Drive on Google Colab with write access

$
0
0

How can I mount my Google Drive on Google Colab with write access?

That's because I'm receiving an error when my AI model tries to update a file on Google Drive:

Traceback (most recent call last):  File "/content/Deep3DFaceRecon_pytorch/test.py", line 72, in <module>    opt = TestOptions().parse()  # get test options          ^^^^^^^^^^^^^^^^^^^^^  File "/content/Deep3DFaceRecon_pytorch/options/base_options.py", line 167, in parse    self.print_options(opt)  File "/content/Deep3DFaceRecon_pytorch/options/base_options.py", line 115, in print_options    with open(file_name, 'wt') as opt_file:         ^^^^^^^^^^^^^^^^^^^^^OSError: [Errno 30] Read-only file system: './checkpoints/facerecon_20230425/test_opt.txt'

By the way, I have already copied my folders from Google Drive to Google Colab:

!git clone https://github.com/sicxu/Deep3DFaceRecon_pytorch.git%cd Deep3DFaceRecon_pytorch...!mkdir checkpoints!cp -r ../drive/MyDrive/Deep3D/facerecon_20230425 checkpoints/...

UPDATE

On Google Colab, just trying to create a file inside the mounted Google Drive throws an error:

!touch ./checkpoints/facerecon_20230425/test_opt.txt

Log:

touch: cannot touch './checkpoints/facerecon_20230425/test_opt.txt': Read-only file system

Viewing all articles
Browse latest Browse all 16420

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>