This module contains a set of scripts to be used in customizing Windows VMs at boot or during image building. Please note that the installation of NVIDIA GPU drivers takes, at minimum, 30-60 minutes. It is therefore recommended to build a custom image and reuse it as shown below, rather than install GPU drivers at boot time.
NOTE: the output
windows_startup_ps1
must be passed explicitly as shown below when used with Packer modules. This is due to a limitation in theuse
keyword and inputs of typelist
in Packer modules; this does not impact Terraform modules
Many Google Cloud VM families include or can have NVIDIA GPUs attached to them. This module supports GPU applications by enabling you to easily install a compatible release of NVIDIA drivers and of the CUDA Toolkit. The script is the solution recommended by our documentation and is directly sourced from GitHub.
- group: primary
modules:
- id: network1
source: modules/network/vpc
settings:
enable_iap_rdp_ingress: true
enable_iap_winrm_ingress: true
- id: windows_startup
source: community/modules/scripts/windows-startup-script
settings:
install_nvidia_driver: true
- group: packer
modules:
- id: image
source: modules/packer/custom-image
kind: packer
use:
- network1
- windows_startup
settings:
source_image_family: windows-2016
machine_type: n1-standard-8
accelerator_count: 1
accelerator_type: nvidia-tesla-t4
disk_size: 75
disk_type: pd-ssd
omit_external_ip: false
state_timeout: 15m
Copyright 2023 Google LLC
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Name | Version |
---|---|
terraform | >= 0.14.0 |
No providers.
No modules.
No resources.
Name | Description | Type | Default | Required |
---|---|---|---|---|
http_proxy | Set http and https proxy for use by Invoke-WebRequest commands | string |
"" |
no |
http_proxy_set_environment | Set system default environment variables http_proxy and https_proxy for all commands | bool |
false |
no |
install_nvidia_driver | Install NVIDIA GPU drivers and the CUDA Toolkit using script specified by var.install_nvidia_driver_script | bool |
false |
no |
install_nvidia_driver_args | Arguments to supply to NVIDIA driver install script | string |
"/s /n" |
no |
install_nvidia_driver_script | Install script for NVIDIA drivers specified by http/https URL | string |
"https://developer.download.nvidia.com/compute/cuda/12.1.1/local_installers/cuda_12.1.1_531.14_windows.exe" |
no |
no_proxy | Environment variables no_proxy (only used if var.http_proxy_set_environment is enabled) | string |
"169.254.169.254,metadata,metadata.google.internal,.googleapis.com" |
no |
Name | Description |
---|---|
windows_startup_ps1 | A string list of scripts selected by this module |