LoginSignup
4
6

More than 5 years have passed since last update.

AWSでjupyter

Last updated at Posted at 2017-05-28

これなーに

GPUが無いローカル環境でディープラーニングをやろうとすると、遅くてストレスマッハ。
一方GPUを簡単に使えるAWSでやろうとすると、IDEの無い状態(vimやemacs)でコードを書かないといけなくて辛い。
なので、AWS上でjupyterを使って多少楽にかけるようにしてみる。

jupyterのよさ

tabで補完できる。以上!
まぁseabornとかでグラフィカルに見えるとか、pandasで表がいい感じに見えるとかそういうのもある。他人に喋るとき楽。とか

やってみる

# jupyterインストール
pip install jupyter

# jupyterの設定ファイル等の生成
jupyter notebook --generate-config
  # rootユーザーでやると、それやめたほうがいいよって出る。別にいいやって場合は--allow-rootを追加でつける。

# ローカルからの接続設定
vi ~/.jupyter/jupyter_notebook_config.py

# 以下を追加
c.NotebookApp.ip ='*' # 接続元のIP制御
c.NotebookApp.port = 8888 # 接続元のポート制御

jupyter notebook --allow-root

あとは、AWSのセキュリティグループで接続元のグローバルIPとポート:8888を許可してあげれば、OK。

これでjypyter上でcaffeやkerasなどなどを好きに使って、GPU有りな形でコーディングできる。

4
6
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
4
6