如何在虚拟机上 运行 时查看 Dask 仪表板?
How to view Dask dashboard when running on a virtual machine?
这是我现在正在做的事情:
- 从我的 Windows 笔记本电脑,我通过 Putty SSH 连接到 Linux 服务器:IP 地址是
11.11.11.111
启动 Jupyter 笔记本:nohup jupyter notebook --ip=0.0.0.0 --no-browser &
- 终端输出显示 Jupyter notebook 正在 运行ning at:
http://(11.11.11.111 or 127.0.0.1):8889/?token=blahblahblah
在新笔记本中启动单机客户端:
from dask.distributed import Client
client = Client()
打印 client
显示仪表板位于 http://127.0.0.1:8787/status
,但是,我找不到 URL 处的仪表板。我也试过 http://11.11.11.111:8787/status
但也没用。
我仍然可以 运行 使用 Dask Dataframes 运行 我笔记本中的所有内容都很好,但我只是不知道如何查看仪表板。 Bokeh
安装在服务器上,我正在 运行 通过 Anaconda 安装 Jupyter Notebook。
终于通过一些 SSH 隧道解决了这个问题。
更多问题背景:
- 本地机器是 Windows 笔记本电脑
- 远程服务器是 CentOS box
目标实际上有两个:
运行 包含 Dask 代码的远程服务器上的 Jupyter Notebook
从代码 运行ning 在笔记本中查看 Dask 仪表板
以下是我采取的步骤:
对于这个例子,远程服务器的IP地址是11.11.11.111
按照 Port Tunneling 的一些说明,我使用 8001
作为源端口和目标是 localhost:8889
连接到远程服务器(具有 16 个内核和 44.7GB RAM)后,我 运行 在 Putty 终端中这样做:dask-worker tcp://11.11.11.111:8786 --memory-limit=auto --nthreads=1 --nprocs=16 &
在服务器上启动 Jupyter Notebook:jupyter notebook --ip=0.0.0.0 --port=8889 --no-browser &
一个。 运行ning 上述命令后,输出显示 Jupyter notebook 在 http://(hostname or 127.0.0.1):8889/?token=blahblahblah
运行ning
b。打开浏览器并转到上面的 URL (http://hostname:8889/?token=blahblahblah
) 会转到 Jupyter Notebook 主页
创建新笔记本并运行以下代码:
import dask.dataframe as dd
from dask.distributed import Client
client = Client('11.11.11.111:8786')
print(client)
输出显示仪表板
Client
Scheduler: tcp://11.11.11.111:8786
Dashboard: http://11.11.11.111:36124/status
client = Client('11.11.11.111:8786')
Cluster
Workers: 16
Cores: 16
Memory: 44.70 GB
现在在浏览器中输入 http://11.11.11.111:36124/status
window 会将我带到 Dask 仪表板。
这是我现在正在做的事情:
- 从我的 Windows 笔记本电脑,我通过 Putty SSH 连接到 Linux 服务器:IP 地址是
11.11.11.111
启动 Jupyter 笔记本:
nohup jupyter notebook --ip=0.0.0.0 --no-browser &
- 终端输出显示 Jupyter notebook 正在 运行ning at:
http://(11.11.11.111 or 127.0.0.1):8889/?token=blahblahblah
在新笔记本中启动单机客户端:
from dask.distributed import Client client = Client()
打印 client
显示仪表板位于 http://127.0.0.1:8787/status
,但是,我找不到 URL 处的仪表板。我也试过 http://11.11.11.111:8787/status
但也没用。
我仍然可以 运行 使用 Dask Dataframes 运行 我笔记本中的所有内容都很好,但我只是不知道如何查看仪表板。 Bokeh
安装在服务器上,我正在 运行 通过 Anaconda 安装 Jupyter Notebook。
终于通过一些 SSH 隧道解决了这个问题。
更多问题背景:
- 本地机器是 Windows 笔记本电脑
- 远程服务器是 CentOS box
目标实际上有两个:
运行 包含 Dask 代码的远程服务器上的 Jupyter Notebook
从代码 运行ning 在笔记本中查看 Dask 仪表板
以下是我采取的步骤:
对于这个例子,远程服务器的IP地址是
11.11.11.111
按照 Port Tunneling 的一些说明,我使用
8001
作为源端口和目标是localhost:8889
连接到远程服务器(具有 16 个内核和 44.7GB RAM)后,我 运行 在 Putty 终端中这样做:
dask-worker tcp://11.11.11.111:8786 --memory-limit=auto --nthreads=1 --nprocs=16 &
在服务器上启动 Jupyter Notebook:
jupyter notebook --ip=0.0.0.0 --port=8889 --no-browser &
一个。 运行ning 上述命令后,输出显示 Jupyter notebook 在
运行ninghttp://(hostname or 127.0.0.1):8889/?token=blahblahblah
b。打开浏览器并转到上面的 URL (
http://hostname:8889/?token=blahblahblah
) 会转到 Jupyter Notebook 主页创建新笔记本并运行以下代码:
import dask.dataframe as dd from dask.distributed import Client client = Client('11.11.11.111:8786') print(client)
输出显示仪表板
Client
Scheduler: tcp://11.11.11.111:8786
Dashboard: http://11.11.11.111:36124/status
client = Client('11.11.11.111:8786')
Cluster
Workers: 16
Cores: 16
Memory: 44.70 GB
现在在浏览器中输入 http://11.11.11.111:36124/status
window 会将我带到 Dask 仪表板。