解决服务器运行Jupyter Notebook方法

今天教大家服务器运行jupyter notebook

第一,给我买一台服务器

要知道公网ip

虚拟环境
mkvirtualenv -p /usr/bin/python3.6 deeplearn
workon deeplearn
pip install tensorflow
pip install jupyter

然后

vim ~/.jupyter/jupyter_notebook_config.py

2FA3C062-4C23-464A-6B13-07BAF6ADE4BA.png

c.NotebookApp.ip = '0.0.0.0'
c.NotebookApp.open_browser = False
c.NotebookApp.port = 8888
c.NotebookApp.password = 'sha1:6c132ae43f5c:4b4cf1efc42fba2c1480e3283c6bcb9769313bdb'

然后关防火墙

root@VM-0-5-ubuntu:~# firewall-cmd --state
running
root@VM-0-5-ubuntu:~# systemctl stop firewalld.service
root@VM-0-5-ubuntu:~# systemctl disable firewalld.service 
Synchronizing state of firewalld.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install disable firewalld
Removed /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.

打开jupyter notebook

30408948-6E80-C99F-B6A7-5A14C5D648D5.png

打开浏览器,跑起来

B8F83E53-6FEF-0C95-6AFB-3DB44AEBDF75.png

也可以将服务器换成本地的,建立一个隧道

62B6071B-6652-9EC8-9149-5C627E306BED.png

5AC47E08-1119-2360-3E15-C52AC3828644.png

本地打开没问题

949A62B5-3FE5-5004-4C76-94130A24FE78.png

收藏 (0)
评论列表
正在载入评论列表...
我是有底线的
为您推荐
    暂时没有数据