Skip to content

Commit 0afc3a4

Browse files
committed
chore: print mirrored object detail
Signed-off-by: thxCode <[email protected]>
1 parent 8fc257b commit 0afc3a4

File tree

3 files changed

+18
-2
lines changed

3 files changed

+18
-2
lines changed

gpustack_runtime/deployer/docker.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1162,13 +1162,19 @@ def _prepare_create(self):
11621162
)
11631163
try:
11641164
self_container = self._find_self_container(self_container_id)
1165+
logger.info(
1166+
"Mirrored deployment enabled, using self Container %s for options mirroring",
1167+
self_container.id,
1168+
)
11651169
self_image = self_container.image
11661170
except docker.errors.APIError as e:
11671171
output_log = logger.warning
11681172
if logger.isEnabledFor(logging.DEBUG):
11691173
output_log = logger.exception
11701174
output_log(
1171-
f"Mirrored deployment enabled, but failed to get self Container {self_container_id}, skipping: {e}",
1175+
"Mirrored deployment enabled, but failed to get self Container %s, skipping: %s",
1176+
self_container_id,
1177+
e,
11721178
)
11731179
return
11741180

gpustack_runtime/deployer/kuberentes.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1114,6 +1114,11 @@ def _prepare_create(self):
11141114
logger.warning(
11151115
"Mirrored deployment enabled, but no Container named 'default' found, using the first Container instead",
11161116
)
1117+
logger.info(
1118+
"Mirrored deployment enabled, using self Container %s of self Pod %s for options mirroring",
1119+
self_container.name,
1120+
f"{self_pod_namespace}/{self_pod_name}",
1121+
)
11171122

11181123
# Preprocess mirrored deployment options.
11191124
in_same_namespace = (

pack/Dockerfile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# - PYTHON_VERSION: Version of Python to use.
1616
# - GPUSTACK_RUNTIME_BASE_IMAGE: Base image for the gpustack-runtime stage.
1717
# - GPUSTACK_RUNTIME_ROCM_VERSION: Version of ROCm to vendor libraries from, update this if project dependencies has changed.
18-
# - GPUSTACK_RUNTIME_DOCKER_MIRRORED_NAME_FILTER_LABELS: Line-separated list of labels to filter mirrored images when deploying mirrored deployment.
18+
# - GPUSTACK_RUNTIME_DOCKER_MIRRORED_NAME_FILTER_LABELS: Semicolon-separated list of labels to filter mirrored images when deploying mirrored deployment.
1919
ARG PYTHON_VERSION=3.11
2020
ARG GPUSTACK_RUNTIME_BASE_IMAGE=runtime
2121
ARG GPUSTACK_RUNTIME_ROCM_VERSION=6.2.4
@@ -473,9 +473,14 @@ ENV NVIDIA_DISABLE_REQUIRE="true" \
473473
NVIDIA_VISIBLE_DEVICES="all" \
474474
NVIDIA_DRIVER_CAPABILITIES="compute,utility"
475475

476+
## Active GPUStack runtime mirrored deployment mode,
477+
## if getting an error like, "Found multiple Containers with the same hostname ...",
478+
## please use `--env GPUSTACK_RUNTIME_DEPLOY_MIRRORED_NAME=...` to specify the exact container name.
479+
##
476480
ARG GPUSTACK_RUNTIME_DOCKER_MIRRORED_NAME_FILTER_LABELS
477481

478482
ENV GPUSTACK_RUNTIME_DEPLOY_MIRRORED_DEPLOYMENT="true" \
479483
GPUSTACK_RUNTIME_DOCKER_MIRRORED_NAME_FILTER_LABELS="${GPUSTACK_RUNTIME_DOCKER_MIRRORED_NAME_FILTER_LABELS}"
484+
480485
WORKDIR /
481486
ENTRYPOINT [ "tini", "--" ]

0 commit comments

Comments
 (0)