Reputation: 11
I cloned a Github Repository into Colaboratory although it was cloned but i couldn't view it in that particular folder. I changed into "drive" as my working directory but i don't know which directory is that on drive. I moved into drive folder and viewed it's contents, it was present in the drive folder. Please tell me which is the drive folder on Google Drive. Thanks in advance.
Upvotes: 1
Views: 3822
Reputation: 33
Try to change Run type to GPU
and retry the clone.
I met the same problem when using default Jupyter notebook.
Upvotes: 0
Reputation: 41
First, mount Google Drive in Colab as follows:
from google.colab import drive
drive.mount('/content/drive/')
Enter the authorization code to provide access to your Drive.
Next, cd into the folder you want:
%cd '/content/drive/My Drive/[folder name]'
Lastly, git clone the GitHub repository:
!git clone https://github.com/example/example_repo.git
You should now be able to see the repository and its contents in your Drive. Use !pwd
or !ls
to check if you are in the correct directory.
Upvotes: 4
Reputation: 40918
Colab runs on a new machine in the cloud. If you git clone in Colab, it won't appear in Gdrive. You need to mount it as shown here.
How to Upload Many Files to Google Colab?
Upvotes: 0