#!/bin/bash
jupyter notebook --generate-config
PORT=8181
passwd=`python -c "from notebook.auth import passwd; print(passwd(''))"`
echo "c.NotebookApp.ip='*'" >> ~/.jupyter/jupyter_notebook_config.py
echo "c.NotebookApp.password=u'"${passwd}"'" >> ~/.jupyter/jupyter_notebook_config.py
echo "c.NotebookApp.open_browser = False" >> ~/.jupyter/jupyter_notebook_config.py
echo "c.NotebookApp.port="${PORT} >> ~/.jupyter/jupyter_notebook_config.py
ip=`ifconfig | grep 'inet addr' | cut -f2 -d: | cut -d " " -f1`
for e in $ip;do
echo "http://"${e}":"$PORT
done
echo "Done. Start jupyter and use it remotely."
远程使用jupyter
最新推荐文章于 2024-05-29 17:53:38 发布
本文介绍了一种通过脚本配置Jupyter Notebook以实现远程访问的方法。该方法包括生成配置文件、设置密码、指定监听端口及IP地址等步骤,使得用户能够从远程设备访问运行在本地服务器上的Jupyter Notebook实例。
摘要由CSDN通过智能技术生成