Skip to content

Commit b4fa7a6

Browse files
committed
refactor: envs
Signed-off-by: thxCode <thxcode0824@gmail.com>
1 parent 60fcf6e commit b4fa7a6

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

gpustack_runner/envs.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
# Global
1111

12-
GPUSTACK_RUNNER_DEFAULT_NAMESPACE: str | None = None
12+
GPUSTACK_RUNNER_DEFAULT_IMAGE_NAMESPACE: str | None = None
1313
"""
1414
Namespace for default runner images.
1515
If not set, it should be "gpustack".
@@ -19,11 +19,12 @@
1919

2020
variables: dict[str, Callable[[], Any]] = {
2121
# Global
22-
"GPUSTACK_RUNNER_DEFAULT_NAMESPACE": lambda: trim_str(
22+
"GPUSTACK_RUNNER_DEFAULT_IMAGE_NAMESPACE": lambda: trim_str(
2323
getenvs(
2424
keys=[
25-
"GPUSTACK_RUNNER_DEFAULT_NAMESPACE",
26-
"GPUSTACK_RUNTIME_DEPLOY_DEFAULT_NAMESPACE", ## Compatible with gpustack/gpustack_runtime.
25+
"GPUSTACK_RUNNER_DEFAULT_IMAGE_NAMESPACE",
26+
## Compatible with gpustack/gpustack_runtime.
27+
"GPUSTACK_RUNTIME_DEPLOY_DEFAULT_IMAGE_NAMESPACE",
2728
],
2829
),
2930
),

gpustack_runner/runner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ def list_runners(**kwargs) -> Runners | list[dict]:
239239
json_list = json.load(f)
240240
runners = []
241241
for item in json_list:
242-
if namespace := envs.GPUSTACK_RUNNER_DEFAULT_NAMESPACE:
242+
if namespace := envs.GPUSTACK_RUNNER_DEFAULT_IMAGE_NAMESPACE:
243243
docker_image = item["docker_image"]
244244
docker_image = docker_image.replace("gpustack/", f"{namespace}/")
245245
item["docker_image"] = docker_image

0 commit comments

Comments
 (0)