LoginSignup
7
0

More than 1 year has passed since last update.

AWSで手っ取り早くJupter notebookを動かした話

Last updated at Posted at 2021-12-01

AWSで手っ取り早くJupyter notebookを起動させてみます
認証等を考えると色々振り回されるのですが、動かすだけなら割と簡単でした
認証周りは検証が不十分なので、とりあえず動かすことに主に紹介します

環境

AWS環境

  • Deep Learning AMI (Ubuntu 18.04) Version 35.0
  • g4dn.xlarge

Jupyter notebookの設定

今回の環境ではJupyter notebookはインストール済みなので、とりあえず設定を変えてみます
Port 8081からアクセスできるようにします

vi ~/.jupyter/jupyter_notebook_config.py

c = get_config()
c.NotebookApp.ip = '0.0.0.0'
c.NotebookApp.open_browser = False
c.NotebookApp.port = 8081
c.NotebookApp.token = ''

Jupyter notebook起動

バックグラウンドで起動します

jupyter notebook &

AWSのセキュリティ許可

AWSのインバウンドルールで忘れずに8081を許可します

(「ソース」は0.0.0.0/0ではなく正しい値を設定した方がセキュアです)

インバウンド.png

機会があれば、Jupyter notebookをよりセキュアにする話でも書いてみようと思います。

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