Google compute engine 安装nvidia网格驱动程序时出现问题

Google compute engine 安装nvidia网格驱动程序时出现问题,google-compute-engine,nvidia,Google Compute Engine,Nvidia,我想在计算引擎实例中为我的android模拟器使用gpu加速。 我添加了特斯拉t4 gpu,现在尝试安装gpu网格驱动程序,如下所示。 我使用ubuntu 20。请告知 我得到一个错误: in file included from /tmp/selfgz11598/NVIDIA-Linux-x86_64-410.92-grid/kernel/nvidia/nv-rsync.c:24: /tmp/selfgz11598/NVIDIA-Linux-x86_64-410.92-grid/kernel

我想在计算引擎实例中为我的android模拟器使用gpu加速。 我添加了特斯拉t4 gpu,现在尝试安装gpu网格驱动程序,如下所示。 我使用ubuntu 20。请告知

我得到一个错误:

in file included from /tmp/selfgz11598/NVIDIA-Linux-x86_64-410.92-grid/kernel/nvidia/nv-rsync.c:24:
/tmp/selfgz11598/NVIDIA-Linux-x86_64-410.92-grid/kernel/common/inc/nv-linux.h:1775:6: error: "NV_BUILD_MODULE_INSTA
NCES" is not defined, evaluates to 0 [-Werror=undef]
 1775 | #if (NV_BUILD_MODULE_INSTANCES != 0)
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~

c1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:275: /tmp/selfgz11598/NVIDIA-Linux-x86_64-410.92-grid/kernel/nvidia/nv_uvm_int
erface.o] Error 1
/tmp/selfgz11598/NVIDIA-Linux-x86_64-410.92-grid/kernel/nvidia/nvlink_linux.c: In function ‘nvlink_sleep’:
/tmp/selfgz11598/NVIDIA-Linux-x86_64-410.92-grid/kernel/nvidia/nvlink_linux.c:570:5: error: implicit declaration of
 function ‘do_gettimeofday’; did you mean ‘efi_gettimeofday’? [-Werror=implicit-function-declaration]
  570 |     do_gettimeofday(&tm_aux);
      |     ^~~~~~~~~~~~~~~
      |     efi_gettimeofday
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:275: /tmp/selfgz11598/NVIDIA-Linux-x86_64-410.92-grid/kernel/nvidia/nvlink_lin
ux.o] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [Makefile:1731: /tmp/selfgz11598/NVIDIA-Linux-x86_64-410.92-grid/kernel] Error 2
make[1]: Target 'modules' not remade because of errors.
make[1]: Leaving directory '/usr/src/linux-headers-5.4.0-1021-gcp'
make: *** [Makefile:79: modules] Error 2
ERROR: The nvidia kernel module was not created.
ERROR: Installation has failed.  Please see the file '/var/log/nvidia-installer.log' for details.  You may find sug
gestions on fixing installation problems in the README available on the Linux driver download page at www.nvidia.co
m.
(END)
用于为虚拟工作站安装NVIDIA GRID®驱动程序的仅包含安装网格驱动程序所需的命令示例

包含在该指南中的例子,是安装英伟达410.92驱动程序,这个驱动程序是GRID7.1,但是我建议使用最新版本的网格,您可以查阅以下来查看驱动程序可用。 <>我在自己的项目中复制了这个场景,我可以使用英伟达45.01.05驱动程序安装GRID11。 我正在使用具有以下特征的实例:

  • 机器类型:n1-standard-1(1个vCPU,3.75 GB内存)
  • GPU:1 x NVIDIA Tesla T4
  • 操作系统ubuntu-minimal-2004-focal-v20200702
请记住,您需要在创建时启用启用虚拟工作站(NVIDIA网格)选项,以避免出现问题

我为此安装使用了以下命令:

user@instance-1:~$ curl -O https://storage.googleapis.com/nvidia-drivers-us-public/GRID/GRID11.0/NVIDIA-Lin
ux-x86_64-450.51.05-grid.run
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  139M  100  139M    0     0  72.2M      0  0:00:01  0:00:01 --:--:-- 72.1M
在我的例子中,我需要安装一些依赖项,比如gcc编译器,并且我只使用了这个命令

$sudo-apt-install-build-essential

我希望这些信息对您有用。

用于为虚拟工作站安装NVIDIA GRID®驱动程序的文件仅包含安装网格驱动程序所需的命令示例

包含在该指南中的例子,是安装英伟达410.92驱动程序,这个驱动程序是GRID7.1,但是我建议使用最新版本的网格,您可以查阅以下来查看驱动程序可用。 <>我在自己的项目中复制了这个场景,我可以使用英伟达45.01.05驱动程序安装GRID11。 我正在使用具有以下特征的实例:

  • 机器类型:n1-standard-1(1个vCPU,3.75 GB内存)
  • GPU:1 x NVIDIA Tesla T4
  • 操作系统ubuntu-minimal-2004-focal-v20200702
请记住,您需要在创建时启用启用虚拟工作站(NVIDIA网格)选项,以避免出现问题

我为此安装使用了以下命令:

user@instance-1:~$ curl -O https://storage.googleapis.com/nvidia-drivers-us-public/GRID/GRID11.0/NVIDIA-Lin
ux-x86_64-450.51.05-grid.run
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  139M  100  139M    0     0  72.2M      0  0:00:01  0:00:01 --:--:-- 72.1M
在我的例子中,我需要安装一些依赖项,比如gcc编译器,并且我只使用了这个命令

$sudo-apt-install-build-essential

我希望这些信息对你有用

user@instance-1:~$ nvidia-smi
Mon Jul 27 21:11:17 2020       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 450.51.05    Driver Version: 450.51.05    CUDA Version: 11.0     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  Tesla T4            On   | 00000000:00:04.0 Off |                    0 |
| N/A   73C    P8    21W /  70W |      0MiB / 15109MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+