2024-07-03 20:01:35 -07:00
|
|
|
# Copyright (c) Microsoft Corporation.
|
|
|
|
# SPDX-License-Identifier: MIT
|
2024-05-24 22:22:47 -07:00
|
|
|
|
2024-07-03 20:01:35 -07:00
|
|
|
param([string]$SasToken)
|
2024-05-24 22:22:47 -07:00
|
|
|
|
2024-07-03 20:01:35 -07:00
|
|
|
if (Test-Path "$PSScriptRoot/utility-prefix.ps1") {
|
|
|
|
. "$PSScriptRoot/utility-prefix.ps1"
|
|
|
|
}
|
2024-05-24 22:22:47 -07:00
|
|
|
|
2024-07-03 20:01:35 -07:00
|
|
|
[string]$CudnnUrl
|
|
|
|
if ([string]::IsNullOrEmpty($SasToken)) {
|
2024-11-19 14:42:29 -08:00
|
|
|
Write-Host 'Downloading from the Internet'
|
2024-07-03 20:01:35 -07:00
|
|
|
$CudnnUrl = 'https://developer.download.nvidia.com/compute/cudnn/redist/cudnn/windows-x86_64/cudnn-windows-x86_64-9.2.0.82_cuda12-archive.zip'
|
|
|
|
} else {
|
2024-11-19 14:42:29 -08:00
|
|
|
Write-Host 'Downloading from vcpkgimageminting using SAS token'
|
2024-07-03 20:01:35 -07:00
|
|
|
$SasToken = $SasToken.Replace('"', '')
|
|
|
|
$CudnnUrl = "https://vcpkgimageminting.blob.core.windows.net/assets/cudnn-windows-x86_64-9.2.0.82_cuda12-archive.zip?$SasToken"
|
|
|
|
}
|
2024-05-24 22:22:47 -07:00
|
|
|
|
2024-07-03 20:01:35 -07:00
|
|
|
DownloadAndUnzip -Name 'CUDNN' -Url $CudnnUrl -Destination "$env:ProgramFiles\NVIDIA GPU Computing Toolkit\CUDA\v12.5"
|
2024-05-24 22:22:47 -07:00
|
|
|
|
2024-07-03 20:01:35 -07:00
|
|
|
if (Test-Path "$env:ProgramFiles\NVIDIA GPU Computing Toolkit\CUDA\v12.5\include\cudnn.h") {
|
|
|
|
Write-Host 'cudnn appears correctly installed'
|
|
|
|
} else {
|
|
|
|
Write-Error 'cudnn appears broken!'
|
2024-05-24 22:22:47 -07:00
|
|
|
}
|