0
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Google Colaboratory 覚え書き

0
Posted at

この記事は?

Google Colaboratoryを使う上での覚え書きです。

随時、加筆・更新していく予定です

スペックとか

OS: Ubuntu 18.04
2vCPU @ 2.2GHz
13GB RAM
(GPUなし/ TPU)40GB, (GPUあり)360GB Storage
GPU NVIDIA Tesla K80 12GB

1アカウントからは同一のマシンへ接続される。

ランタイムのリセット

  • 新しいインスタンスを起動してから12時間経過
  • ノートブックのセッションが切れてから90分経過

12時間を超える処理を走らせる場合は、スナップショットをとる必要が出てくる

プリインストールされているPythonライブラリ

Package                  Version              
------------------------ ---------------------
(重要そうなヤツ以外は省略)
bs4                      0.0.1                
chainer                  5.4.0                
cupy-cuda100             5.4.0                
Cython                   0.29.10              
Django                   2.2.2                
Flask                    1.0.3                
gensim                   3.6.0                
glob2                    0.6                  
h5py                     2.8.0                
Jinja2                   2.10.1               
joblib                   0.13.2               
kaggle                   1.5.4                
Keras                    2.2.4                
Keras-Applications       1.0.8                
Keras-Preprocessing      1.1.0                
keras-vis                0.4.1                
lxml                     4.2.6                
Markdown                 3.1.1                
matplotlib               3.0.3                
matplotlib-venn          0.11.5               
multiprocess             0.70.7               
multitasking             0.0.9                
nltk                     3.2.5                
np-utils                 0.5.10.0             
numba                    0.40.1               
numexpr                  2.6.9                
numpy                    1.16.4               
pandas                   0.24.2               
pandas-datareader        0.7.0                
pandas-gbq               0.4.1                
pandas-profiling         1.4.1                
pandocfilters            1.4.2                
parso                    0.4.0                
Pillow                   4.3.0                
pip                      19.1.1               
pip-tools                3.6.1                
progressbar2             3.38.0               
pydot                    1.3.0                
pymongo                  3.8.0                
scikit-image             0.15.0               
scikit-learn             0.21.2               
scipy                    1.3.0                
setuptools               41.0.1               
setuptools-git           1.2                  
six                      1.12.0               
sklearn                  0.0                  
sklearn-pandas           1.8.0                
tensor2tensor            1.11.0               
tensorboard              1.13.1               
tensorboardcolab         0.0.22               
tensorflow               1.13.1               
tensorflow-estimator     1.13.0               
tensorflow-hub           0.4.0                
tensorflow-metadata      0.13.0               
tensorflow-probability   0.6.0                
Theano                   1.0.4                
torch                    1.1.0                
urllib3                  1.24.3               
wheel                    0.33.4               

GPU環境に変更

ランタイム→ランタイムのタイプを変更

Google drive のマウント

from google.colab import drive
drive.mount('/content/drive')

これで、/content/drive/My\ Drive/以下にマウントされる

Linuxコマンドの実行

!ls 
%cd

cdは%を頭につける。その他は!を付ける。

Pythonなどの実行可能で、Googleドライブ内に.pyやデータを配置→~python hogehoge.pyとするのが基本。

0
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?