Google Colab: Difference between revisions
Created page with "[https://colab.research.google.com/ Google Colab] is a free online Jupyter notebook you can access for small ML training exercises. It supports Python and R. ==Google Driv..." |
|||
| (6 intermediate revisions by the same user not shown) | |||
| Line 7: | Line 7: | ||
However, files are cached locally on the VM which only has ~100GB. | However, files are cached locally on the VM which only has ~100GB. | ||
This means you cannot directly write (e.g. via curl) files over 100GB to your Google Drive folder. | This means you cannot directly write (e.g. via curl) files over 100GB to your Google Drive folder. | ||
There are some tricks you can try though: | |||
{{ hidden | curl | | |||
* Run <code>curl -r 0-4999999999 [url] -o part1</code> to download ~50GB your Google Drive | |||
* Wait ~10 minutes for the cache to clear and files to copy over | |||
* Do <code>curl -r 5000000000-9999999999 [url] -o part2</code> | |||
* Repeat until you have the whole >50GB file | |||
* . | |||
}} | |||
===Limitations=== | |||
* You can't create non-empty files in a folder that is shared with you. | |||
* Colab struggles copying large files and handing folders with lots of file in Google Drive. | |||
===Workarounds=== | |||
* Use [[Rclone]] or [https://pypi.org/project/PyDrive/ PyDrive] | |||
==R Runtime== | |||
[https://stackoverflow.com/questions/54595285/how-to-use-r-with-google-colaboratory how to use r with google colab]<br> | |||
There are two ways to do this: | |||
* Use <code>%load_ext rpy2.ipython</code> to enable R and add <code>%%R</code> to each R cell. | |||
* Use [https://colab.to/r colab.to/r] | |||
==Colab Pro== | ==Colab Pro== | ||