Google Colab is a free Jupyter notebook environment that runs in the cloud. You can use Google Colab from your browser so you don’t have to install anything on your own computer. With Google Colab, you can access Google’s computing resources, write and execture code, save and share.
1. Login your Gmail account
2. Go to the url link:
https://colab.research.google.com/
3. Top pane
Share
: On the top right, the Share
button gives you the option of creating a shareable link that you can share with others.+ Code
: Under the top menu, the + Code
will let you add more code cells.+ Text
: will let you add more text cells.Copy to Drive
: allows you to copy this Colab notebook into your Colabe Notebook directory in your Google Drive.Connect
: will let you connet this Colab notebook to the runtime.4. Left pane
Click Files
, and it will expand the left pane.
Then you can browse the directory structure on the left file-exlorer pane.
Upload
in order to upload files to the Colab. Since Colab notebook is hosted on Google’s cloud servers, there’s no direct access to files on your local computer. Or you can click the three dots visible when your mouse hovers above the directory and then you can select the “Upload” option.Download
option.5. Mount your Google Drive to Colab
from google.colab import drive
drive.mount('/content/gdrive')
6. Use the Bash Commands
!
added in front of the command.%
.%
instead of !
for cd (change directory) command7. Use GPUs on Colab
Runtime
-> Change Runtime Type
-> Hardware accelerator
If you use the paid version of the GPUs, click and choose Runtime
-> Change Runtime Type
, then you will choose the following:
Click Save
.