(推荐)自动安装GPU加速型ECS的GPU驱动(Windows)
操作场景
在使用GPU加速型实例时,需确保实例已安装GPU驱动,否则无法获得相应的GPU加速能力。
本节内容介绍如何在GPU加速型Windows实例上通过脚本自动安装GPU驱动。
使用须知
- 本操作仅支持Linux操作系统。
- 本操作当前仅支持安装GRID驱动,安装完成后,需自行购买和配置使用GRID License。
详细操作,请参见手动安装GPU加速型ECS的GRID驱动。
- 如果GPU加速型实例已安装GPU驱动,需要先卸载原驱动后再安装新的目标驱动。
GPU驱动自动安装脚本提供卸载驱动的能力,请在执行脚本时根据交互式界面按需选择。若无法卸载,请参考卸载GPU加速型ECS的GPU驱动手动执行。
- 当前仅部分GPU加速型实例的规格、部分Windows操作系统版本支持通过脚本自动安装GPU驱动。
- Windows Server 2016 数据中心版
- Windows Server 2019 数据中心版
如果您的规格、操作系统或驱动版本不支持通过脚本自动安装GPU驱动,若图1所示,请参考手动安装GPU加速型ECS的GRID驱动和手动安装GPU加速型ECS的Tesla驱动,手动安装GPU驱动。
驱动安装脚本支持区域及获取方式
您可以在PowerShell上执行以下命令,获取驱动安装脚本。
- 华北-北京一
Start-BitsTransfer -Source https://hgcs-drivers-cn-north-1.obs.cn-north-1.myhuaweicloud.com/release/script/auto_install.ps1 -Destination auto_install.ps1; ./auto_install.ps1
- 华北-北京二
Start-BitsTransfer -Source https://hgcs-drivers-cn-north-2.obs.cn-north-2.myhuaweicloud.com/release/script/auto_install.ps1 -Destination auto_install.ps1; ./auto_install.ps1
- 华北-北京四
Start-BitsTransfer -Source https://hgcs-drivers-cn-north-4.obs.cn-north-4.myhuaweicloud.com/release/script/auto_install.ps1 -Destination auto_install.ps1; ./auto_install.ps1
- 华北-乌兰察布一
Start-BitsTransfer -Source https://hgcs-drivers-cn-north-9.obs.cn-north-9.myhuaweicloud.com/release/script/auto_install.ps1 -Destination auto_install.ps1; ./auto_install.ps1
- 华东-上海一
Start-BitsTransfer -Source https://hgcs-drivers-cn-east-3.obs.cn-east-3.myhuaweicloud.com/release/script/auto_install.ps1 -Destination auto_install.ps1; ./auto_install.ps1
- 华东-上海二
Start-BitsTransfer -Source https://hgcs-drivers-cn-east-2.obs.cn-east-2.myhuaweicloud.com/release/script/auto_install.ps1 -Destination auto_install.ps1; ./auto_install.ps1
- 华南-广州
Start-BitsTransfer -Source https://hgcs-drivers-cn-south-1.obs.cn-south-1.myhuaweicloud.com/release/script/auto_install.ps1 -Destination auto_install.ps1; ./auto_install.ps1
- 华南-广州-友好用户环境
Start-BitsTransfer -Source https://hgcs-drivers-cn-south-4.obs.cn-south-4.myhuaweicloud.com/release/script/auto_install.ps1 -Destination auto_install.ps1; ./auto_install.ps1
- 西南-贵阳一
Start-BitsTransfer -Source https://hgcs-drivers-cn-southwest-2.obs.cn-southwest-2.myhuaweicloud.com/release/script/auto_install.ps1 -Destination auto_install.ps1; ./auto_install.ps1
- 中国-香港
Start-BitsTransfer -Source https://hgcs-drivers-ap-southeast-1.obs.ap-southeast-1.myhuaweicloud.com/release/script/auto_install.ps1 -Destination auto_install.ps1; ./auto_install.ps1
- 亚太-曼谷
Start-BitsTransfer -Source https://hgcs-drivers-ap-southeast-2.obs.ap-southeast-2.myhuaweicloud.com/release/script/auto_install.ps1 -Destination auto_install.ps1; ./auto_install.ps1
- 亚太-新加坡
Start-BitsTransfer -Source https://hgcs-drivers-ap-southeast-3.obs.ap-southeast-3.myhuaweicloud.com/release/script/auto_install.ps1 -Destination auto_install.ps1; ./auto_install.ps1
- 非洲-约翰内斯堡
Start-BitsTransfer -Source https://hgcs-drivers-af-south-1.obs.af-south-1.myhuaweicloud.com/release/script/auto_install.ps1 -Destination auto_install.ps1; ./auto_install.ps1
操作步骤
以下操作以Windows Server 2019数据中心版操作系统,G6规格的GPU加速型实例安装GRID驱动为例进行介绍。
- 远程登录云服务器。
- 单击“启动”,打开Windows PowerShell。 图2 打开PowerShell
- 在PowerShell中,执行以下命令,获取驱动安装脚本并运行。
以“华北-北京四”为例介绍,更多区域请参考驱动安装脚本支持区域及获取方式。
Start-BitsTransfer -Source https://hgcs-drivers-cn-north-4.obs.cn-north-4.myhuaweicloud.com/release/script/auto_install.ps1 -Destination auto_install.ps1; ./auto_install.ps1
- 选择驱动版本与保存路径。 图3 选择驱动版本与保存路径
- 单击“OK”,开始安装驱动。 图4 安装驱动
图5 同意NVIDIA软件许可协议
图6 选择安装选项
- 驱动安装完成后,可能需要重启云服务器。
- 如果需要重启,单击“稍后重启”,待脚本执行完成后,手动重启云服务器。 图7 稍后重启
- 如果不需要重启,单击“关闭”。 图8 关闭
- 如果需要重启,单击“稍后重启”,待脚本执行完成后,手动重启云服务器。
- 返回桌面,在空白处右键单击,选择“NVIDIA控制面板”,查看驱动版本,判断驱动是否安装成功。
后续操作
使用自动化脚本完成GRID驱动的安装后,需参考手动安装GPU加速型ECS的GRID驱动完成GRID License的购买和配置使用。

