@@ -50,29 +50,57 @@ jobs:
5050 uses : actions/cache@v3
5151 with :
5252 path : ./.cache/cuda_installer.exe
53- key : cuda-installer-12.1.1
53+ key : cuda-installer-12.0.0
5454
5555 - name : 🔧 Install NVIDIA CUDA Toolkit
5656 run : |
5757 $installer_path = "./.cache/cuda_installer.exe"
5858 if (-not (Test-Path $installer_path)) {
5959 echo "Downloading CUDA Toolkit..."
60- $cuda_installer_url = "https://developer.download.nvidia.com/compute/cuda/12.1.1 /network_installers/cuda_12.1.1_windows_network .exe"
60+ $cuda_installer_url = "https://developer.download.nvidia.com/compute/cuda/12.0.0 /network_installers/cuda_12.0.0_windows_network .exe"
6161 New-Item -Path (Split-Path $installer_path) -ItemType Directory -Force
6262 curl -L -o $installer_path $cuda_installer_url
6363 } else {
6464 echo "CUDA Toolkit installer found in cache."
6565 }
6666
6767 echo "Installing CUDA Toolkit silently..."
68- $arguments = "-s nvcc_12.1 cudart_12.1 "
68+ $arguments = "-s nvcc_12.0 cudart_12.0 "
6969 Start-Process -FilePath $installer_path -ArgumentList $arguments -Wait -NoNewWindow
7070
7171 echo "Adding CUDA to PATH..."
72- $cuda_path = "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1"
73- echo "CUDA_PATH=$cuda_path" | Out-File -FilePath $env:GITHUB_ENV -Append
74- echo "$cuda_path\bin" | Out-File -FilePath $env:GITHUB_PATH -Append
75- echo "$cuda_path\lib\x64" | Out-File -FilePath $env:GITHUB_PATH -Append
72+ $CUDA_PATH = "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.0"
73+ echo "CUDA_PATH=$CUDA_PATH" | Out-File -FilePath $env:GITHUB_ENV -Append
74+ echo "$CUDA_PATH\bin" | Out-File -FilePath $env:GITHUB_PATH -Append
75+ echo "$CUDA_PATH\lib\x64" | Out-File -FilePath $env:GITHUB_PATH -Append
76+ echo "$CUDA_PATH"
77+ shell : pwsh
78+
79+ - name : Cache CuDNN Installer
80+ id : cache-cudnn-installer
81+ uses : actions/cache@v3
82+ with :
83+ path : ./.cache/cudnn_installer.exe
84+ key : cudnn-installer-8.8.0.121-windows
85+
86+ - name : 🔧 Install NVIDIA CuDNN
87+ run : |
88+ $installer_path = "./.cache/cudnn_installer.exe"
89+ if (-not (Test-Path $installer_path)) {
90+ echo "Downloading CuDNN..."
91+ $cudnn_installer_url = "https://developer.download.nvidia.com/compute/redist/cudnn/v8.8.0/local_installers/12.0/cudnn_8.8.0.121_windows.exe"
92+ New-Item -Path (Split-Path $installer_path) -ItemType Directory -Force
93+ curl -L -o $installer_path $cudnn_installer_url
94+ } else {
95+ echo "CuDNN installer found in cache."
96+ }
97+
98+ echo "Installing CuDNN silently..."
99+ # The CuDNN local installer for Windows is a self-extracting executable.
100+ # We assume it installs to the correct CUDA Toolkit directory.
101+ # We use -s for silent installation.
102+ Start-Process -FilePath $installer_path -ArgumentList "-s" -Wait -NoNewWindow
103+ echo "CuDNN installation complete."
76104 shell : pwsh
77105
78106 - name : Cache opencv-python repository
@@ -118,7 +146,7 @@ jobs:
118146 -DBUILD_SHARED_LIBS=OFF `
119147 -DWITH_CUDA=ON `
120148 -DCUDA_ARCH_BIN="6.0;6.1;7.0;7.5" `
121- -DCUDA_ARCH_PTX=7.5 `
149+ -DCUDA_ARCH_PTX=" 7.5" `
122150 -DOPENCV_ENABLE_NONFREE=ON `
123151 -DENABLE_LTO=ON `
124152 -DCPU_DISPATCH="AVX,AVX2" `
0 commit comments