DELAEMON BLOG

Live as if you were to die tomorrow. Learn as if you were to live forever.

Jupypter Server for iPad Pro

iPad Proを購入したものの、やっぱり軽くでもいいからコード書いて、あわよくば実行できる環境が欲しい。
そこでJupter Serverを既存レンタルサーバーへインストールした。

インストール

$ pip install jupyter

パスワード生成

$ python -c "import IPython;print(IPython.lib.passwd())"
Enter password:
Verify password:
sha1:xxxxxxxxxxxxxxxxxxxxxxxxxx

**コンフィグ生成
>|sh|
$ jupyter notebook --generate-config
$ ls ~/.jupyter/jupyter_notebook_config.py

コンフィグ編集箇所

c.NotebookApp.ip = '<server ip address>'
c.NotebookApp.notebook_dir = u'/var/jupyter'
c.NotebookApp.open_browser = False
c.NotebookApp.password = u'sha1:xxxxxxxxxxxxxxxxxxxxxxxxxx'
c.NotebookApp.port = 5656

Jupyter server起動

$ jupyter notebook

※rootで動かしちゃう場合は --allow-root オプションが必要

常時使うわけじゃないので、必要な時だけ立ち上げてます。