无法在 MS Azure 中的深度学习虚拟机 (DLVM) 上启动 jupyter notebook

Unable to start jupyter notebook on the Deep Learning Virtual Machine (DLVM) in MS Azure

我正在尝试在 MS Azure 的深度学习虚拟机 (DLVM) 上训练 keras 模型。我已经设置了一个 Ubuntu 虚拟机并通过 ssh 从我的 mac 连接到它但是当我尝试 运行 jupyter notebook 时,我得到这个错误:No such notebook dir: ''/dsvm/Notebooks'',为此我尝试了 Deep Learning Virtual Machine can't run jupyter "No such notebook dir: ''/dsvm/Notebooks''" 中指定的解决方案,但这给了我 The Jupyter Notebook is running at:https://[all ip addresses on your system]:9999/ 但是 chrome 说我的虚拟机的 ip : 9999 不工作。

根据docs jupyter hub should be available at 8000 as soon as the vm starts but I can't access http://my-vm-ip:8000任。 当我按照此处 的建议尝试 systemctl status jupyterhub 时,我可以看到 jupyter hub 确实在 8000 监听,并且在 vm 上定义了一个防火墙规则,允许通过互联网与 8000 进行 tcp 连接。

如何从 DLVM 访问 jupyter?

JupyterHub 应该可以在您的 VM 上运行并且可以访问。您是通过 https 连接的吗?您的 post 说您使用的是 http,但我们只支持 https。

另外,您是否确认 Azure 门户上的 8000 端口已打开?出于各种原因,一些 VM 是在没有打开此端口的情况下创建的。您也可以尝试重新启动 JupyterHub 服务以确认其正常工作。

如果您想 运行 Jupyter,则需要使用 Jupyter 配置文件解决最新 Ubuntu DSVM 的问题。在终端:

sudo -s
source /anaconda/bin/activate py35
jupyter notebook --generate-config --config=/usr/local/etc/jupyter/jupyter_notebook_config.py

然后您应该在防火墙中打开端口 8888。然后可以访问 Jupyter。

上面的第三条命令有点问题。它应该是 "--config=" 而不是 "config=".

sudo -s
source /anaconda/bin/activate py35
jupyter notebook --generate-config --config=/usr/local/etc/jupyter/jupyter_notebook_config.py

另请注意,上述命令也是修复 Jupyterhub 问题 ("No such notebook dir: ''/dsvm/Notebooks''") 所必需的。