Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
1
Help us understand the problem. What is going on with this article?
@engineer

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

More than 1 year has passed since last update.

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

1
Help us understand the problem. What is going on with this article?
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
engineer

Comments

No comments
Sign up for free and join this conversation.
Sign Up
If you already have a Qiita account Login
1
Help us understand the problem. What is going on with this article?