chore(worker): namespace Mission Core containers
This commit is contained in:
@@ -12,12 +12,13 @@ param(
|
||||
[ValidateRange(1, 1000)] [int]$FreeGiBFloor = 360,
|
||||
[string]$RuntimeRoot = "D:\NDC_MISSIONCORE\runtime",
|
||||
[string]$ModelRoot = "D:\NDC_MISSIONCORE\runtime\models\yolox_s",
|
||||
[string]$TritonContainer = "mission-core-triton",
|
||||
[string]$TritonContainer = "ndc-mission-core-triton",
|
||||
[string]$ContainerImage = "nvcr.io/nvidia/tritonserver:26.06-py3"
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
$ProgressPreference = "SilentlyContinue"
|
||||
. (Join-Path $PSScriptRoot "MissionCoreDockerNames.ps1")
|
||||
|
||||
function Assert-LastExitCode([string]$Operation) {
|
||||
if ($LASTEXITCODE -ne 0) { throw "$Operation failed with exit code $LASTEXITCODE" }
|
||||
@@ -131,6 +132,10 @@ $freeBytesBefore = Assert-FreeSpace "preflight" $workingSetReserve
|
||||
|
||||
& docker image inspect $ContainerImage *> $null
|
||||
Assert-LastExitCode "Existing container image inspection"
|
||||
$TritonContainer = Resolve-NdcDockerContainerName `
|
||||
-RequestedName $TritonContainer `
|
||||
-CanonicalName $script:NdcMissionCoreTritonContainer `
|
||||
-LegacyNames @("mission-core-triton")
|
||||
$tritonState = docker inspect --format "{{.State.Running}}" $TritonContainer
|
||||
Assert-LastExitCode "Triton container inspection"
|
||||
if ($tritonState.Trim().ToLowerInvariant() -ne "true") { throw "LAB E10 requires the existing Triton container" }
|
||||
|
||||
@@ -3,7 +3,7 @@ param(
|
||||
[switch]$TokenStdin,
|
||||
[ValidatePattern("^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$")]
|
||||
[string]$RequestId = ("physical-k1-shadow-{0}" -f [Guid]::NewGuid().ToString("N")),
|
||||
[string]$PersistentContainer = "mission-core-perception-worker",
|
||||
[string]$PersistentContainer = "ndc-mission-core-perception-worker",
|
||||
[string]$PersistentOutputRoot = "D:\NDC_MISSIONCORE\runtime\derived\.perception-persistent-publish",
|
||||
[ValidateRange(1024, 65535)] [int]$PersistentPort = 18020,
|
||||
[ValidateRange(5, 3600)] [int]$MaximumDurationSeconds = 20,
|
||||
@@ -12,6 +12,7 @@ param(
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
$ProgressPreference = "SilentlyContinue"
|
||||
. (Join-Path $PSScriptRoot "MissionCoreDockerNames.ps1")
|
||||
|
||||
function Assert-LastExitCode([string]$Operation) {
|
||||
if ($LASTEXITCODE -ne 0) { throw "$Operation failed with exit code $LASTEXITCODE" }
|
||||
@@ -35,6 +36,10 @@ if (-not $token -or $token.Length -lt 40 -or $token.Length -gt 512) {
|
||||
}
|
||||
|
||||
$outputRoot = Resolve-DDirectory $PersistentOutputRoot "Persistent output root"
|
||||
$PersistentContainer = Resolve-NdcDockerContainerName `
|
||||
-RequestedName $PersistentContainer `
|
||||
-CanonicalName $script:NdcMissionCorePerceptionContainer `
|
||||
-LegacyNames @("mission-core-perception-worker")
|
||||
$freeBefore = Get-DFreeBytes
|
||||
if ($freeBefore -lt ([int64]$FreeGiBFloor * 1GB + 512MB)) {
|
||||
throw "D: lacks the guarded persistent-run reserve"
|
||||
|
||||
@@ -21,8 +21,8 @@ param(
|
||||
[string]$RuntimeRoot = "D:\NDC_MISSIONCORE\runtime",
|
||||
[string]$ModelRoot = "D:\NDC_MISSIONCORE\runtime\models\yolox_s",
|
||||
[string]$MediaRuntimeRoot = "D:\NDC_MISSIONCORE\runtime\derived\perception-e15-media-pyav180-lz445-v1",
|
||||
[string]$TritonContainer = "mission-core-triton",
|
||||
[string]$PersistentContainer = "mission-core-perception-worker",
|
||||
[string]$TritonContainer = "ndc-mission-core-triton",
|
||||
[string]$PersistentContainer = "ndc-mission-core-perception-worker",
|
||||
[string]$PersistentOutputRoot = "D:\NDC_MISSIONCORE\runtime\derived\.perception-persistent-publish",
|
||||
[ValidateRange(1024, 65535)] [int]$PersistentPort = 18020,
|
||||
[string]$ContainerImage = "nvcr.io/nvidia/tritonserver:26.06-py3@sha256:58df7489c3f2276f9591d500a012dee03e23d35543ce3c390b4c001e6bf90794"
|
||||
@@ -30,6 +30,7 @@ param(
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
$ProgressPreference = "SilentlyContinue"
|
||||
. (Join-Path $PSScriptRoot "MissionCoreDockerNames.ps1")
|
||||
|
||||
function Assert-LastExitCode([string]$Operation) {
|
||||
if ($LASTEXITCODE -ne 0) { throw "$Operation failed with exit code $LASTEXITCODE" }
|
||||
@@ -213,6 +214,14 @@ $freeBytesBefore = Assert-FreeSpace "preflight" 512MB
|
||||
|
||||
& docker image inspect $ContainerImage *> $null
|
||||
Assert-LastExitCode "Pinned container image inspection"
|
||||
$TritonContainer = Resolve-NdcDockerContainerName `
|
||||
-RequestedName $TritonContainer `
|
||||
-CanonicalName $script:NdcMissionCoreTritonContainer `
|
||||
-LegacyNames @("mission-core-triton")
|
||||
$PersistentContainer = Resolve-NdcDockerContainerName `
|
||||
-RequestedName $PersistentContainer `
|
||||
-CanonicalName $script:NdcMissionCorePerceptionContainer `
|
||||
-LegacyNames @("mission-core-perception-worker")
|
||||
$tritonState = docker inspect --format "{{.State.Running}}" $TritonContainer
|
||||
Assert-LastExitCode "Triton container inspection"
|
||||
if ($tritonState.Trim().ToLowerInvariant() -ne "true") {
|
||||
@@ -336,6 +345,10 @@ if ($PersistentService) {
|
||||
|
||||
$serveArgs = @(
|
||||
"run", "--detach", "--name", $PersistentContainer,
|
||||
"--label", "com.nodedc.product=mission-core",
|
||||
"--label", "com.nodedc.stack=ndc-mission-core-compute",
|
||||
"--label", "com.nodedc.role=perception-worker",
|
||||
"--label", "com.nodedc.managed-by=mission-core-worker",
|
||||
"--label", "missioncore.role=perception-persistent-worker",
|
||||
"--label", ("missioncore.runner.sha256={0}" -f $runnerSha256),
|
||||
"--label", ("missioncore.live.sha256={0}" -f $liveProfileSha256),
|
||||
|
||||
@@ -25,13 +25,14 @@ param(
|
||||
|
||||
[string]$ModelRoot = "D:\NDC_MISSIONCORE\runtime\models\yolox_s",
|
||||
|
||||
[string]$TritonContainer = "mission-core-triton",
|
||||
[string]$TritonContainer = "ndc-mission-core-triton",
|
||||
|
||||
[string]$ContainerImage = "nvcr.io/nvidia/tritonserver:26.06-py3"
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
$ProgressPreference = "SilentlyContinue"
|
||||
. (Join-Path $PSScriptRoot "MissionCoreDockerNames.ps1")
|
||||
|
||||
function Assert-LastExitCode {
|
||||
param([string]$Operation)
|
||||
@@ -188,6 +189,10 @@ $freeBytesBefore = Assert-FreeSpace "preflight" $workingSetReserve
|
||||
|
||||
& docker image inspect $ContainerImage *> $null
|
||||
Assert-LastExitCode "Existing container image inspection"
|
||||
$TritonContainer = Resolve-NdcDockerContainerName `
|
||||
-RequestedName $TritonContainer `
|
||||
-CanonicalName $script:NdcMissionCoreTritonContainer `
|
||||
-LegacyNames @("mission-core-triton")
|
||||
$tritonState = docker inspect --format "{{.State.Running}}" $TritonContainer
|
||||
Assert-LastExitCode "Triton container inspection"
|
||||
if ($tritonState.Trim().ToLowerInvariant() -ne "true") {
|
||||
|
||||
@@ -25,13 +25,14 @@ param(
|
||||
|
||||
[string]$ModelRoot = "D:\NDC_MISSIONCORE\runtime\models\yolox_s",
|
||||
|
||||
[string]$TritonContainer = "mission-core-triton",
|
||||
[string]$TritonContainer = "ndc-mission-core-triton",
|
||||
|
||||
[string]$ContainerImage = "nvcr.io/nvidia/tritonserver:26.06-py3"
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
$ProgressPreference = "SilentlyContinue"
|
||||
. (Join-Path $PSScriptRoot "MissionCoreDockerNames.ps1")
|
||||
|
||||
function Assert-LastExitCode {
|
||||
param([string]$Operation)
|
||||
@@ -186,6 +187,10 @@ $freeBytesBefore = Assert-FreeSpace "preflight" $workingSetReserve
|
||||
|
||||
& docker image inspect $ContainerImage *> $null
|
||||
Assert-LastExitCode "Existing container image inspection"
|
||||
$TritonContainer = Resolve-NdcDockerContainerName `
|
||||
-RequestedName $TritonContainer `
|
||||
-CanonicalName $script:NdcMissionCoreTritonContainer `
|
||||
-LegacyNames @("mission-core-triton")
|
||||
$tritonState = docker inspect --format "{{.State.Running}}" $TritonContainer
|
||||
Assert-LastExitCode "Triton container inspection"
|
||||
if ($tritonState.Trim().ToLowerInvariant() -ne "true") {
|
||||
|
||||
@@ -11,12 +11,13 @@ param(
|
||||
[ValidateRange(1, 1000)] [int]$FreeGiBFloor = 360,
|
||||
[string]$RuntimeRoot = "D:\NDC_MISSIONCORE\runtime",
|
||||
[string]$ModelRoot = "D:\NDC_MISSIONCORE\runtime\models\yolox_s",
|
||||
[string]$TritonContainer = "mission-core-triton",
|
||||
[string]$TritonContainer = "ndc-mission-core-triton",
|
||||
[string]$ContainerImage = "nvcr.io/nvidia/tritonserver:26.06-py3"
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
$ProgressPreference = "SilentlyContinue"
|
||||
. (Join-Path $PSScriptRoot "MissionCoreDockerNames.ps1")
|
||||
|
||||
function Assert-LastExitCode {
|
||||
param([string]$Operation)
|
||||
@@ -140,6 +141,10 @@ $freeBytesBefore = Assert-FreeSpace "preflight" $workingSetReserve
|
||||
|
||||
& docker image inspect $ContainerImage *> $null
|
||||
Assert-LastExitCode "Existing container image inspection"
|
||||
$TritonContainer = Resolve-NdcDockerContainerName `
|
||||
-RequestedName $TritonContainer `
|
||||
-CanonicalName $script:NdcMissionCoreTritonContainer `
|
||||
-LegacyNames @("mission-core-triton")
|
||||
$tritonState = docker inspect --format "{{.State.Running}}" $TritonContainer
|
||||
Assert-LastExitCode "Triton container inspection"
|
||||
if ($tritonState.Trim().ToLowerInvariant() -ne "true") {
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
$script:NdcMissionCoreTritonContainer = "ndc-mission-core-triton"
|
||||
$script:NdcMissionCorePerceptionContainer = "ndc-mission-core-perception-worker"
|
||||
|
||||
function Resolve-NdcDockerContainerName {
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
[Parameter(Mandatory = $true)] [string]$RequestedName,
|
||||
[Parameter(Mandatory = $true)] [string]$CanonicalName,
|
||||
[string[]]$LegacyNames = @()
|
||||
)
|
||||
|
||||
$knownNames = @($CanonicalName) + @($LegacyNames)
|
||||
$candidates = if ($RequestedName -in $knownNames) {
|
||||
@($RequestedName) + @($knownNames | Where-Object { $_ -ne $RequestedName })
|
||||
}
|
||||
else {
|
||||
@($RequestedName)
|
||||
}
|
||||
|
||||
foreach ($candidate in $candidates) {
|
||||
& docker inspect $candidate *> $null
|
||||
if ($LASTEXITCODE -eq 0) {
|
||||
return $candidate
|
||||
}
|
||||
}
|
||||
|
||||
# Creation paths need the requested canonical name even before it exists.
|
||||
return $RequestedName
|
||||
}
|
||||
Reference in New Issue
Block a user