标签:import lse port tty pip get pen imp roo
进入docker交互式环境:docker exec -it ***** bash
安装jupyter:
apt-get install python-dev
pip install jupyter [若pip没安装好,需要安装sudo apt install python3-pip]
配置文件:
生成jupyter配置文件:jupyter notebook --generate-config
使用ipython生成密码
In [1]: from notebook.auth import passwd
In [2]: passwd()
Enter password:
Verify password:
Out[2]: ‘sha1:******‘
c.NotebookApp.ip=‘*‘ #绑定所有地址,即所有IP 地址都可以访问
c.NotebookApp.password = u‘
‘sha1:******
c.NotebookApp.open_browser = False #启动后是否在浏览器中自动打开
c.NotebookApp.port =8100 #指定一个访问端口8100,默认8888
c.NotebookApp.allow_remote = True #将远程访问设置成True
启动:
jupyter notebook --allow-root
远程访问:
找到inet后的IP地址即为docker地址。如:inet 153.16.0.1
标签:import lse port tty pip get pen imp roo
原文地址:https://www.cnblogs.com/Lee-yl/p/12163947.html