0
1

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 3 years have passed since last update.

GCPのGPU付きのCompute Engine上で、Dockerの中で、Tensorflowを動かす方法。

Posted at

GCPのGPU付きのCompute Engine上で、Dockerの中で、Tensorflowを動かす方法。作業メモ的な感じです。

実現できること

  • GPU + TensorflowでDeep Learning
  • 環境構築がかんたんで、いつでもゼロからやりなおしができる

やり方

Compute EngineでGPUとGPU Driver付きのインスタンスを作る

https://cloud.google.com/compute/docs/gpus/add-gpus?hl=ja
これに従うとできます。

Ubuntu 18.04で試してうまくいきました。

Dockerインストール

Tensorflowが動くdocker imageを動かす

docker run -it --rm tensorflow/tensorflow bash

参考 https://www.tensorflow.org/install/docker#gpu_support

参考資料

GCPでGPU付きのインスタンスを作る方法
https://cloud.google.com/compute/docs/gpus/add-gpus?hl=ja

compute engineのContainer optimizedイメージにnvidea driverを入れる方法。
https://github.com/GoogleCloudPlatform/cos-gpu-installer

dockerでtensorflowを使う方法
ホスト側にgpu driverさえ入っていれば動くらしい。
https://www.tensorflow.org/install/docker#gpu_support

0
1
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
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?