Linux部署Jupyter

安装Jupyter和IPython

pip install ipython
pip install jupyter

IPthon生成密码

ipython

1
2
from jupyter_server.auth import passwd
passwd()

配置Jupyter

jupyter notebook --generate-config
vim jupyter_notebook_config.py

1
2
3
4
c.ServerApp.notebook_dir = '/home/user'
c.ServerApp.open_browser = False
c.ServerApp.password = u'ipython generate password'
c.ServerApp.port = 8887

运行Jupyter

nohup jupyter notebook 1>jupyter.log 2>&1 &

本地映射端口

ssh -N -f -L 8887:localhost:8887 user@serverIP

Author: Giftbear
Link: https://giftbear.github.io/2024/04/11/Linux部署Jupyter/
Copyright Notice: All articles in this blog are licensed under CC BY-NC-SA 4.0 unless stating additionally.