0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

アリババクラウド SimpleApplicationServer で Jupyter Notebook を試す

Last updated at Posted at 2021-10-01

Ubuntuの更新

$ sudo apt update
$ sudo apt upgrade

もし下記のような更新が出たら、
そのままEnterキーを押してください。
スクリーンショット 2021-10-01 21.34.03.png

Python環境インストール

$ sudo apt install python3-pip python3-dev
$ sudo -H pip3 install --upgrade pip

バージョン確認

$ pip --version

仮想化環境インストール

$ sudo -H pip3 install virtualenv

Jupyter Notebookインストール

$ mkdir jupyternotebook
$ cd jupyternotebook
$ virtualenv jupyternotebook
$ source jupyternotebook/bin/activate
$ pip install jupyter

Jupyter Notebook設定

$ jupyter notebook --generate-config
$ jupyter-notebook password
$ cat /home/admin/.jupyter/jupyter_notebook_config.json

これで下記のようにハッシュ化されたパスワード(*****部分)をコピーします。

{
  "NotebookApp": {
    "password": "*****"
  }
}

configファイルを修正

$ vim /home/admin/.jupyter/jupyter_notebook_config.py
 
shift + g + ↓ で最終行に移動、下記を追加する:
c.IPKernelApp.pylab = 'inline'
c.NotebookApp.ip = '0.0.0.0'
c.NotebookApp.open_browser = False
c.NotebookApp.port = 9999
c.NotebookApp.password = '*****部分'

ネットワーク規則追加

スクリーンショット 2021-10-01 23.25.58.png

使ってみる!

$ jupyter notebook

ブラウザからアクセス
{Public IP}:9999

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?