google-cloud-platform - 在 Google Cloud VM 中将 GPU 与容器和容器优化操作系统一起使用

标签 google-cloud-platform gpu google-compute-engine google-container-os

我想在 Google Compute Engine 上使用 GPU 运行自定义 Docker 镜像。 我已经构建并将图像推送到 Google Container Registry。 在 Google Cloud Engine 中为主机使用 Container-Optimized OS 似乎是合乎逻辑的,因为除了 Docker、Nvidia GPU 驱动程序和 nvidia-container-runtime 之外,我不需要主机上的任何额外软件。

我设法用 this solution 安装了 nvidia-drivers .

但如果没有 nvidia-container 运行时,我无法使用 GPU(使用 --gpu all 选项)运行我的 Docker 镜像。 This step is specified in official Docker documentation .

有没有办法在 Google Cloud VM 中的 Container-Optimized OS 上安装 nvidia-container-runtime?

最佳答案

您不必设置--gpu all,因为这是nvidia-container-runtime 的默认选项.您不需要任何其他东西的假设是错误的,因为它需要 libnvidia-container .

准确回答问题:不是,因为操作系统需要安装libnvidia-container,K8s容器内需要安装nvidia-container-runtime .一个公开接口(interface) - 另一个连接它。因此,一个没有另一个是无用的。

关于google-cloud-platform - 在 Google Cloud VM 中将 GPU 与容器和容器优化操作系统一起使用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61068495/

相关文章:

c++ - 使用opencv GPU旋转图像

python - 尝试从 docker 容器访问时,Datastore 返回 503

python - Prometheus 跟踪自动缩放服务器中的请求

ssh - 无法通过 SSH Google Cloud 实例 -

javascript - 如何使用 node.js 函数检查我的虚拟机实例在 google-cloud 中使用了多少个 CPU 和内存

javascript - 直接从浏览器(包括 Safari)调用 Google Cloud Speech API 是否可行且可取?

pytorch - 训练 DNN 时如何监控 GPU 内存使用情况?

python - 使用 TensorFlow 在 google colab 上同时使用 CPU 和 GPU

javascript - 如何从客户端的 Firebase 应用程序向我的应用程序引擎发出 http 请求?

google-cloud-platform - Datalab 用于访问数据的凭据是什么?