Spaces:
Sleeping
Sleeping
Download windows/hwscan-windows.ps1 from build-small-hackathon/jackailocal: direct link, hf CLI and curl.
- Browser
- Download file 1.2 kB
-
https://huggingface.co/spaces/build-small-hackathon/jackailocal/resolve/main/windows/hwscan-windows.ps1
- Command line
-
hf download hf://spaces/build-small-hackathon/jackailocal/windows/hwscan-windows.ps1
-
curl -L -o hwscan-windows.ps1 https://huggingface.co/spaces/build-small-hackathon/jackailocal/resolve/main/windows/hwscan-windows.ps1
1.2 kB
| [CmdletBinding()] | |
| param([string]$OutputPath = "diagnostics\hardware.json") | |
| $ErrorActionPreference = "SilentlyContinue" | |
| $cpu = Get-CimInstance Win32_Processor | Select-Object -First 1 | |
| $memBytes = (Get-CimInstance Win32_ComputerSystem).TotalPhysicalMemory | |
| $gpus = Get-CimInstance Win32_VideoController | ForEach-Object { | |
| [pscustomobject]@{ name=$_.Name; vram_gb=[math]::Round(($_.AdapterRAM / 1GB),1); driver=$_.DriverVersion } | |
| } | |
| $drive = Get-Item (Split-Path -Parent (Split-Path -Parent $PSScriptRoot)) | |
| $profile = [ordered]@{ | |
| collected_at = (Get-Date).ToString("o") | |
| os = "windows" | |
| cpu_name = $cpu.Name | |
| cpu_threads = $cpu.NumberOfLogicalProcessors | |
| ram_gb = [math]::Round($memBytes / 1GB, 1) | |
| gpus = $gpus | |
| vram_gb = [double](($gpus | Measure-Object -Property vram_gb -Maximum).Maximum) | |
| whichllm = $null | |
| } | |
| if (Get-Command whichllm -ErrorAction SilentlyContinue) { | |
| try { $profile.whichllm = (whichllm --top 10 --json | ConvertFrom-Json) } catch { $profile.whichllm_error = $_.Exception.Message } | |
| } | |
| New-Item -ItemType Directory -Force -Path (Split-Path $OutputPath) | Out-Null | |
| $profile | ConvertTo-Json -Depth 20 | Set-Content -Encoding UTF8 $OutputPath | |
| $profile | ConvertTo-Json -Depth 20 | |