Ask HN:如何在 VS Code 中使用 macOS devcontainer?

1作者: sroussey4 个月前
为了避免安装 npm 包和运行此类代码(以及运行编码代理!)带来的所有麻烦,我使用 devcontainer 来限制 VS Code 和 Cursor 中的影响范围。 但同时,我还在进行本地模型相关的工作,这意味着我只能在 CPU 上运行。我知道在 Windows 上有容器可以将 CUDA 相关内容转发到宿主系统上运行,但在 MacOS 上没有这样的东西。 内置的 devcontainer 基于 Docker,但也许有人已经破解了一些东西,让原生虚拟化呈现出类似 Docker 的样子,这样我就能让它工作了? 其他人都是怎么做的呢?
查看原文
In order to avoid all the fun of installing npm packages and running such code (as well as running coding agents!), I use a devcontainer to limit the blast radius inside VS Code and Cursor.<p>But I am also doing local model stuff, which means I can only run on CPU. I know on Windows there are containers that will forward CUDA stuff to the host system to run, but there is no such thing on MacOS.<p>The builtin devcontainer stuff is based on Docker, but maybe someone has hacked something together to get native virtualization to present itself like docker so i could get this to work?<p>What do other people do?