# setup a password for the notebook $ ipython In [1]: from IPython.lib import passwd In [2]: passwd() Enter password: Verify password: Out[2]: 'sha1:747ba2295030:7bbe79e452b9bb3cae6e66ed738563e18a15462c' # self-signed cert $ openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout mycert.pem -out mycert # edit the profile for notebook $ mkdir ~/.config/ipython/profile_serv/ $ vim ~/.config/ipython/profile_serv/ipython_notebook_config.py c = get_config() c.NotebookApp.password = u'sha1:747ba2295030:7bbe79e452b9bb3cae6e66ed738563e18a15462c' c.NotebookApp.ip = '*' c.NotebookApp.open_browser = False c.NotebookApp.port = 10001 c.NotebookApp.certfile = u'/home/xatier/note/mycert.pem' # run it! $ ipython notebook --profile=serv
Reference:
http://ipython.org/ipython-doc/stable/interactive/public_server.html
http://nbviewer.ipython.org/github/Unidata/tds-python-workshop/blob/master/ipython-notebook-server.ipynb
No comments:
Post a Comment