赞
踩
jupyter notebook --generate-config -y # jupyter lab --generate-config cd ~/.jupyter # 需要手动生成文件 openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout mykey.key -out mycert.pem # set password # 以9999为例,端口可能需要多尝试几个,在下面这里修改。修改完要重新跑下面的端口设置脚本。 NOTEBOOK_PORT=9999 # 在'lala300'这里输入你自己想设置的密码。 PASSWD=`python3 -c "from notebook.auth import passwd; print(passwd('xxxxx'))"` echo "c.NotebookApp.password = '$PASSWD'" >> jupyter_notebook_config.py echo "c.NotebookApp.ip = '*'" >> jupyter_notebook_config.py # 修改完端口请重新跑这句脚本。 echo "c.NotebookApp.port = $NOTEBOOK_PORT" >> jupyter_notebook_config.py echo "c.NotebookApp.certfile = '$PWD/mycert.pem'" >> jupyter_notebook_config.py echo "c.NotebookApp.keyfile = '$PWD/mykey.key'" >> jupyter_notebook_config.py echo "c.NotebookApp.open_browser = False" >> jupyter_notebook_config.py # 最后后台起一个jupyter服务,然后便可通过web端访问到 # 建议:先cd到自己的目录下再起 nohup jupyter notebook --port=9999 > notebook.py3.log & # 访问jupyter https://111.11.111.11:9999/tree#notebooks
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。