Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion build/windows/nsis/project.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,12 @@ Section
IfFileExists "$INSTDIR\resources\nemotron\.ready" nemotron_present nemotron_probe_gpu

nemotron_probe_gpu:
nsExec::ExecToStack 'cmd /C nvidia-smi -L'
# NSIS is a 32-bit process even for an amd64 installer. Without disabling
# filesystem redirection, System32 resolves to SysWOW64, where NVIDIA's
# 64-bit nvidia-smi.exe is not installed.
${DisableX64FSRedirection}
nsExec::ExecToStack '"$SYSDIR\nvidia-smi.exe" -L'
${EnableX64FSRedirection}
Pop $1
Pop $2
StrCmp $1 "0" nemotron_gpu_found nemotron_no_gpu
Expand All @@ -143,7 +148,11 @@ Section

nemotron_provision:
DetailPrint "NVIDIA GPU detected; provisioning Nemotron 3.5 ASR Streaming..."
# Launch 64-bit PowerShell so setup.ps1 can also resolve nvidia-smi and
# validate VRAM/compute capability without WOW64 redirection.
${DisableX64FSRedirection}
nsExec::ExecToLog '"$SYSDIR\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -ExecutionPolicy Bypass -File "$INSTDIR\resources\nemotron\setup.ps1" -InstallRoot "$INSTDIR\resources\nemotron"'
${EnableX64FSRedirection}
Pop $1
StrCmp $1 "0" 0 nemotron_provision_failed
IfFileExists "$INSTDIR\resources\nemotron\.ready" nemotron_provisioned nemotron_not_ready
Expand Down
5 changes: 5 additions & 0 deletions internal/buildcheck/subsystem_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,14 @@ func TestInstallerOffersMissingNemotronOnUpgrade(t *testing.T) {
`StrCmp $IsUpgrade "0" nemotron_provision`,
`MessageBox MB_YESNO|MB_ICONQUESTION`,
`IfSilent nemotron_silent_skip`,
`${DisableX64FSRedirection}`,
`nsExec::ExecToStack '"$SYSDIR\nvidia-smi.exe" -L'`,
} {
if !strings.Contains(installer, required) {
t.Fatalf("%s no longer contains %q; missing Nemotron upgrades will not be handled safely", path, required)
}
}
if strings.Contains(installer, "cmd /C nvidia-smi") {
t.Fatalf("%s probes nvidia-smi through 32-bit cmd; WOW64 redirection hides the System32 executable", path)
}
}
Loading