0
0

More than 1 year has passed since last update.

AWSを使う

Last updated at Posted at 2022-04-19

参考

putty-gen

ppk->pemの相互変換。
 → Putty-genで可能(一度ロードしてから保存)
   またはConvertボタン
https://qiita.com/naka46/items/3297242f3386b5f9e3dc

ssh接続の仕方

AWS、インスタンス、接続ボタンを押すと、次の画面下に接続用コマンドが表示される。

image.png

[インスタンスに接続]ダイアログの右下の接続ボタンでWEB経由でコンソールにログインできる。

sshトンネル/ssh転送設定

ssh {ssh接続用ユーザ}@{踏み台サーバのホスト} -i {秘密鍵のパス} -L {待ち受けするポート}:{転送先のホスト}:{転送先ホストのポート}

sshトンネル/ssh転送設定 -> teraterm

port 9999 とする。
image.png

トラブルシューティング

windowsの場合、コマンドプロンプトのsshから接続する(pemに変換する)

AWSの無料インスタンスは遅すぎて学習効率悪いので有料インスタンスを使った方がよい。

jupyter

version : jupyter-notebook --version


import torch
torch.cuda.is_available()

device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
print("使用デバイス", device)


GPUでディープラーニングやるならAWSよりFloydHub

AWS GPUインスタンスのスペック・価格比較

#コマンドラインからpytorchでgpuが使えるかどうか確認する
https://qiita.com/seigot/items/4fa4737d6ae439cbd1c4

python -c "import torch; print(torch.cuda.is_available())"

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