gpustack-runtime 0.1.38.post4__py3-none-any.whl → 0.1.39__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- gpustack_runtime/_version.py +2 -2
- gpustack_runtime/_version_appendix.py +1 -1
- gpustack_runtime/deployer/__init__.py +24 -49
- gpustack_runtime/deployer/__patches__.py +455 -0
- gpustack_runtime/deployer/__types__.py +60 -27
- gpustack_runtime/deployer/docker.py +115 -41
- gpustack_runtime/deployer/kuberentes.py +23 -22
- gpustack_runtime/deployer/podman.py +2114 -0
- gpustack_runtime/detector/amd.py +4 -13
- gpustack_runtime/detector/hygon.py +1 -1
- gpustack_runtime/detector/nvidia.py +1 -1
- gpustack_runtime/detector/pyhsa/__init__.py +7 -7
- gpustack_runtime/detector/pyrocmsmi/__init__.py +9 -3
- gpustack_runtime/envs.py +217 -46
- {gpustack_runtime-0.1.38.post4.dist-info → gpustack_runtime-0.1.39.dist-info}/METADATA +6 -4
- {gpustack_runtime-0.1.38.post4.dist-info → gpustack_runtime-0.1.39.dist-info}/RECORD +19 -17
- {gpustack_runtime-0.1.38.post4.dist-info → gpustack_runtime-0.1.39.dist-info}/WHEEL +0 -0
- {gpustack_runtime-0.1.38.post4.dist-info → gpustack_runtime-0.1.39.dist-info}/entry_points.txt +0 -0
- {gpustack_runtime-0.1.38.post4.dist-info → gpustack_runtime-0.1.39.dist-info}/licenses/LICENSE +0 -0
gpustack_runtime/detector/amd.py
CHANGED
|
@@ -107,12 +107,8 @@ class AMDDetector(Detector):
|
|
|
107
107
|
asic_serial = dev_gpu_asic_info.get("asic_serial")
|
|
108
108
|
dev_uuid = f"GPU-{(asic_serial[2:]).lower()}"
|
|
109
109
|
else:
|
|
110
|
-
dev_uuid = ""
|
|
111
|
-
|
|
112
|
-
dev_uuid = (
|
|
113
|
-
f"GPU-{pyrocmsmi.rsmi_dev_unique_id_get(dev_idx)[2:]}"
|
|
114
|
-
)
|
|
115
|
-
dev_hsa_agent = hsa_agents.get(dev_uuid, pyhsa.Agent())
|
|
110
|
+
dev_uuid = f"GPU-{pyrocmsmi.rsmi_dev_unique_id_get(dev_idx)[2:]}"
|
|
111
|
+
dev_hsa_agent = hsa_agents.get(dev_uuid)
|
|
116
112
|
|
|
117
113
|
dev_gpu_driver_info = pyamdsmi.amdsmi_get_gpu_driver_info(dev)
|
|
118
114
|
dev_driver_ver = dev_gpu_driver_info.get("driver_version")
|
|
@@ -123,13 +119,8 @@ class AMDDetector(Detector):
|
|
|
123
119
|
|
|
124
120
|
dev_cc = dev_hsa_agent.compute_capability
|
|
125
121
|
if not dev_cc:
|
|
126
|
-
|
|
127
|
-
dev_cc =
|
|
128
|
-
else:
|
|
129
|
-
with contextlib.suppress(pyrocmsmi.ROCMSMIError):
|
|
130
|
-
dev_cc = pyrocmsmi.rsmi_dev_target_graphics_version_get(
|
|
131
|
-
dev_idx,
|
|
132
|
-
)
|
|
122
|
+
with contextlib.suppress(pyrocmsmi.ROCMSMIError):
|
|
123
|
+
dev_cc = pyrocmsmi.rsmi_dev_target_graphics_version_get(dev_idx)
|
|
133
124
|
|
|
134
125
|
dev_bdf = None
|
|
135
126
|
dev_card_id = None
|
|
@@ -108,7 +108,7 @@ class HygonDetector(Detector):
|
|
|
108
108
|
dev_index = dev_idx
|
|
109
109
|
|
|
110
110
|
dev_uuid = f"GPU-{pyrocmsmi.rsmi_dev_unique_id_get(dev_idx)[2:]}"
|
|
111
|
-
dev_hsa_agent = hsa_agents.get(dev_uuid
|
|
111
|
+
dev_hsa_agent = hsa_agents.get(dev_uuid)
|
|
112
112
|
|
|
113
113
|
dev_name = dev_hsa_agent.name
|
|
114
114
|
if not dev_name:
|
|
@@ -446,13 +446,13 @@ def has_agent_get_asic_family_id(agent):
|
|
|
446
446
|
|
|
447
447
|
@dataclass
|
|
448
448
|
class Agent:
|
|
449
|
-
device_type: int
|
|
450
|
-
device_id: str
|
|
451
|
-
uuid: str
|
|
452
|
-
name: str
|
|
453
|
-
compute_capability: str
|
|
454
|
-
compute_units: int
|
|
455
|
-
asic_family_id: int | None
|
|
449
|
+
device_type: int
|
|
450
|
+
device_id: str
|
|
451
|
+
uuid: str
|
|
452
|
+
name: str
|
|
453
|
+
compute_capability: str
|
|
454
|
+
compute_units: int
|
|
455
|
+
asic_family_id: int | None
|
|
456
456
|
|
|
457
457
|
|
|
458
458
|
def get_agents() -> list[Agent]:
|
|
@@ -223,9 +223,15 @@ def rsmi_dev_target_graphics_version_get(device=0):
|
|
|
223
223
|
c_version = c_uint64()
|
|
224
224
|
ret = rocmsmiLib.rsmi_dev_target_graphics_version_get(device, byref(c_version))
|
|
225
225
|
_rocmsmiCheckReturn(ret)
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
226
|
+
version = str(c_version.value)
|
|
227
|
+
if len(version) == 4:
|
|
228
|
+
dev_name = rsmi_dev_name_get(device)
|
|
229
|
+
if "Instinct MI2" in dev_name:
|
|
230
|
+
hex_part = str(hex(int(version[2:]))).replace("0x", "")
|
|
231
|
+
version = version[:2] + hex_part
|
|
232
|
+
else:
|
|
233
|
+
version = str(c_version.value // 10 + c_version.value % 10)
|
|
234
|
+
return "gfx" + version
|
|
229
235
|
except AttributeError:
|
|
230
236
|
return None
|
|
231
237
|
|
gpustack_runtime/envs.py
CHANGED
|
@@ -60,26 +60,7 @@ if TYPE_CHECKING:
|
|
|
60
60
|
## Deployer
|
|
61
61
|
GPUSTACK_RUNTIME_DEPLOY: str | None = None
|
|
62
62
|
"""
|
|
63
|
-
Deployer to use (options: Auto, Docker, Kubernetes).
|
|
64
|
-
"""
|
|
65
|
-
GPUSTACK_RUNTIME_DEPLOY_DEFAULT_REGISTRY: str | None = None
|
|
66
|
-
"""
|
|
67
|
-
Default container registry for deployer to pull images from.
|
|
68
|
-
If not set, it should be "docker.io".
|
|
69
|
-
If the image name already contains a registry, this setting will be ignored.
|
|
70
|
-
"""
|
|
71
|
-
GPUSTACK_RUNTIME_DEPLOY_DEFAULT_NAMESPACE: str | None = None
|
|
72
|
-
"""
|
|
73
|
-
Namespace for default runner images.
|
|
74
|
-
If not set, it should be "gpustack".
|
|
75
|
-
"""
|
|
76
|
-
GPUSTACK_RUNTIME_DEPLOY_DEFAULT_REGISTRY_USERNAME: str | None = None
|
|
77
|
-
"""
|
|
78
|
-
Username for the default container registry.
|
|
79
|
-
"""
|
|
80
|
-
GPUSTACK_RUNTIME_DEPLOY_DEFAULT_REGISTRY_PASSWORD: str | None = None
|
|
81
|
-
"""
|
|
82
|
-
Password for the default container registry.
|
|
63
|
+
Deployer to use (options: Auto, Docker, Kubernetes, Podman).
|
|
83
64
|
"""
|
|
84
65
|
GPUSTACK_RUNTIME_DEPLOY_API_CALL_ERROR_DETAIL: bool = True
|
|
85
66
|
"""
|
|
@@ -89,7 +70,7 @@ if TYPE_CHECKING:
|
|
|
89
70
|
"""
|
|
90
71
|
Enable printing the conversion during deployment.
|
|
91
72
|
GPUStack Runtime provides a unified Workload definition API,
|
|
92
|
-
which will be converted to the specific Container Runtime API calls(e.g., Docker SDK, Kubernetes API).
|
|
73
|
+
which will be converted to the specific Container Runtime API calls(e.g., Docker SDK, Kubernetes API, Podman SDK).
|
|
93
74
|
Enabling this option will print the final converted API calls in INFO log for debugging purposes.
|
|
94
75
|
"""
|
|
95
76
|
GPUSTACK_RUNTIME_DEPLOY_ASYNC: bool = True
|
|
@@ -138,6 +119,25 @@ if TYPE_CHECKING:
|
|
|
138
119
|
"""
|
|
139
120
|
Correct the gpustack-runner image by rendering it with the host's detection.
|
|
140
121
|
"""
|
|
122
|
+
GPUSTACK_RUNTIME_DEPLOY_DEFAULT_IMAGE_REGISTRY: str | None = None
|
|
123
|
+
"""
|
|
124
|
+
Default container registry for deployer to pull images from.
|
|
125
|
+
If not set, it should be "docker.io".
|
|
126
|
+
If the image name already contains a registry, this setting will be ignored.
|
|
127
|
+
"""
|
|
128
|
+
GPUSTACK_RUNTIME_DEPLOY_DEFAULT_IMAGE_NAMESPACE: str | None = None
|
|
129
|
+
"""
|
|
130
|
+
Namespace for default runner images.
|
|
131
|
+
If not set, it should be "gpustack".
|
|
132
|
+
"""
|
|
133
|
+
GPUSTACK_RUNTIME_DEPLOY_DEFAULT_IMAGE_REGISTRY_USERNAME: str | None = None
|
|
134
|
+
"""
|
|
135
|
+
Username for the default container registry.
|
|
136
|
+
"""
|
|
137
|
+
GPUSTACK_RUNTIME_DEPLOY_DEFAULT_IMAGE_REGISTRY_PASSWORD: str | None = None
|
|
138
|
+
"""
|
|
139
|
+
Password for the default container registry.
|
|
140
|
+
"""
|
|
141
141
|
GPUSTACK_RUNTIME_DEPLOY_IMAGE_PULL_POLICY: str | None = None
|
|
142
142
|
"""
|
|
143
143
|
Image pull policy for the deployer (e.g., Always, IfNotPresent, Never).
|
|
@@ -152,12 +152,21 @@ if TYPE_CHECKING:
|
|
|
152
152
|
which is used to tell deployer do a device detection and get the corresponding resource key before mapping.
|
|
153
153
|
e.g., "gpustack.ai/devices".
|
|
154
154
|
"""
|
|
155
|
+
GPUSTACK_RUNTIME_DEPLOY_RESOURCE_KEY_MAP_CONTAINER_DEVICE_INTERFACES: (
|
|
156
|
+
dict[str, str] | None
|
|
157
|
+
) = None
|
|
158
|
+
"""
|
|
159
|
+
Manual mapping of container device interfaces,
|
|
160
|
+
which is used to tell the Container Runtime which devices to inject into the container,
|
|
161
|
+
e.g., `{"nvidia.com/devices": "nvidia.com/gpu", "amd.com/devices": "amd.com/gpu"}`.
|
|
162
|
+
The key is the resource key, and the value is the Container Device Interface(CDI) key.
|
|
163
|
+
"""
|
|
155
164
|
GPUSTACK_RUNTIME_DEPLOY_RESOURCE_KEY_MAP_RUNTIME_VISIBLE_DEVICES: (
|
|
156
165
|
dict[str, str] | None
|
|
157
166
|
) = None
|
|
158
167
|
"""
|
|
159
168
|
Manual mapping of runtime visible devices environment variables,
|
|
160
|
-
which is used to tell the Container Runtime which
|
|
169
|
+
which is used to tell the Container Runtime which devices to inject into the container,
|
|
161
170
|
e.g., `{"nvidia.com/devices": "NVIDIA_VISIBLE_DEVICES", "amd.com/devices": "AMD_VISIBLE_DEVICES"}`.
|
|
162
171
|
The key is the resource key, and the value is the environment variable name.
|
|
163
172
|
"""
|
|
@@ -166,7 +175,7 @@ if TYPE_CHECKING:
|
|
|
166
175
|
) = None
|
|
167
176
|
"""
|
|
168
177
|
Manual mapping of backend visible devices environment variables,
|
|
169
|
-
which is used to tell the Device Runtime (e.g., ROCm, CUDA, OneAPI) which
|
|
178
|
+
which is used to tell the Device Runtime (e.g., ROCm, CUDA, OneAPI) which devices to use inside the container,
|
|
170
179
|
e.g., `{"nvidia.com/devices": ["CUDA_VISIBLE_DEVICES"], "amd.com/devices": ["ROCR_VISIBLE_DEVICES"]}`.
|
|
171
180
|
The key is the resource key, and the value is a list of environment variable names.
|
|
172
181
|
"""
|
|
@@ -195,6 +204,12 @@ if TYPE_CHECKING:
|
|
|
195
204
|
# Deployer
|
|
196
205
|
|
|
197
206
|
## Docker
|
|
207
|
+
GPUSTACK_RUNTIME_DOCKER_HOST: str | None = None
|
|
208
|
+
"""
|
|
209
|
+
Host for Docker connection.
|
|
210
|
+
Used to override the default Docker host.
|
|
211
|
+
Default is `http+unix:///var/run/docker.sock`.
|
|
212
|
+
"""
|
|
198
213
|
GPUSTACK_RUNTIME_DOCKER_MIRRORED_NAME_FILTER_LABELS: dict[str, str] | None = None
|
|
199
214
|
"""
|
|
200
215
|
Filter labels for selecting the mirrored deployer container in Docker.
|
|
@@ -207,11 +222,11 @@ if TYPE_CHECKING:
|
|
|
207
222
|
"""
|
|
208
223
|
GPUSTACK_RUNTIME_DOCKER_PAUSE_IMAGE: str | None = None
|
|
209
224
|
"""
|
|
210
|
-
|
|
225
|
+
Container image used for the pause container in Docker.
|
|
211
226
|
"""
|
|
212
227
|
GPUSTACK_RUNTIME_DOCKER_UNHEALTHY_RESTART_IMAGE: str | None = None
|
|
213
228
|
"""
|
|
214
|
-
|
|
229
|
+
Container image used for unhealthy restart container in Docker.
|
|
215
230
|
"""
|
|
216
231
|
GPUSTACK_RUNTIME_DOCKER_EPHEMERAL_FILES_DIR: Path | None = None
|
|
217
232
|
"""
|
|
@@ -219,7 +234,13 @@ if TYPE_CHECKING:
|
|
|
219
234
|
"""
|
|
220
235
|
GPUSTACK_RUNTIME_DOCKER_MUTE_ORIGINAL_HEALTHCHECK: bool = True
|
|
221
236
|
"""
|
|
222
|
-
Mute the original healthcheck of the container.
|
|
237
|
+
Mute the original healthcheck of the container in Docker.
|
|
238
|
+
"""
|
|
239
|
+
GPUSTACK_RUNTIME_DOCKER_RESOURCE_INJECTION_POLICY: str | None = None
|
|
240
|
+
"""
|
|
241
|
+
Resource injection policy for the Docker deployer (e.g., Env, CDI).
|
|
242
|
+
`Env`: Injects resources using standard environment variable, based on `GPUSTACK_RUNTIME_DEPLOY_RESOURCE_KEY_MAP_RUNTIME_VISIBLE_DEVICES`.
|
|
243
|
+
`CDI`: Injects resources using CDI, based on `GPUSTACK_RUNTIME_DEPLOY_RESOURCE_KEY_MAP_CONTAINER_DEVICE_INTERFACES`.
|
|
223
244
|
"""
|
|
224
245
|
## Kubernetes
|
|
225
246
|
GPUSTACK_RUNTIME_KUBERNETES_NODE_NAME: str | None = None
|
|
@@ -247,6 +268,45 @@ if TYPE_CHECKING:
|
|
|
247
268
|
"""
|
|
248
269
|
Deletion propagation policy for Kubernetes resources (e.g., Foreground, Background, Orphan).
|
|
249
270
|
"""
|
|
271
|
+
## Podman
|
|
272
|
+
GPUSTACK_RUNTIME_PODMAN_HOST: str | None = None
|
|
273
|
+
"""
|
|
274
|
+
Host for Podman connection.
|
|
275
|
+
Used to override the default Podman host.
|
|
276
|
+
Default is `http+unix:///run/podman/podman.sock`.
|
|
277
|
+
"""
|
|
278
|
+
GPUSTACK_RUNTIME_PODMAN_MIRRORED_NAME_FILTER_LABELS: dict[str, str] | None = None
|
|
279
|
+
"""
|
|
280
|
+
Filter labels for selecting the mirrored deployer container in Podman.
|
|
281
|
+
Only works when `GPUSTACK_RUNTIME_DEPLOY_MIRRORED_NAME` is not set.
|
|
282
|
+
Normally, it should be injected automatically via CI without any manual configuration.
|
|
283
|
+
Default is same as `GPUSTACK_RUNTIME_DOCKER_MIRRORED_NAME_FILTER_LABELS`.
|
|
284
|
+
"""
|
|
285
|
+
GPUSTACK_RUNTIME_PODMAN_IMAGE_NO_PULL_VISUALIZATION: bool = False
|
|
286
|
+
"""
|
|
287
|
+
Disable image pull visualization in Podman deployer.
|
|
288
|
+
Default is same as `GPUSTACK_RUNTIME_DOCKER_IMAGE_NO_PULL_VISUALIZATION`.
|
|
289
|
+
"""
|
|
290
|
+
GPUSTACK_RUNTIME_PODMAN_PAUSE_IMAGE: str | None = None
|
|
291
|
+
"""
|
|
292
|
+
Container image used for the pause container in Podman.
|
|
293
|
+
Default is same as `GPUSTACK_RUNTIME_DOCKER_PAUSE_IMAGE`.
|
|
294
|
+
"""
|
|
295
|
+
GPUSTACK_RUNTIME_PODMAN_UNHEALTHY_RESTART_IMAGE: str | None = None
|
|
296
|
+
"""
|
|
297
|
+
Container image used for unhealthy restart container in Podman.
|
|
298
|
+
Default is same as `GPUSTACK_RUNTIME_DOCKER_UNHEALTHY_RESTART_IMAGE`.
|
|
299
|
+
"""
|
|
300
|
+
GPUSTACK_RUNTIME_PODMAN_EPHEMERAL_FILES_DIR: Path | None = None
|
|
301
|
+
"""
|
|
302
|
+
Directory for storing ephemeral files for Podman.
|
|
303
|
+
Default is same as `GPUSTACK_RUNTIME_DOCKER_EPHEMERAL_FILES_DIR`.
|
|
304
|
+
"""
|
|
305
|
+
GPUSTACK_RUNTIME_PODMAN_MUTE_ORIGINAL_HEALTHCHECK: bool = True
|
|
306
|
+
"""
|
|
307
|
+
Mute the original healthcheck of the container in Podman.
|
|
308
|
+
Default is same as `GPUSTACK_RUNTIME_DOCKER_MUTE_ORIGINAL_HEALTHCHECK`.
|
|
309
|
+
"""
|
|
250
310
|
|
|
251
311
|
# --8<-- [start:env-vars-definition]
|
|
252
312
|
|
|
@@ -299,23 +359,6 @@ variables: dict[str, Callable[[], Any]] = {
|
|
|
299
359
|
"GPUSTACK_RUNTIME_DEPLOY",
|
|
300
360
|
"Auto",
|
|
301
361
|
),
|
|
302
|
-
"GPUSTACK_RUNTIME_DEPLOY_DEFAULT_REGISTRY": lambda: trim_str(
|
|
303
|
-
getenvs(
|
|
304
|
-
keys=[
|
|
305
|
-
"GPUSTACK_RUNTIME_DEPLOY_DEFAULT_REGISTRY",
|
|
306
|
-
"GPUSTACK_SYSTEM_DEFAULT_CONTAINER_REGISTRY", # Compatible with gpustack/gpustack.
|
|
307
|
-
],
|
|
308
|
-
),
|
|
309
|
-
),
|
|
310
|
-
"GPUSTACK_RUNTIME_DEPLOY_DEFAULT_NAMESPACE": lambda: trim_str(
|
|
311
|
-
getenv("GPUSTACK_RUNTIME_DEPLOY_DEFAULT_NAMESPACE"),
|
|
312
|
-
),
|
|
313
|
-
"GPUSTACK_RUNTIME_DEPLOY_DEFAULT_REGISTRY_USERNAME": lambda: trim_str(
|
|
314
|
-
getenv("GPUSTACK_RUNTIME_DEPLOY_DEFAULT_REGISTRY_USERNAME"),
|
|
315
|
-
),
|
|
316
|
-
"GPUSTACK_RUNTIME_DEPLOY_DEFAULT_REGISTRY_PASSWORD": lambda: getenv(
|
|
317
|
-
"GPUSTACK_RUNTIME_DEPLOY_DEFAULT_REGISTRY_PASSWORD",
|
|
318
|
-
),
|
|
319
362
|
"GPUSTACK_RUNTIME_DEPLOY_API_CALL_ERROR_DETAIL": lambda: to_bool(
|
|
320
363
|
getenv("GPUSTACK_RUNTIME_DEPLOY_API_CALL_ERROR_DETAIL", "1"),
|
|
321
364
|
),
|
|
@@ -349,6 +392,36 @@ variables: dict[str, Callable[[], Any]] = {
|
|
|
349
392
|
"GPUSTACK_RUNTIME_DEPLOY_CORRECT_RUNNER_IMAGE": lambda: to_bool(
|
|
350
393
|
getenv("GPUSTACK_RUNTIME_DEPLOY_CORRECT_RUNNER_IMAGE", "1"),
|
|
351
394
|
),
|
|
395
|
+
"GPUSTACK_RUNTIME_DEPLOY_DEFAULT_IMAGE_REGISTRY": lambda: trim_str(
|
|
396
|
+
getenvs(
|
|
397
|
+
keys=[
|
|
398
|
+
"GPUSTACK_RUNTIME_DEPLOY_DEFAULT_IMAGE_REGISTRY",
|
|
399
|
+
# TODO(thxCode): Backward compatibility, remove in v0.1.45 later.
|
|
400
|
+
"GPUSTACK_RUNTIME_DEPLOY_DEFAULT_REGISTRY",
|
|
401
|
+
# Compatible with gpustack/gpustack.
|
|
402
|
+
"GPUSTACK_SYSTEM_DEFAULT_CONTAINER_REGISTRY",
|
|
403
|
+
],
|
|
404
|
+
),
|
|
405
|
+
),
|
|
406
|
+
"GPUSTACK_RUNTIME_DEPLOY_DEFAULT_IMAGE_NAMESPACE": lambda: trim_str(
|
|
407
|
+
getenv("GPUSTACK_RUNTIME_DEPLOY_DEFAULT_IMAGE_NAMESPACE"),
|
|
408
|
+
),
|
|
409
|
+
"GPUSTACK_RUNTIME_DEPLOY_DEFAULT_IMAGE_REGISTRY_USERNAME": lambda: trim_str(
|
|
410
|
+
getenvs(
|
|
411
|
+
keys=[
|
|
412
|
+
"GPUSTACK_RUNTIME_DEPLOY_DEFAULT_IMAGE_REGISTRY_USERNAME",
|
|
413
|
+
# TODO(thxCode): Backward compatibility, remove in v0.1.45 later.
|
|
414
|
+
"GPUSTACK_RUNTIME_DEPLOY_DEFAULT_REGISTRY_USERNAME",
|
|
415
|
+
],
|
|
416
|
+
),
|
|
417
|
+
),
|
|
418
|
+
"GPUSTACK_RUNTIME_DEPLOY_DEFAULT_IMAGE_REGISTRY_PASSWORD": lambda: getenvs(
|
|
419
|
+
keys=[
|
|
420
|
+
"GPUSTACK_RUNTIME_DEPLOY_DEFAULT_IMAGE_REGISTRY_PASSWORD",
|
|
421
|
+
# TODO(thxCode): Backward compatibility, remove in v0.1.45 later.
|
|
422
|
+
"GPUSTACK_RUNTIME_DEPLOY_DEFAULT_REGISTRY_PASSWORD",
|
|
423
|
+
],
|
|
424
|
+
),
|
|
352
425
|
"GPUSTACK_RUNTIME_DEPLOY_IMAGE_PULL_POLICY": lambda: choice(
|
|
353
426
|
getenv(
|
|
354
427
|
"GPUSTACK_RUNTIME_DEPLOY_IMAGE_PULL_POLICY",
|
|
@@ -365,6 +438,19 @@ variables: dict[str, Callable[[], Any]] = {
|
|
|
365
438
|
"GPUSTACK_RUNTIME_DEPLOY_AUTOMAP_RESOURCE_KEY",
|
|
366
439
|
"gpustack.ai/devices",
|
|
367
440
|
),
|
|
441
|
+
"GPUSTACK_RUNTIME_DEPLOY_RESOURCE_KEY_MAP_CONTAINER_DEVICE_INTERFACES": lambda: to_dict(
|
|
442
|
+
getenv(
|
|
443
|
+
"GPUSTACK_RUNTIME_DEPLOY_RESOURCE_KEY_MAP_CONTAINER_DEVICE_INTERFACES",
|
|
444
|
+
"amd.com/devices=amd.com/gpu;"
|
|
445
|
+
"huawei.com/devices=huawei.com/npu;"
|
|
446
|
+
"cambricon.com/devices=cambricon.com/mlu;"
|
|
447
|
+
"hygon.com/devices=hygon.com/dcu;"
|
|
448
|
+
"iluvatar.ai/devices=iluvatar.com/gpu;"
|
|
449
|
+
"metax-tech.com/devices=metax-tech.com/gpu;"
|
|
450
|
+
"mthreads.com/devices=mthreads.com/gpu;"
|
|
451
|
+
"nvidia.com/devices=nvidia.com/gpu;",
|
|
452
|
+
),
|
|
453
|
+
),
|
|
368
454
|
"GPUSTACK_RUNTIME_DEPLOY_RESOURCE_KEY_MAP_RUNTIME_VISIBLE_DEVICES": lambda: to_dict(
|
|
369
455
|
getenv(
|
|
370
456
|
"GPUSTACK_RUNTIME_DEPLOY_RESOURCE_KEY_MAP_RUNTIME_VISIBLE_DEVICES",
|
|
@@ -381,7 +467,7 @@ variables: dict[str, Callable[[], Any]] = {
|
|
|
381
467
|
"GPUSTACK_RUNTIME_DEPLOY_RESOURCE_KEY_MAP_BACKEND_VISIBLE_DEVICES": lambda: to_dict(
|
|
382
468
|
getenv(
|
|
383
469
|
"GPUSTACK_RUNTIME_DEPLOY_RESOURCE_KEY_MAP_BACKEND_VISIBLE_DEVICES",
|
|
384
|
-
"amd.com/devices=HIP_VISIBLE_DEVICES;"
|
|
470
|
+
"amd.com/devices=HIP_VISIBLE_DEVICES,ROCR_VISIBLE_DEVICES;"
|
|
385
471
|
"huawei.com/devices=ASCEND_RT_VISIBLE_DEVICES,NPU_VISIBLE_DEVICES;"
|
|
386
472
|
"cambricon.com/devices=MLU_VISIBLE_DEVICES;"
|
|
387
473
|
"hygon.com/devices=HIP_VISIBLE_DEVICES;"
|
|
@@ -413,12 +499,25 @@ variables: dict[str, Callable[[], Any]] = {
|
|
|
413
499
|
),
|
|
414
500
|
# Deployer
|
|
415
501
|
## Docker
|
|
502
|
+
"GPUSTACK_RUNTIME_DOCKER_HOST": lambda: trim_str(
|
|
503
|
+
getenvs(
|
|
504
|
+
keys=[
|
|
505
|
+
"GPUSTACK_RUNTIME_DOCKER_HOST",
|
|
506
|
+
# Fallback to standard Docker environment variable.
|
|
507
|
+
"DOCKER_HOST",
|
|
508
|
+
],
|
|
509
|
+
default="http+unix:///var/run/docker.sock",
|
|
510
|
+
),
|
|
511
|
+
),
|
|
416
512
|
"GPUSTACK_RUNTIME_DOCKER_MIRRORED_NAME_FILTER_LABELS": lambda: to_dict(
|
|
417
513
|
getenv(
|
|
418
514
|
"GPUSTACK_RUNTIME_DOCKER_MIRRORED_NAME_FILTER_LABELS",
|
|
419
515
|
),
|
|
420
516
|
sep=";",
|
|
421
517
|
),
|
|
518
|
+
"GPUSTACK_RUNTIME_DOCKER_IMAGE_NO_PULL_VISUALIZATION": lambda: to_bool(
|
|
519
|
+
getenv("GPUSTACK_RUNTIME_DOCKER_IMAGE_NO_PULL_VISUALIZATION", "0"),
|
|
520
|
+
),
|
|
422
521
|
"GPUSTACK_RUNTIME_DOCKER_PAUSE_IMAGE": lambda: getenv(
|
|
423
522
|
"GPUSTACK_RUNTIME_DOCKER_PAUSE_IMAGE",
|
|
424
523
|
"gpustack/runtime:pause",
|
|
@@ -436,8 +535,13 @@ variables: dict[str, Callable[[], Any]] = {
|
|
|
436
535
|
"GPUSTACK_RUNTIME_DOCKER_MUTE_ORIGINAL_HEALTHCHECK": lambda: to_bool(
|
|
437
536
|
getenv("GPUSTACK_RUNTIME_DOCKER_MUTE_ORIGINAL_HEALTHCHECK", "1"),
|
|
438
537
|
),
|
|
439
|
-
"
|
|
440
|
-
getenv(
|
|
538
|
+
"GPUSTACK_RUNTIME_DOCKER_RESOURCE_INJECTION_POLICY": lambda: choice(
|
|
539
|
+
getenv(
|
|
540
|
+
"GPUSTACK_RUNTIME_DOCKER_RESOURCE_INJECTION_POLICY",
|
|
541
|
+
"Env",
|
|
542
|
+
),
|
|
543
|
+
options=["Env", "CDI"],
|
|
544
|
+
default="Env",
|
|
441
545
|
),
|
|
442
546
|
## Kubernetes
|
|
443
547
|
"GPUSTACK_RUNTIME_KUBERNETES_NODE_NAME": lambda: getenv(
|
|
@@ -471,6 +575,73 @@ variables: dict[str, Callable[[], Any]] = {
|
|
|
471
575
|
options=["Foreground", "Background", "Orphan"],
|
|
472
576
|
default="Foreground",
|
|
473
577
|
),
|
|
578
|
+
## Podman
|
|
579
|
+
"GPUSTACK_RUNTIME_PODMAN_HOST": lambda: trim_str(
|
|
580
|
+
getenvs(
|
|
581
|
+
keys=[
|
|
582
|
+
"GPUSTACK_RUNTIME_PODMAN_HOST",
|
|
583
|
+
# Fallback to standard Podman environment variable.
|
|
584
|
+
"CONTAINER_HOST",
|
|
585
|
+
],
|
|
586
|
+
default="http+unix:///run/podman/podman.sock",
|
|
587
|
+
),
|
|
588
|
+
),
|
|
589
|
+
"GPUSTACK_RUNTIME_PODMAN_MIRRORED_NAME_FILTER_LABELS": lambda: to_dict(
|
|
590
|
+
getenvs(
|
|
591
|
+
keys=[
|
|
592
|
+
"GPUSTACK_RUNTIME_PODMAN_MIRRORED_NAME_FILTER_LABELS",
|
|
593
|
+
# Fallback to Docker's setting.
|
|
594
|
+
"GPUSTACK_RUNTIME_DOCKER_MIRRORED_NAME_FILTER_LABELS",
|
|
595
|
+
],
|
|
596
|
+
),
|
|
597
|
+
sep=";",
|
|
598
|
+
),
|
|
599
|
+
"GPUSTACK_RUNTIME_PODMAN_IMAGE_NO_PULL_VISUALIZATION": lambda: to_bool(
|
|
600
|
+
getenvs(
|
|
601
|
+
keys=[
|
|
602
|
+
"GPUSTACK_RUNTIME_PODMAN_IMAGE_NO_PULL_VISUALIZATION",
|
|
603
|
+
# Fallback to Docker's setting.
|
|
604
|
+
"GPUSTACK_RUNTIME_DOCKER_IMAGE_NO_PULL_VISUALIZATION",
|
|
605
|
+
],
|
|
606
|
+
default="0",
|
|
607
|
+
),
|
|
608
|
+
),
|
|
609
|
+
"GPUSTACK_RUNTIME_PODMAN_PAUSE_IMAGE": lambda: getenvs(
|
|
610
|
+
keys=[
|
|
611
|
+
"GPUSTACK_RUNTIME_PODMAN_PAUSE_IMAGE",
|
|
612
|
+
# Fallback to Docker's setting.
|
|
613
|
+
"GPUSTACK_RUNTIME_DOCKER_PAUSE_IMAGE",
|
|
614
|
+
],
|
|
615
|
+
default="gpustack/runtime:pause",
|
|
616
|
+
),
|
|
617
|
+
"GPUSTACK_RUNTIME_PODMAN_UNHEALTHY_RESTART_IMAGE": lambda: getenvs(
|
|
618
|
+
keys=[
|
|
619
|
+
"GPUSTACK_RUNTIME_PODMAN_UNHEALTHY_RESTART_IMAGE",
|
|
620
|
+
# Fallback to Docker's setting.
|
|
621
|
+
"GPUSTACK_RUNTIME_DOCKER_UNHEALTHY_RESTART_IMAGE",
|
|
622
|
+
],
|
|
623
|
+
default="gpustack/runtime:health",
|
|
624
|
+
),
|
|
625
|
+
"GPUSTACK_RUNTIME_PODMAN_EPHEMERAL_FILES_DIR": lambda: mkdir_path(
|
|
626
|
+
getenvs(
|
|
627
|
+
keys=[
|
|
628
|
+
"GPUSTACK_RUNTIME_PODMAN_EPHEMERAL_FILES_DIR",
|
|
629
|
+
# Fallback to Docker's setting.
|
|
630
|
+
"GPUSTACK_RUNTIME_DOCKER_EPHEMERAL_FILES_DIR",
|
|
631
|
+
],
|
|
632
|
+
default=expand_path("~/.cache/gpustack-runtime"),
|
|
633
|
+
),
|
|
634
|
+
),
|
|
635
|
+
"GPUSTACK_RUNTIME_PODMAN_MUTE_ORIGINAL_HEALTHCHECK": lambda: to_bool(
|
|
636
|
+
getenvs(
|
|
637
|
+
keys=[
|
|
638
|
+
"GPUSTACK_RUNTIME_PODMAN_MUTE_ORIGINAL_HEALTHCHECK",
|
|
639
|
+
# Fallback to Docker's setting.
|
|
640
|
+
"GPUSTACK_RUNTIME_DOCKER_MUTE_ORIGINAL_HEALTHCHECK",
|
|
641
|
+
],
|
|
642
|
+
default="1",
|
|
643
|
+
),
|
|
644
|
+
),
|
|
474
645
|
}
|
|
475
646
|
|
|
476
647
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: gpustack-runtime
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.39
|
|
4
4
|
Summary: GPUStack Runtime is library for detecting GPU resources and launching GPU workloads.
|
|
5
5
|
Project-URL: Homepage, https://github.com/gpustack/runtime
|
|
6
6
|
Project-URL: Bug Tracker, https://github.com/gpustack/gpustack/issues
|
|
@@ -14,10 +14,11 @@ Classifier: Programming Language :: Python :: 3.12
|
|
|
14
14
|
Classifier: Programming Language :: Python :: 3.13
|
|
15
15
|
Requires-Python: >=3.10
|
|
16
16
|
Requires-Dist: argcomplete>=3.6.3
|
|
17
|
-
Requires-Dist: docker
|
|
18
|
-
Requires-Dist: gpustack-runner
|
|
19
|
-
Requires-Dist: kubernetes
|
|
17
|
+
Requires-Dist: docker>=7.1.0
|
|
18
|
+
Requires-Dist: gpustack-runner>=0.1.23.post1
|
|
19
|
+
Requires-Dist: kubernetes>=33.1.0
|
|
20
20
|
Requires-Dist: nvidia-ml-py>=13.580.65
|
|
21
|
+
Requires-Dist: podman==5.6.0
|
|
21
22
|
Requires-Dist: pyyaml
|
|
22
23
|
Requires-Dist: tqdm
|
|
23
24
|
Description-Content-Type: text/markdown
|
|
@@ -43,6 +44,7 @@ GPUStack Runtime enables GPU workload management on the following platforms:
|
|
|
43
44
|
|
|
44
45
|
- Docker
|
|
45
46
|
- Kubernetes
|
|
47
|
+
- Podman (>=4.9, Experimental support via `CONTAINER_HOST=http+unix:///path/to/podman/socket` environment variable)
|
|
46
48
|
|
|
47
49
|
## License
|
|
48
50
|
|
|
@@ -1,36 +1,38 @@
|
|
|
1
1
|
gpustack_runtime/__init__.py,sha256=kKcK6DMIXOdpWhgMS7xlsNrBNvEmY0L8eyQtBIC3CU4,160
|
|
2
2
|
gpustack_runtime/__main__.py,sha256=Peh1iQnBiQ8GS0lew9rDwlciAHFJn2x7Tm8jyx1PJW8,3488
|
|
3
|
-
gpustack_runtime/_version.py,sha256=
|
|
3
|
+
gpustack_runtime/_version.py,sha256=bLx0UpDVLbu_02WBG6QqcDcOL2aBW3DeJ575mle2vFw,777
|
|
4
4
|
gpustack_runtime/_version.pyi,sha256=A42NoSgcqEXVy2OeNm4LXC9CbyonbooYrSUBlPm2lGY,156
|
|
5
|
-
gpustack_runtime/envs.py,sha256=
|
|
5
|
+
gpustack_runtime/envs.py,sha256=w7IOrmdQ1jNq_EUqR1tfCTRiZDNeh5-kIXbShQeLhBo,32792
|
|
6
6
|
gpustack_runtime/logging.py,sha256=h_fvD5FV7GHCo00IUDLQmkPR-H6r66IX_WSwZwl0mCw,6869
|
|
7
7
|
gpustack_runtime/cmds/__init__.py,sha256=V2c-rsQyHJCMo3XUqoh78EeL10AM8SDx8hdwpyrRNCc,1084
|
|
8
8
|
gpustack_runtime/cmds/__types__.py,sha256=7C4kQM0EHPD8WpJpTo6kh9rEdkrYALcLQ-GAzMMsqV8,789
|
|
9
9
|
gpustack_runtime/cmds/deployer.py,sha256=94TO_GVpDAW6HsRmTut8-fMbxxu7aRRDJWi5dRIMimU,29880
|
|
10
10
|
gpustack_runtime/cmds/detector.py,sha256=xTuPkl0Psi6T_n7RvwCHBeubX4AsjXAhc_emrMufY58,8724
|
|
11
11
|
gpustack_runtime/cmds/images.py,sha256=CjmD82JMdzftRiaeEYSKTGBXudb_qla41v-UzwZQtTo,514
|
|
12
|
-
gpustack_runtime/deployer/__init__.py,sha256=
|
|
13
|
-
gpustack_runtime/deployer/
|
|
12
|
+
gpustack_runtime/deployer/__init__.py,sha256=OGAr302rnH8ijmqUPxaF8MjyrDcCdw2BF0wnq_-GKXc,10346
|
|
13
|
+
gpustack_runtime/deployer/__patches__.py,sha256=4TCUdDzKBiOYmr5s0UkrEjBU0UjT7U36R0aQbSvrFRE,17823
|
|
14
|
+
gpustack_runtime/deployer/__types__.py,sha256=UWovjd3n1avWwNm7U2z3Ipftpa9_r7ABUKu0PE1sVy4,60531
|
|
14
15
|
gpustack_runtime/deployer/__utils__.py,sha256=aKoHSeodwEPuUW19bXZNNPG-5ACFn-o2EosmGxtkxS0,21054
|
|
15
|
-
gpustack_runtime/deployer/docker.py,sha256=
|
|
16
|
-
gpustack_runtime/deployer/kuberentes.py,sha256=
|
|
16
|
+
gpustack_runtime/deployer/docker.py,sha256=IBJHGF14LQ0kt789OooY3hCdC4bRq5WbUlwCWr4dicE,80381
|
|
17
|
+
gpustack_runtime/deployer/kuberentes.py,sha256=BSlSwsp0CK0xoSdQf9U4EnbbOei8pIk1QQi3p2lzHz4,79614
|
|
18
|
+
gpustack_runtime/deployer/podman.py,sha256=Q-wo52P5hW27QA1RwUEp67NxN8tP3MX2BEEiQ2zhfHM,77134
|
|
17
19
|
gpustack_runtime/detector/__init__.py,sha256=kLVxZ9iud2aLwqqAOanIYNb4QSHavUPhqay-FU5ndbU,5443
|
|
18
20
|
gpustack_runtime/detector/__types__.py,sha256=nVh9OV8tZdHFjHPlYul3u2zMvnpa9KOL5GxlPJhEvGk,13163
|
|
19
21
|
gpustack_runtime/detector/__utils__.py,sha256=Yj4GvGvuDuscDG5OpExYdv-1VhmEHBpRrBC9rTsB-kA,24584
|
|
20
|
-
gpustack_runtime/detector/amd.py,sha256=
|
|
22
|
+
gpustack_runtime/detector/amd.py,sha256=_sRBRZn9pFQ9jITCetvsoHicjXA9RSVrFvo6zOwCHU8,18356
|
|
21
23
|
gpustack_runtime/detector/ascend.py,sha256=VkmNM-enbjMNVXKFfv7z6S-4BkwD6YkBmcC0J1ZGEuc,18588
|
|
22
24
|
gpustack_runtime/detector/cambricon.py,sha256=bqWo2mUuf3a5kV8NC1PzFtHIUhVQkSejUSWR5Z5XaGA,3899
|
|
23
|
-
gpustack_runtime/detector/hygon.py,sha256=
|
|
25
|
+
gpustack_runtime/detector/hygon.py,sha256=I4SWuq5hXLRPJQyIyCoSaU1VnRMDblzQtljKy7CBVdM,13337
|
|
24
26
|
gpustack_runtime/detector/iluvatar.py,sha256=1fbkfE2w_MH36YgQDv21xb76sl6GvYxVd3qSYXjET0g,10372
|
|
25
27
|
gpustack_runtime/detector/metax.py,sha256=YRpZVfz_nG7QTEMqTxqpgi9x5aPYy4gfvYhiUpbz8R8,10146
|
|
26
28
|
gpustack_runtime/detector/mthreads.py,sha256=PoGirid-rboH4Nm6sKnv424ULax1eu1rEaAsWKPT02g,11105
|
|
27
|
-
gpustack_runtime/detector/nvidia.py,sha256=
|
|
29
|
+
gpustack_runtime/detector/nvidia.py,sha256=eKVyvyvwbXOIBtWlaCMltqB_ohW9yBnw8M_KYHzv81E,26445
|
|
28
30
|
gpustack_runtime/detector/pyacl/__init__.py,sha256=13_zyQxo_yql99Ex7n3HTPzZVTSt8A-TN0-u5eDW8nE,15994
|
|
29
31
|
gpustack_runtime/detector/pyamdgpu/__init__.py,sha256=vFIOA072L01Nxvzgixns-wNrQJK8sJMvEs90DEEE2-0,8378
|
|
30
32
|
gpustack_runtime/detector/pyamdsmi/__init__.py,sha256=BXAOVnoew6MliU86ci73Rk2yWPeXRUBicFKFWh-r2s0,929
|
|
31
33
|
gpustack_runtime/detector/pycuda/__init__.py,sha256=o2Oj3l0HsXNttwnUylxerbupK-45gZWbluqfEvBDQ38,16673
|
|
32
34
|
gpustack_runtime/detector/pydcmi/__init__.py,sha256=KVmem7Cd6ZoQ-irB_WOsDVOiyGr5Cv69_rm1NNBpkxo,37129
|
|
33
|
-
gpustack_runtime/detector/pyhsa/__init__.py,sha256=
|
|
35
|
+
gpustack_runtime/detector/pyhsa/__init__.py,sha256=jQ6tOPG8kn5Xp3F99-Vu6aUc4hzSUOdoGkEcl8qxQOc,15354
|
|
34
36
|
gpustack_runtime/detector/pyixml/__init__.py,sha256=oYFAfQ8ZbPg7oMFXFfLjJuCBEV7hWQpFqMMVcN99Sxs,166564
|
|
35
37
|
gpustack_runtime/detector/pymtml/__init__.py,sha256=hfaVZysit_MUTDs0qsnOBgKXq_8DKlCb0Jv00WasU0w,22008
|
|
36
38
|
gpustack_runtime/detector/pymxsml/__init__.py,sha256=spHMs9t2tiV-C9kO-cV_230CBVAZ-j2DWtLfiFU5V3E,25
|
|
@@ -38,10 +40,10 @@ gpustack_runtime/detector/pymxsml/mxsml.py,sha256=nRuKSVxIsJj2SJX-SYnE9NGZ7hGjWO
|
|
|
38
40
|
gpustack_runtime/detector/pymxsml/mxsml_extension.py,sha256=zfWFRGa9eSup336t2lPhIvCbPpa7Prn-7xCHRljg4CI,26967
|
|
39
41
|
gpustack_runtime/detector/pymxsml/mxsml_mcm.py,sha256=a4rX7hJNJKTqLodKU9rYeDaAEKef6UNVThl1w-aiFsA,15363
|
|
40
42
|
gpustack_runtime/detector/pyrocmcore/__init__.py,sha256=8XxKmwLX4-uoP7cfxjGoEmk9qlrGf0804pgyb74mJKs,2108
|
|
41
|
-
gpustack_runtime/detector/pyrocmsmi/__init__.py,sha256=
|
|
42
|
-
gpustack_runtime/_version_appendix.py,sha256=
|
|
43
|
-
gpustack_runtime-0.1.
|
|
44
|
-
gpustack_runtime-0.1.
|
|
45
|
-
gpustack_runtime-0.1.
|
|
46
|
-
gpustack_runtime-0.1.
|
|
47
|
-
gpustack_runtime-0.1.
|
|
43
|
+
gpustack_runtime/detector/pyrocmsmi/__init__.py,sha256=OmvfJepAtEnDKBMLrktMXlRbJEZttMDQ2R4ztD8kLGg,11806
|
|
44
|
+
gpustack_runtime/_version_appendix.py,sha256=BvLFmLQy72_ni44cxIW60c1hzPkH0oUqn9p8YDi-fuQ,23
|
|
45
|
+
gpustack_runtime-0.1.39.dist-info/METADATA,sha256=Mqgym65liCpAEO4W1IxA-VFlNH2e-4OhKEpu3X6NNqo,2125
|
|
46
|
+
gpustack_runtime-0.1.39.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
47
|
+
gpustack_runtime-0.1.39.dist-info/entry_points.txt,sha256=bBO_61GxP6dIT74uZwbSDgW5Vt2pTePUS3CgjUJkUgg,68
|
|
48
|
+
gpustack_runtime-0.1.39.dist-info/licenses/LICENSE,sha256=OiPibowBvB-NHV3TP_NOj18XNBlXcshXZFMpa3uvKVE,10362
|
|
49
|
+
gpustack_runtime-0.1.39.dist-info/RECORD,,
|
|
File without changes
|
{gpustack_runtime-0.1.38.post4.dist-info → gpustack_runtime-0.1.39.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
{gpustack_runtime-0.1.38.post4.dist-info → gpustack_runtime-0.1.39.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|