sudo pip3 install jupyter
# generate config file
jupyter notebook --generate-config
#generate hashcode
python3
===
from notebook.auth import passwd
passwd()
(password)
(password)
...
sha1:63d137bxxxxxxxxxxxxxxxxxxxxxxxxxx
exit()
=====
vim ~/.jupyter/jupyter_notebook_config.py
====
c.NotebookApp.ip='*'
c.NotebookApp.password = u'sha:ce...刚才复制的那个密文'
c.NotebookApp.open_browser = False
c.NotebookApp.port =8888 #随便指定一个端口
====
# firewall
firewall-cmd --zone=public --add-port=8888/tcp --permanent
systemctl restart firewalld.service
#or use ssh tunnel
ssh username@address_of_remote -L127.0.0.1:1234:127.0.0.1:8888
#centos restart autostart by screen
vim /etc/crontab
===
@reboot username screen -dmS jupyter jupyter notebook
===
screen -r jupyter
#===Int Screen: Jupyter====
#can see information
#========
## if open multijuyter must type following command first
unset XDG_RUNTIME_DIR
ref:
http://blog.leanote.com/post/jevonswang/%E8%BF%9C%E7%A8%8B%E8%AE%BF%E9%97%AEjupyter-notebook
http://jupyter.org/install.html
沒有留言:
張貼留言