GCP顶点AI托管笔记本无法使用自定义容器

发布于 2025-01-28 19:43:07 字数 424 浏览 4 评论 0原文

在GCP Vertex AI中,我通过指定一个与用户管理的笔记本电脑内核完美配合的自定义容器来创建一个托管笔记本。 托管笔记本开始,Jupyter Lab似乎没有任何错误迹象。

不幸的是,如果我查看jupyter实验室中的可用内核,则只列出了默认内核,但不列出我的自定义内核。

右侧的活动日志条目显示了一个旋转的车轮“来自[自定义容器]的加载内核”,该内核永远不会消失。
看一下终端,

docker image ls

也不显示自定义容器。显然,它甚至没有被拉到托管笔记本上。

执行

docker Pull [自定义容器]

如果我在终端中 ,以测试与人工制品注册表的连接性,则根据预期正确拉动容器。 但是,在Jupyter Lab(即使是笔记本重新启动之后),自定义内核仍然不可见。

In GCP Vertex AI, I created a Managed Notebook by specifying one of our custom containers which work perfectly with User-Managed Notebook kernels.
The Managed Notebook starts, and Jupyter Lab seems to work without any signs of error.

Unfortunately, if I look at the available kernels in Jupyter Lab, only the default kernels are listed but not my custom kernel.

An activity log entry on the right shows a spinning wheel "Loading kernel from [custom container]" which never disappears.
Taking a look at the terminal,

docker image ls

does not show the custom container either; obviously, it was not even pulled to the Managed Notebook.

If I perform

docker pull [custom container]

in the terminal, to test connectivity to the Artifact Registry then it pulls the container correctly as expected.
However, the custom kernel is still not visible in Jupyter Lab (even after a notebook restart).

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

没有你我更好 2025-02-04 19:43:07

我今天遇到了同样的问题,经过一些实验,我发现我还没有满足 vertex ai docs
特别是 - 码头容器图像必须支持睡眠无限。

我的dockerfile包含

EXPOSE 8080

ENTRYPOINT [ "jupyter", "lab", "--allow-root", "--ip", "0.0.0.0", "--config", "/opt/jupyter/.jupyter/jupyter_notebook_config.py" ]

启用睡眠无穷大的我替换了entrypoint

ENTRYPOINT ["/bin/sh", "-c", "sleep infinity"]

然后导入了kernelspec,但笔记本电脑无法连接。

因此,我完全删除了entrypoint,然后导入了kernelspec,笔记本电脑能够成功连接。

希望有帮助。

I faced the same issue today, and after some experimentation, I found that I haven't fulfilled all the requirements in Vertex AI docs.
One in particular - The Docker container image must support sleep infinity.

And my Dockerfile contained

EXPOSE 8080

ENTRYPOINT [ "jupyter", "lab", "--allow-root", "--ip", "0.0.0.0", "--config", "/opt/jupyter/.jupyter/jupyter_notebook_config.py" ]

To enable sleep infinity I replaced ENTRYPOINT with

ENTRYPOINT ["/bin/sh", "-c", "sleep infinity"]

then the kernelspec was imported, but the notebook wasn't able to connect.

So I removed the ENTRYPOINT entirely and then the kernelspec was imported and the notebook was able to connect successfully.

Hope that helps.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文