先安裝
sudo apt install -y ipython ipython-notebook ipython-notebook-common
產生 config file
ipython profile create nbserver
使用ipython產生密碼 hash
In [1]: from notebook.auth import passwd
In [2]: passwd()
Enter password:
Verify password:
Out[2]: 'sha1:67c9e60bb8b6:9ffede0825894254b2e042ea597d771089e11aed'
修改
/home/user/.ipython/profile_nbserver/ipython_notebook_config.py
在檔案最後加上
c = get_config()
c.NotebookApp.ip = ‘*’
c.NotebookApp.open_browser = False
c.NotebookApp.port = 5678
c.NotebookApp.password = u'sha1:67c9e60bb8b6:9ffede0825894254b2e042ea597d771089e11aed'
啟動server
ipython notebook
接下來就可以在遠方使用browser
http://server_ip:5678
登入使用了
沒有留言:
張貼留言