LoginSignup
7
3

More than 5 years have passed since last update.

ECSでGPUを扱うためのAMI作成 by Amazon Linux Deep Learning AMI

Posted at

結論

ここ見れば一発だった
http://docs.aws.amazon.com/ja_jp/batch/latest/userguide/batch-gpu-ami.html

概要

scriptとかは変更があるかもしれないので転記しません。上記URLを参照してください。
以下の項番は上記URLの番号と合わせています。

  1. Amazon Linux Deep Learning AMIを起動する
    1. 強いて言うならp2で立ち上げた方が楽しい
    2. でも高いからSpotInstanceを使おう。マーケットプレイスの画面から進むとSpotInstanceが選択出来た
  2. SSHで接続する
  3. URL内のconfigure-gpu.shを作成する
  4. configure-gpu.shを実行する(結構待つ)
  5. Dockerコンテナを実行して、インストールされているドライバにアクセスできることを確認する(以下のような結果が出力されること)
  6. ゴミ掃除をする
No.5の実行結果
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 367.57                 Driver Version: 367.57                    |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  Tesla K80           On   | 0000:00:1E.0     Off |                    0 |
| N/A   47C    P8    26W / 149W |      0MiB / 11439MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+


+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID  Type  Process name                               Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+

あとの作業

これをECSのAMIとして使って、ECSの特権フラグをOnにする

7
3
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
7
3