-
Notifications
You must be signed in to change notification settings - Fork 70
infra: win11 nvidia github runner image builder #1826
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
44 commits
Select commit
Hold shift + click to select a range
ca63235
fix Vulkan SDK installation verification
tamer-hassan-tether 6b7629d
run vulkaninfo on win11-rtx4000-hetzner
tamer-hassan-tether d1e60d5
add job build-win11-nvidia-image
tamer-hassan-tether 3d989a4
fix missing double quoted string value in poweshell
tamer-hassan-tether 2c9aadc
run vulkaninfo on ai-run-windows11-gpu
tamer-hassan-tether acbe1bc
install vulkan sdk on ai-run-windows11-gpu
tamer-hassan-tether 1990c7b
fix typo
tamer-hassan-tether e0361ee
fix typo
tamer-hassan-tether 48b8795
correct vulkaninfoSDK.exe path
tamer-hassan-tether a408f8f
Force WDDM Mode for Vulkan to work
tamer-hassan-tether eb22da1
nvidia-smi -fdm 0
tamer-hassan-tether 0250210
install nvidia grid drivers instead of datacenter driver
tamer-hassan-tether 1a2a84f
use Use .NET HttpClient with Progress Tracking
tamer-hassan-tether 5d13f95
fix httpclient instance creation for newer powershell
tamer-hassan-tether e5e54da
dd-Type -AssemblyName System.Net.Http
tamer-hassan-tether 7ea972d
try wget
tamer-hassan-tether c603be6
test run vulkaninfo on ai-run-windows11-gpu
tamer-hassan-tether 13b7dca
installl git in win11-nvidia-grid-image
tamer-hassan-tether c4a7236
disable inteeractivity when installing git with winget
tamer-hassan-tether af4ee0f
git version separate step after winget install Git
tamer-hassan-tether 1a110fc
test
tamer-hassan-tether dcb5161
test
tamer-hassan-tether 0d3c3ac
install winget before winget install git
tamer-hassan-tether 1ee1ca8
install winget from PSGallery
tamer-hassan-tether b2ebf6c
fix
tamer-hassan-tether ee47f5e
fix2
tamer-hassan-tether 6749851
use Cyberboss/install-winget@v1
tamer-hassan-tether df8a00e
add --source winget to winget install
tamer-hassan-tether 1dd4a3a
add --custom '/o:PathOption=CmdTools' to winget installation of git f…
tamer-hassan-tether f040bb1
do not verify git installation in path in same job where it gets inst…
tamer-hassan-tether c91e0b6
verify that git is in the path for ai-run-windows11-gpu
tamer-hassan-tether 24abb0b
uncomment needed lines
tamer-hassan-tether 7d25ae1
Install Chocolatey on win11-nvidia-grid-image
tamer-hassan-tether 43c9942
s/pwsh/powershell/
tamer-hassan-tether 9ffaeee
verify choco installation
tamer-hassan-tether 908eb2f
verify vcpkg
tamer-hassan-tether f509a8a
clone vcpkg
tamer-hassan-tether f152803
vulkaninfo check
tamer-hassan-tether 21464cf
install visual studio build tools, LLVM, and Vulkan SDK in base image…
tamer-hassan-tether 84eb74f
do not install vulkan sdk on base win11 gpu image
tamer-hassan-tether 538292a
rename vulkaninfo to win11-nvidia-image-builder.yml
tamer-hassan-tether a4b0d49
add vulkaninfo.yml
tamer-hassan-tether 531ba6a
Merge branch 'main' into win11-nvidia-image-builder
tamer-hassan-tether 84b40b5
Merge branch 'main' into win11-nvidia-image-builder
tamer-hassan-tether File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,132 @@ | ||
| on: | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| build-win11-nvidia-image: | ||
| runs-on: generator-windows11 | ||
| snapshot: win11-nvidia-grid-image | ||
| steps: | ||
| - name: Check OS version | ||
| shell: powershell | ||
| run: | | ||
| Write-Host "=== OS Version ===" | ||
| $os = Get-CimInstance Win32_OperatingSystem | ||
| Write-Host "Caption: $($os.Caption)" | ||
| Write-Host "Version: $($os.Version)" | ||
| Write-Host "Build Number: $($os.BuildNumber)" | ||
| Write-Host "Architecture: $($os.OSArchitecture)" | ||
|
|
||
| - name: Install Chocolatey | ||
| shell: powershell | ||
| run: | | ||
| Set-ExecutionPolicy Bypass -Scope Process -Force | ||
| [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072 | ||
| iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1')) | ||
|
|
||
| - name: Install WinGet | ||
| uses: Cyberboss/install-winget@v1 | ||
|
|
||
| - name: Install git for windows with WinGet | ||
| shell: powershell | ||
| run: winget install --id Git.Git -e --source winget --disable-interactivity --accept-package-agreements --custom '/o:PathOption=CmdTools' | ||
|
|
||
| - name: Enable Windows 11 Developer Mode via Registry | ||
| shell: powershell | ||
| run: | | ||
| $registryPath = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock" | ||
| $propertyName = "AllowDevelopmentWithoutDevLicense" | ||
| $propertyValue = 1 | ||
|
|
||
| # Create the registry key path if it doesn't exist | ||
| if (-not (Test-Path -Path $registryPath)) { | ||
| New-Item -Path $registryPath -ItemType Directory -Force | Out-Null | ||
| } | ||
|
|
||
| # Set the registry value to enable Developer Mode | ||
| Set-ItemProperty -Path $registryPath -Name $propertyName -Value $propertyValue -Type DWORD -Force | ||
|
|
||
| Write-Host "Developer Mode enabled successfully." | ||
|
|
||
| - name: Install latest Visual C++ Redistributable | ||
| shell: powershell | ||
| run: | | ||
| # Download the latest x64 redistributable | ||
| $vcredistUrl = "https://aka.ms/vc14/vc_redist.x64.exe" | ||
| $vcInstaller = "$env:TEMP\vc_redist.x64.exe" | ||
| Invoke-WebRequest -Uri $vcredistUrl -OutFile $vcInstaller | ||
| Write-Host "Running silent install ..." | ||
| $proc = Start-Process -FilePath $vcInstaller ` | ||
| -ArgumentList "/install", "/quiet", "/norestart" ` | ||
| -Wait -PassThru | ||
| Write-Host "Installer exit code: $($proc.ExitCode)" | ||
|
|
||
| if ($proc.ExitCode -notin @(0, 1)) { | ||
| Write-Host "=== Windows Event Log (System, last 20 errors) ===" | ||
| Get-EventLog -LogName System -EntryType Error -Newest 20 | Format-List TimeGenerated, Source, EventID, Message | ||
| Write-Error "Visual C++ Redistributable installation failed with exit code $($proc.ExitCode)" | ||
| exit 1 | ||
| } | ||
|
|
||
| - name: Install Visual Studio Build Tools | ||
| run: | | ||
| # This command ensures the "Desktop development with C++" workload is installed if needed | ||
| winget install Microsoft.VisualStudio.BuildTools -e --source winget --disable-interactivity --accept-package-agreements --override "--wait --quiet --add Microsoft.VisualStudio.Workload.VCTools --includeRecommended" | ||
| shell: powershell | ||
|
|
||
| - name: Install LLVM with WinGet | ||
| shell: powershell | ||
| run: winget install --id=LLVM.LLVM -e --silent --source winget --disable-interactivity --accept-source-agreements --accept-package-agreements | ||
|
|
||
| - name: Install latest NVIDIA GRID Driver (Windows 11) | ||
| shell: powershell | ||
| run: | | ||
| Write-Host "=== Installing NVIDIA driver ===" | ||
|
|
||
| Write-Host "Downloading driver ..." | ||
| # $driverUrl = "https://us.download.nvidia.com/tesla/591.59/591.59-data-center-tesla-desktop-winserver-2022-2025-dch-international.exe" | ||
| $driverUrl = "https://storage.googleapis.com/nvidia-drivers-us-public/GRID/vGPU19.4/582.16_grid_win10_win11_server2022_server2025_dch_64bit_international.exe" | ||
| $installer = "$env:TEMP\nvidia_driver.exe" | ||
| wget $driverUrl -o $installer | ||
|
|
||
| Write-Host "Running silent install ..." | ||
| $proc = Start-Process -FilePath $installer ` | ||
| -ArgumentList "-s", "-noreboot", "-noeula" ` | ||
| -Wait -PassThru | ||
| Write-Host "Installer exit code: $($proc.ExitCode)" | ||
|
|
||
| if ($proc.ExitCode -notin @(0, 1)) { | ||
| Write-Host "=== Windows Event Log (System, last 20 errors) ===" | ||
| Get-EventLog -LogName System -EntryType Error -Newest 20 | Format-List TimeGenerated, Source, EventID, Message | ||
| Write-Error "NVIDIA driver installation failed with exit code $($proc.ExitCode)" | ||
| exit 1 | ||
| } | ||
|
|
||
| Write-Host "Waiting 15s for driver to register ..." | ||
| Start-Sleep -Seconds 15 | ||
|
|
||
| $env:PATH = [System.Environment]::GetEnvironmentVariable("PATH", "Machine") + ";" + [System.Environment]::GetEnvironmentVariable("PATH", "User") | ||
|
|
||
| Write-Host "Driver installed -- verifying ..." | ||
| nvidia-smi | ||
| if ($LASTEXITCODE -ne 0) { | ||
| Write-Error "nvidia-smi still fails after installation" | ||
| exit 1 | ||
| } | ||
| Write-Host "NVIDIA driver installation verified successfully." | ||
|
|
||
|
|
||
| # run-vulkaninfo: | ||
| # runs-on: ai-run-windows11-gpu | ||
| # steps: | ||
| - name: GPU detection via nvidia-smi and vulkaninfo | ||
| continue-on-error: true | ||
| shell: powershell | ||
| run: | | ||
| Write-Host "=== GPU Device List ===" | ||
| nvidia-smi -L | ||
| Write-Host "" | ||
| Write-Host "=== Running nvidia-smi ===" | ||
| nvidia-smi | ||
| Write-Host "" | ||
| Write-Host "=== Running Vulkaninfo ===" | ||
| vulkaninfo.exe --summary | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.