【问题标题】:Can't open jupyter notebook in docker无法在 docker 中打开 jupyter notebook
【发布时间】:2018-11-27 21:45:43
【问题描述】:

我正在尝试在容器中打开 jupyter notebook,但我遇到了这种情况:

[I 10:01:25.051 NotebookApp] The Jupyter Notebook is running at:
[I 10:01:25.051 NotebookApp] http://8c1eb91f0492:8888/?token=7671a7abe557349c8d8ad1cbf207702451925efd2c27c84e
[I 10:01:25.051 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 10:01:25.051 NotebookApp]
Copy/paste this URL into your browser when you connect for the first time,
to login with a token:
    http://8c1eb91f0492:8888/?token=7671a7abe557349c8d8ad1cbf207702451925efd2c27c84e&token=7671a7abe557349c8d8ad1cbf207702451925efd2c27c84e

你可以看到 url 是容器 ID,我尝试了很多解决方案,比如 ip 设置。一切都无济于事。有人可以给出提示吗?提前致谢!

【问题讨论】:

标签: python docker jupyter-notebook jupyter pytorch


【解决方案1】:

逐步尝试使用本地主机:

1 - 启动以下命令:

docker run -p 8888:8888 jupyter/scipy-notebook

2 - 将 url URL 复制/粘贴到浏览器中:http://e6ef92c5e5d6:8888/?token=...

3 - 用 localhost 替换主机名:http://localhost:8888/?token=...

它对我有用:

[I 03:22:51.414 NotebookApp] 302 GET /?token=... (172.17.0.1) 0.97ms

【讨论】:

  • 非常感谢,它工作正常,而且我更改为新端口,因为 8888 总是被其他服务占用。
猜你喜欢
  • 2020-07-13
  • 2021-07-13
  • 1970-01-01
  • 2017-11-13
  • 2021-12-20
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2019-07-30
相关资源
最近更新 更多