Google Helper快速入門——自己總結

1、先打開Google Helper;
2、加載到谷歌雲盤,
from google.colab import drive
drive.mount('/content/drive')
3、更改運行目錄
import os
os.chdir("/content/drive/My Drive/Colab Notebooks/")
4、在修改筆記本環境-筆記本設置-GPU;
5、查看分配到的GPU信息:
!/opt/bin/nvidia-smi
6、安裝必要的插件
!apt-get install -y -qq software-properties-common python-software-properties module-init-tools !add-apt-repository -y ppa:alessandro-strada/ppa 2>&1 > /dev/null !apt-get update -qq 2>&1 > /dev/null !apt-get -y install -qq google-drive-ocamlfuse fuse from google.colab import auth auth.authenticate_user() from oauth2client.client import GoogleCredentials creds = GoogleCredentials.get_application_default() import getpass !google-drive-ocamlfuse -headless -id={creds.client_id} -secret={creds.client_secret} &1 | grep URL vcode = getpass.getpass() !echo {vcode} | google-drive-ocamlfuse -headless -id={creds.client_id} -secret={creds.client_secret}
7、上傳自己編輯好的.py文件,運行。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章