diff --git a/docker-compose.yml b/docker-compose.yml index 9eb0ea4be..c4493ac57 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -85,6 +85,7 @@ services: dockerfile: ../../docker/continuum-core-vulkan.Dockerfile additional_contexts: avatars: ./src/models/avatars + shared: ./src/shared shared-generated: ./src/shared/generated args: # --no-default-features excludes livekit-webrtc (handled by livekit-bridge). diff --git a/docker/continuum-core-cuda.Dockerfile b/docker/continuum-core-cuda.Dockerfile index 224c4d6f0..23f8cdcfd 100644 --- a/docker/continuum-core-cuda.Dockerfile +++ b/docker/continuum-core-cuda.Dockerfile @@ -86,6 +86,10 @@ COPY . . # from WORKDIR /app. CI must pass `build-contexts: shared-generated=./src/shared/generated`. COPY --from=shared-generated entity_schemas.json /shared/generated/entity_schemas.json +# Model registry SSOT used by candle_adapter.rs include_str!: +# ../../../../shared/models.json resolves to /shared/models.json here. +COPY --from=shared models.json /shared/models.json + # Fail fast if the host forgot to init submodules. Without this, cmake's # CMakeLists-not-found error surfaces deep inside the CUDA build — # terrible signal-to-noise. See issue #893. diff --git a/docker/continuum-core-vulkan.Dockerfile b/docker/continuum-core-vulkan.Dockerfile index 53616f625..62b6baa91 100644 --- a/docker/continuum-core-vulkan.Dockerfile +++ b/docker/continuum-core-vulkan.Dockerfile @@ -97,6 +97,10 @@ COPY . . # CI must pass `build-contexts: shared-generated=./src/shared/generated`. COPY --from=shared-generated entity_schemas.json /shared/generated/entity_schemas.json +# Model registry SSOT used by candle_adapter.rs include_str!: +# ../../../../shared/models.json resolves to /shared/models.json here. +COPY --from=shared models.json /shared/models.json + # Fail fast if submodules are uninitialized. RUN test -f vendor/llama.cpp/CMakeLists.txt || ( \ echo "ERROR: vendor/llama.cpp is empty — host submodule not initialized." >&2 && \ diff --git a/docker/continuum-core.Dockerfile b/docker/continuum-core.Dockerfile index 71952e667..d4ab35cb8 100644 --- a/docker/continuum-core.Dockerfile +++ b/docker/continuum-core.Dockerfile @@ -57,6 +57,11 @@ COPY . . # which resolves to /shared/generated/ from WORKDIR /app COPY --from=shared-generated entity_schemas.json /shared/generated/entity_schemas.json +# src/shared/models.json is the model-registry SSOT. candle_adapter.rs embeds it +# via include_str!("../../../../shared/models.json"), which resolves to +# /shared/models.json from this Docker build layout. +COPY --from=shared models.json /shared/models.json + # Fail fast if the host forgot to init submodules. Without this, cmake's # CMakeLists-not-found error surfaces ~15 min into the cargo build — # terrible signal-to-noise. See issue #893. diff --git a/scripts/push-image.sh b/scripts/push-image.sh index fe4dc2d5b..a71a095da 100755 --- a/scripts/push-image.sh +++ b/scripts/push-image.sh @@ -275,6 +275,7 @@ docker buildx build \ --file "$DOCKERFILE" \ --build-arg "GPU_FEATURES=$GPU_FEATURES" \ --build-arg "GIT_SHA=$BUILD_SHA" \ + --build-context "shared=src/shared" \ --build-context "shared-generated=src/shared/generated" \ --tag "$TAG_SHA" \ --label "org.opencontainers.image.revision=$BUILD_SHA" \ @@ -298,6 +299,7 @@ docker buildx build \ --file "$DOCKERFILE" \ --build-arg "GPU_FEATURES=$GPU_FEATURES" \ --build-arg "GIT_SHA=$BUILD_SHA" \ + --build-context "shared=src/shared" \ --build-context "shared-generated=src/shared/generated" \ "${TAGS[@]}" \ --label "org.opencontainers.image.revision=$BUILD_SHA" \