feat(simulation): add Worker AI polygon runtime and terrain navigation
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
param([string]$Root = 'D:\NDC_MISSIONCORE\runtime\simulation')
|
||||
$ErrorActionPreference = 'Continue'
|
||||
$base = 'sha256:d9b9c842bf8f0bf5208d8568d35f41b69d6e4a9ed74f31dedbcd455f1f7f263f'
|
||||
$actual = docker image inspect 'ndc-ai-polygon-cmu:rectangle-v3' --format '{{.Id}}'
|
||||
if ($LASTEXITCODE -ne 0 -or $actual.Trim() -ne $base) { throw 'Prepare the pinned rectangular CMU image first' }
|
||||
$endpoint = docker context inspect --format '{{.Endpoints.docker.Host}}'
|
||||
if ($LASTEXITCODE -ne 0) { throw 'Docker endpoint unavailable' }
|
||||
$config = Join-Path $Root 'state\connectivity-public-build'
|
||||
New-Item -ItemType Directory -Force $config | Out-Null
|
||||
[IO.File]::WriteAllText((Join-Path $config 'config.json'), '{"auths":{"https://index.docker.io/v1/":{}}}')
|
||||
$env:DOCKER_CONFIG = $config
|
||||
$env:BUILDX_CONFIG = Join-Path $config 'buildx'
|
||||
docker --config $config --host $endpoint.Trim() build --progress plain -t ndc-ai-polygon-cmu:connectivity-v1 -f (Join-Path $PSScriptRoot 'Dockerfile.connectivity') $PSScriptRoot
|
||||
if ($LASTEXITCODE -ne 0) { throw 'Terrain connectivity build failed' }
|
||||
$image = docker --config $config --host $endpoint.Trim() image inspect ndc-ai-polygon-cmu:connectivity-v1 --format '{{.Id}}'
|
||||
if ($LASTEXITCODE -ne 0) { throw 'Built image unavailable' }
|
||||
@{base_image=$base; image=$image.Trim(); source_sha256=(Get-FileHash (Join-Path $PSScriptRoot 'terrain_connectivity.cpp') -Algorithm SHA256).Hash.ToLower(); installed_at=[DateTime]::UtcNow.ToString('o')} | ConvertTo-Json
|
||||
Reference in New Issue
Block a user