How to increase Google Colab storage

末鹿安然 提交于 2020-01-12 16:51:14

问题


I am working on a Dataset of 70gb

Earlier using df -BG command

I was being shown

Filesystem     1G-blocks  Used Available Use% Mounted on

overlay             359G    6G      335G   2% /

tmpfs                 7G    0G        7G   0% /dev

tmpfs                 7G    0G        7G   0% /sys/fs/cgroup

/dev/root             2G    1G        1G  44% /opt/bin

tmpfs                 7G    1G        7G   4% /usr/lib64-nvidia

/dev/sda1           365G    8G      358G   3% /etc/hosts

shm                   1G    0G        1G   0% /dev/shm

tmpfs                 7G    0G        7G   0% /sys/firmware

Suddenly Now it has changed to

Filesystem     1G-blocks  Used Available Use% Mounted on

overlay              40G    5G       33G  14% /

tmpfs                 7G    0G        7G   0% /dev

tmpfs                 7G    0G        7G   0% /sys/fs/cgroup

/dev/sda1            46G   40G        6G  88% /etc/hosts

shm                   1G    0G        1G   0% /dev/shm

tmpfs                 7G    0G        7G   0% /sys/firmware

Can someone suggest any possible way to make a new Notebook with more than 300Gbs Available or any possible way to go back to previous state.


回答1:


I had the same problem. I am not sure this is a solution since I haven't tested it thoroughly, but it seems like the [Python 2 / No GPU] and [Python 3 / No GPU] runtimes have only 40GB of storage, whereas the [Python 3 / GPU] runtime has 359GB of storage.

Try changing your notebook runtime type to [Python 3 / GPU] by going to "Runtime" > "Change runtime type". Hope it helps!




回答2:


If you pay for extra storage in google drive, you can mount drive into /content/drive/ folder

as Follows

from google.colab import drive
drive.mount('/content/drive')
> Then it will ask you for auth code

You can even use it for unziping datasets (My scenario was that I had enough space on Colab to download 18G of Coco Dataset but not enough space to unzip it)

!unzip /content/train2017.zip -d /content/drive/My\ Drive/COCO/train_2017


来源:https://stackoverflow.com/questions/50260565/how-to-increase-google-colab-storage

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!