首页 > 解决方案 > 如何轻松为 Google 的容器优化操作系统安装 Nvidia 驱动程序?

问题描述

我正在尝试使用 Google Compute 来玩一些深度学习模型。我希望使用 Nvidia 的 CUDA 容器来运行这些模型。一种相对便宜的方法是利用 Google 的容器优化操作系统来托管容器。

当我转到驱动程序时,未安装 Nvidia 驱动程序。由于它是专有操作系统,我似乎找不到为 Google 提供的任何 GPU 安装任何驱动程序的方法。

我发现的最接近的是:https ://github.com/ContainerEngine/accelerators/tree/master/cos-nvidia-gpu-installer ,但这意味着创建一个新容器而不是使用一些 GPU 加速库附带的 Nvidia 容器.

标签: nvidiagoogle-container-os

解决方案


这可能是您想要的: https ://github.com/GoogleCloudPlatform/cos-gpu-installer#how-to-use

您可以尝试运行此命令,看看它是否适用于您的用例:

gcloud compute instances create $USER-cos-gpu-test \
--image-family cos-stable \
--image-project cos-cloud \
--accelerator=type=nvidia-tesla-k80 \
--boot-disk-size=25GB \
--maintenance-policy=TERMINATE \
--metadata-from-file "cos-gpu-installer-env=scripts/gpu-installer-env,user-data=install-test-gpu.cfg,run-installer-script=scripts/run_installer.sh,run-cuda-test-script=scripts/run_cuda_test.sh"

推荐阅读