Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

问答区 #5

Open
houko opened this issue Nov 20, 2021 · 7 comments
Open

问答区 #5

houko opened this issue Nov 20, 2021 · 7 comments
Labels
question Further information is requested

Comments

@houko
Copy link
Contributor

houko commented Nov 20, 2021

有什么问题随时留言,然后把链接发在微信群

@houko houko pinned this issue Nov 20, 2021
@bolecodex
Copy link

bolecodex commented Nov 20, 2021

连接公有虚拟机的Jupyter notbook:

ssh -L 8080:127.0.0.1:8080 -i ./key_easyun_dev.pem ec2-user@your_svr_ip_address

看80端口是否打开

netstat -ntlp

Notebook的浏览器链接:

http://127.0.0.1:8080/?token=9647ef878a1f6641454f1bde0603b92c7c8aef2d5cefcff4

在AWS上安装并运行Jupyter Notebook教程:

https://dataschool.com/data-modeling-101/running-jupyter-notebook-on-an-ec2-server/

@Stan-Lyuu Stan-Lyuu unpinned this issue Nov 20, 2021
@Stan-Lyuu Stan-Lyuu pinned this issue Nov 20, 2021
@Stan-Lyuu
Copy link

多人共用测试机的话,Jupyter的token怎么办呢?只有创建的人看得到

1、是否可以一人一个venv各起一个Jupyter,每人一个端口?
2、那同时编辑一个notebook的起冲突的话怎么办?

@KEVIN-LYU-YUNCAI
Copy link

  1. 提示[ec2-user@ip-10-10-1-185 ~]$ channel 3: open failed: connect failed: Connection refused
    channel 4: open failed: connect failed: Connection refused
    http://127.0.0.1:8080/打不开

@aleck31
Copy link
Owner

aleck31 commented Nov 22, 2021

多人共用测试机的话,Jupyter的token怎么办呢?只有创建的人看得到

1、是否可以一人一个venv各起一个Jupyter,每人一个端口? 2、那同时编辑一个notebook的起冲突的话怎么办?

尝试了几种多用户访问notebook方案,实际上是在独立与共享之间做权衡。
多账户的好处是每个用户可以拥有独立的环境和notebook,不受其他用户干扰,但是不利于访问其它用户的notebook;
对于我们的使用场景,都是基于boto3 sdk 做功能验证,python环境是一致,只需要避免共同编辑同一个notebook导致的冲突;
因此起1个还是多个notebook实例并不解决问题,我按功能划分了多个子目录,每个人在各自目录下进行编辑和测试,同时不主动修改他人目录下的notebook,从而兼顾独立与共享的需求。
这里要说明一点,尽管只启了1个notebook实例,每打开一个notebook都会启独立的kernel,对应1个或多个python进程,这与启多个notebook实例是相同效果。如果同时运行的notebook较多,我会增加实例的运行内存。

@aleck31
Copy link
Owner

aleck31 commented Nov 22, 2021

  1. 提示[ec2-user@ip-10-10-1-185 ~]$ channel 3: open failed: connect failed: Connection refused
    channel 4: open failed: connect failed: Connection refused
    http://127.0.0.1:8080/打不开

出现 Connection refused 时确保2点:
1、ssh连接时加了L参数指定本地8080端口转发
2、ssh登录后确保启了notebook实例,执行 netstat -ntlp 看8080端口是否起来

如果8080端口没有起来:
1、激活装有jupyter notebook的虚拟环境;
2、执行 run_notebook.sh
3、确保8080端口起来后,本地浏览器访问 http://127.0.0.1:8080

@aleck31 aleck31 added the question Further information is requested label Nov 22, 2021
@Stan-Lyuu
Copy link

image
测试机缺少上图红色区域的权限,无法查看可提供的实例类型

@aleck31
Copy link
Owner

aleck31 commented Nov 23, 2021

是的,这4个区域没有权限。美东1的实例类型应该比较全面了,每一子类下选一些常用的实例类型,先不用提供全部类型

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

5 participants