mirror of
https://github.com/OLmatter/glm-coding-helper.git
synced 2026-10-07 17:18:45 +08:00
24 lines
596 B
PowerShell
24 lines
596 B
PowerShell
param(
|
|
[ValidateSet("auto", "cpu", "gpu", "both")]
|
|
[string]$Target = "auto",
|
|
[switch]$Recreate,
|
|
[switch]$SkipInstall,
|
|
[switch]$NoSmokeTest,
|
|
[string[]]$PipArg = @()
|
|
)
|
|
|
|
$ErrorActionPreference = "Stop"
|
|
$Root = Split-Path -Parent $PSScriptRoot
|
|
Set-Location $Root
|
|
|
|
$argsList = @("scripts\setup_backend.py", "--target", $Target)
|
|
if ($Recreate) { $argsList += "--recreate" }
|
|
if ($SkipInstall) { $argsList += "--skip-install" }
|
|
if ($NoSmokeTest) { $argsList += "--no-smoke-test" }
|
|
foreach ($arg in $PipArg) {
|
|
$argsList += "--pip-arg"
|
|
$argsList += $arg
|
|
}
|
|
|
|
python @argsList
|