Skip to content

Commit 9506537

Browse files
committed
refactor: some code
Signed-off-by: thxCode <[email protected]>
1 parent ce6b5d2 commit 9506537

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ package:
103103
if [[ "$(PACKAGE_PUSH)" == "true" ]]; then \
104104
EXTRA_ARGS+=("--push"); \
105105
fi; \
106+
for label in "$${LABELS[@]}"; do \
107+
EXTRA_ARGS+=("--label" "$${label}"); \
108+
done; \
106109
echo "[INFO] Building '$${TAG}' platform 'linux/$(PACKAGE_ARCH)'"; \
107110
set -x; \
108111
docker buildx build \

gpustack_runtime/cmds/deployer.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,6 @@ def run(self):
232232
),
233233
]
234234
execution = ContainerExecution(
235-
privileged=True,
236235
command_script=self.command_script,
237236
args=self.extra_args,
238237
)
@@ -463,7 +462,6 @@ def run(self):
463462
),
464463
]
465464
execution = ContainerExecution(
466-
privileged=True,
467465
command_script=self.command_script,
468466
args=self.extra_args,
469467
)

gpustack_runtime/deployer/docker.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1430,6 +1430,8 @@ def _find_self_container(
14301430
if len(containers) != 1:
14311431
msg = (
14321432
f"Found multiple Containers with the same hostname {self_container_id}, "
1433+
if len(containers) > 1
1434+
else f"Not found Container with hostname {self_container_id}, "
14331435
"please use `--env GPUSTACK_RUNTIME_DEPLOY_MIRRORED_NAME=...` to specify the exact container name"
14341436
)
14351437
raise docker.errors.NotFound(msg)

gpustack_runtime/detector/nvidia.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ def detect(self) -> Devices | None: # noqa: PLR0915
125125
if envs.GPUSTACK_RUNTIME_DETECT_PHYSICAL_INDEX_PRIORITY:
126126
if dev_files is None:
127127
dev_files = get_device_files(pattern=r"nvidia(?P<number>\d+)")
128-
if len(dev_files) > dev_count:
128+
if len(dev_files) >= dev_count:
129129
dev_file = dev_files[dev_idx]
130130
if dev_file.number is not None:
131131
dev_index = dev_file.number

0 commit comments

Comments
 (0)