gpt4 book ai didi

windows-8.1 - 在 Windows 中从 boot2docker 打开 Ipython 笔记本

转载 作者:行者123 更新时间:2023-12-04 02:56:23 26 4
gpt4 key购买 nike

我使用的是装有 Windows Pro 8.1 的 Surface Pro 3。我正在尝试从 docker 访问 IPython notebook。我使用的命令是

ipython notebook --no-browser --port 8888 "--ip=*"

notebook 正在运行,但它没有在我的浏览器中打开,这是我运行它时得到的结果

[I 23:16:44.921 NotebookApp]B Using existing profile dir: u'/home/itam/.ipython/profile_default'
[I 23:16:44.990 NotebookApp]B Using MathJax from CDN: https://cdn.mathjax.org/mathjax/latest/MathJax.js
[C 23:16:45.012 NotebookApp] WARNING: The notebook server is listening on all IP addresses and not using encryption. This is not recommended.
[C 23:16:45.012 NotebookApp] WARNING: The notebook server is listening on all IP addresses and not using authentication. This is highly insecure and not recommended.
[I 23:16:45.018 NotebookApp]B Serving notebooks from local directory: /home/itam/mate-computacional/itam-mate-computacional
[I 23:16:45.018 NotebookApp]B 0 active kernels
[I 23:16:45.018 NotebookApp]B The IPython Notebook is running at: http://[all ip addresses on your system]:8888/
[I 23:16:45.019 NotebookApp]B Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).

我的虚拟机IP地址是192.168.59.103,但是https://192.168.59.103:8888/打不开notebook。

最佳答案

启动boot2docker并创建新的docker容器ipython1:

docker run -it -ip 8888:8888 -v //c/Users/USERNAME://usr/data --name ipython1 <image_name>

image_name - 您的 docker 镜像的名称

-v folder_in_your_win_machine:folder_in_docker_container

-ip port_in_win:port_in_docker_container

启动 docker 容器 ipython1 并在 docker 容器中启动 ipython notebook:

docker start ipython1
docker exec -it ipython1 ipython notebook --ip=0.0.0.0 --no-browser

接下来转到 windows 浏览器并输入 url:docker_ip:8888。了解 docker IP execute:

boot2docker ip

关于windows-8.1 - 在 Windows 中从 boot2docker 打开 Ipython 笔记本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26110486/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com