我为 cadquery 和 jupyter notebook 下载了一个 docker 镜像。
当我运行容器时,它给了我这条消息:
[I 19:48:59.700 LabApp] JupyterLab application directory is /opt/conda/envs/cq/share/jupyter/lab
[I 19:48:59.703 LabApp] Serving notebooks from local directory: /home/cq
[I 19:48:59.703 LabApp] Jupyter Notebook 6.1.1 is running at:
[I 19:48:59.703 LabApp] http://58bb309866f3:8888/
[I 19:48:59.703 LabApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
当我http://58bb309866f3:8888/
在浏览器(docker-host 机器)中访问时,我得到:This site can’t be reached
。
那么我怎样才能启动 jupyter 呢?我以前从未使用过 jupyter - 我不清楚那是什么 - 但它是访问 cadquery API 的方法。
编辑:我用以下命令启动了 docker 容器:
sudo docker run -it --rm -v $WORKDIR:/home/cq -p 8888:8888 bwalter42/jupyter_cadquery:1.0.0
该地址58bb309866f3:8888
是主机无法访问的内部容器地址
您应该使用 localhost 和 docker run 命令中映射的端口进行连接。在这种情况下,您可以使用连接localhost:8888
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句