<Jupyter Notebook>如何用一台服务器给多个 Jupyter 用户提供服务
来源:互联网 发布:淘宝集市店 编辑:程序博客网 时间:2024/06/07 04:05
如题,搭了一个 spark 集群,在 master 上安装了 jupyter notebook. 随后发现团队有多个人想在 master 上用 jupyter 操作,又不方便大家用一个账户,于是就创建了多个账户.
方法很简单:
jupyter notebook 命令有一个 --config <config_file_path> 的可选参数,默认使用当前目录下的 jupyter_notebook_config.py,可填入 绝对路径 指定配置文件。
只要给每个用户写一个配置文件(至少端口、工作目录的配置要不同),然后分别运行 jupyter notebook --config jupyter_notebook_config_username.py 即可。
实例
文件目录:
[root@master .jupyter]# lsjupyter_notebook_config_hs.py jupyter_notebook_config.py jupyter_notebook_config.py.bak jupyter_notebook_config_zq.py migrated其中 jupyter_notebook_config.py 是第一个用户的配置文件,jupyter_notebook_config_hs.py 是用户 hs 的配置文件,jupyter_notebook_config_zq.py 是用户 zq 的配置文件。
文件内容示例:
jupyter_notebook_config.py
1 # Configuration file for jupyter-notebook. 2 c = get_config() 3 c.IPKernelApp.pylab = 'inline' 4 c.NotebookApp.ip = '*' 5 c.NotebookApp.open_browser = False 6 c.NotebookApp.password = 'sha1:61c764d76b49:01e5f2ec3d6d0ba262b472281d025d3c4e1fe565' 7 c.NotebookApp.port = 6789 8 c.NotebookApp.notebook_dir = '/home/me/ipython'
执行 jupyter notebook & 或 jupyter note book --config /root/.jupyter/jupyter_note_book_config.py & 启动服务
客户端在浏览器上 通过 <ip地址>:6789 访问
jupyter_notebook_config_hs.py
1 # Configuration file for jupyter-notebook. 2 c = get_config() 3 c.IPKernelApp.pylab = 'inline' 4 c.NotebookApp.ip = '*' 5 c.NotebookApp.open_browser = False 6 c.NotebookApp.password = 'sha1:976bc4e3d0db:df5983c005e2d95c061426ba90c74086c57e76fd' 7 c.NotebookApp.port = 7777 8 c.NotebookApp.notebook_dir = '/home/hs/ipython'
执行 jupyter note book --config /root/.jupyter/jupyter_note_book_config_hs.py & 启动服务
至此,该服务器就可以给多个端口、密码不同的 jupyter notebook 用户使用了
阅读全文
0 0
- <Jupyter Notebook>如何用一台服务器给多个 Jupyter 用户提供服务
- 搭建 Jupyter Notebook 服务器
- Jupyter Notebook 服务器配置
- jupyter notebook 多个python kernel配置
- Jupyter Notebook远程服务器配置
- Jupyter notebook远程访问服务器
- CentOS7服务器安装Jupyter Notebook
- jupyter notebook
- Jupyter Notebook
- Jupyter NoteBook
- Jupyter Notebook
- Jupyter notebook
- Jupyter Notebook
- windows远程连接服务器中的jupyter notebook
- Windows远程访问服务器jupyter notebook
- 在服务器上配置jupyter notebook
- Jupyter Notebook使用笔记(一)
- Ipython Notebook升级版Jupyter Notebook远程服务器配置
- Android 中的BroadCastReceiver
- 2.1将工具栏添加
- Error getting authority: Error initializing authority: Could not connect: No such file or directory
- tomcat8源码之架构解析
- 工厂模式之——【抽象工厂模式】
- <Jupyter Notebook>如何用一台服务器给多个 Jupyter 用户提供服务
- mysql数据向oracle数据迁移
- react安装和使用--webpack
- sqlserver函数
- Oracle in exists
- 58 同城 iOS 客户端 Hybrid 框架探索
- java 实现http响应
- 视频学习笔记:Android ffmpeg解码多路h264视频并显示
- 基于注解的Spring整合SpringMVC开发流程?