Skip to content

Commit 2f61b55

Browse files
committed
fix(webui-docker): mount runtime-data so .onnx models reach the container
`dotnet publish` copies *.metadata.json under runtime-data/models/ (web SDK content convention) but skips *.onnx, so the image had model metadata without the actual artifacts. Autopilot Start would then fail with "Failed to load ONNX model 'model-<id>' for autopilot runtime" even though the host had every weight file. Mount backend/runtime-data into /app/runtime-data so the host's .onnx files are visible to ModelRegistryService. Side effect: trained models no longer require an image rebuild to appear in the registry.
1 parent b5276b3 commit 2f61b55

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/ks0223-web-mac/Makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ LOGS_DIR ?= $(CURDIR)/logs
99
REPO_ROOT ?= $(CURDIR)/../..
1010
SCENARIOS_DIR ?= $(REPO_ROOT)/configs/scenarios
1111

12+
# Trained model artifacts (.onnx + .metadata.json) live on the host so
13+
# they survive image rebuilds and don't bloat the container. Mounted into
14+
# /app/runtime-data so ModelRegistryService finds them at startup.
15+
RUNTIME_DATA_DIR ?= $(CURDIR)/backend/runtime-data
16+
1217
.PHONY: docker-build docker-rebuild docker-run docker-stop docker-update docker-logs docker-health docker-shell docker-pull-base docker-wait
1318

1419
docker-pull-base:
@@ -28,11 +33,12 @@ docker-stop:
2833
-docker rm -f $(CONTAINER)
2934

3035
docker-run: docker-stop
31-
mkdir -p $(LOGS_DIR)
36+
mkdir -p $(LOGS_DIR) $(RUNTIME_DATA_DIR)/models $(RUNTIME_DATA_DIR)/autopilot-recordings
3237
docker run -d --name $(CONTAINER) \
3338
-p $(PORT):5058 -p $(UDP_PORT):5051/udp \
3439
-v $(LOGS_DIR):/app/logs \
3540
-v $(SCENARIOS_DIR):/app/configs/scenarios:ro \
41+
-v $(RUNTIME_DATA_DIR):/app/runtime-data \
3642
--add-host host.docker.internal:host-gateway \
3743
$(IMAGE)
3844

0 commit comments

Comments
 (0)