Jupyter Notebook简介
结合轻量云服务器的优点,我们可以实现快速开发、数据分析与效果展示。
https://cloud.tencent.com/product/lighthouse?from=10680
选择镜像,使用TencentOS或者CentOS即可
pip3 install jupyter
jupyter notebook --generate-config
执行后会生成配置文件, ~/.jupyter/jupyter_notebook_config.py
$ jupyter notebook password
Enter password: ****
Verify password: ****
[NotebookPasswordApp] Wrote hashed password to ~/.jupyter/jupyter_notebook_config.json
c.NotebookApp.ip='192.168.0.32'
c.NotebookApp.password = u'sha:ce...刚才复制的那个密文'
c.NotebookApp.open_browser = False#启动服务后不打开浏览器
c.NotebookApp.port =8888 #可自行指定一个端口, 访问时使用该端口
The directory to use for notebooks and kernels.
c.NotebookApp.notebook_dir = 'f:/nlp'##将启动目录设置为f:/nlp
nohup jupyter notebook --allow-root > jupyter.log 2>&1 &
解释:
jupyter.log:表示将标准输出,输出到jupyter.log 文件
2>&1:表示错误输出重定向到标注输出
附linux定义:
/dev/null 表示空设备文件
0 表示stdin标准输入
1 表示stdout标准输出
2 表示stderr标准错误
nohup表示no hang up, 就是不挂起, 于是这个命令执行后即使终端退出, 也不会停止运行.
后台搭建完成后,即可通过公网IP+端口号进行访问了,记得要在防火墙打开端口或者设置白名单!
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。