File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -145,14 +145,36 @@ jobs:
145145 $cudaChannel = "nvidia/label/cuda-$cudaVersion"
146146 if ($IsLinux) {
147147 $nvccPackage = "${cudaChannel}::cuda-nvcc_linux-64"
148+ $cudaPackages = @("${cudaChannel}::cuda-toolkit=$cudaVersion", $nvccPackage)
148149 } elseif ($IsWindows) {
149150 $nvccPackage = "${cudaChannel}::cuda-nvcc_win-64"
151+ if ($cudaVersion -like '12.5.*') {
152+ # The Windows 12.5 toolkit meta-package pulls conda compiler
153+ # activation scripts that can overflow cmd.exe's line limit after
154+ # MSVC is already initialized. The build only needs nvcc, cudart,
155+ # and headers from the NVIDIA label.
156+ $cudaPackages = @($nvccPackage)
157+ } else {
158+ $cudaPackages = @("${cudaChannel}::cuda-toolkit=$cudaVersion", $nvccPackage)
159+ }
150160 } else {
151161 throw 'Unsupported CUDA wheel build platform'
152162 }
153163 # Keep nvcc, cudart, and headers on the same NVIDIA label so the
154164 # detected toolkit version matches the published wheel tag.
155- mamba install -y --channel-priority flexible --override-channels -c $cudaChannel "${cudaChannel}::cuda-toolkit=$cudaVersion" $nvccPackage "${cudaChannel}::cuda-cudart" "${cudaChannel}::cuda-cudart-dev"
165+ $mambaArgs = @(
166+ 'install',
167+ '-y',
168+ '--channel-priority',
169+ 'flexible',
170+ '--override-channels',
171+ '-c',
172+ $cudaChannel
173+ ) + $cudaPackages + @(
174+ "${cudaChannel}::cuda-cudart",
175+ "${cudaChannel}::cuda-cudart-dev"
176+ )
177+ & mamba @mambaArgs
156178 if ($LASTEXITCODE -ne 0) {
157179 exit $LASTEXITCODE
158180 }
You can’t perform that action at this time.
0 commit comments