gpustack-runtime 0.2.5.post2__tar.gz → 0.2.5.post4__tar.gz
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-0.2.5.post4/ADOPTERS.md +12 -0
- gpustack_runtime-0.2.5.post4/AGENTS.md +85 -0
- gpustack_runtime-0.2.5.post4/DCO +34 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/LICENSE +1 -1
- gpustack_runtime-0.2.5.post4/PKG-INFO +82 -0
- gpustack_runtime-0.2.5.post4/README.md +55 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/gpustack_runtime/_version.py +2 -2
- gpustack_runtime-0.2.5.post4/gpustack_runtime/_version_appendix.py +1 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/gpustack_runtime/deployer/__init__.py +7 -5
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/gpustack_runtime/deployer/docker.py +1 -1
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/gpustack_runtime/deployer/k8s/devicemanager/__init__.py +56 -6
- gpustack_runtime-0.2.5.post2/gpustack_runtime/deployer/kuberentes.py → gpustack_runtime-0.2.5.post4/gpustack_runtime/deployer/kubernetes.py +112 -18
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/gpustack_runtime/deployer/podman.py +1 -1
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/mkdocs.yml +1 -1
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/specs/2026-08-14-detector-alignment-and-workload-exit-status.md +4 -4
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/tests/gpustack_runtime/deployer/test_kubernetes_status.py +1 -1
- gpustack_runtime-0.2.5.post4/tests/gpustack_runtime/deployer/test_logs_options.py +210 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/tests/gpustack_runtime/deployer/test_privileged.py +1 -1
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/tests/gpustack_runtime/deployer/test_resource_injection_policy.py +1 -1
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/tests/gpustack_runtime/deployer/test_runtime_class.py +1 -1
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/tests/gpustack_runtime/deployer/test_termination_grace_period.py +3 -3
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/tests/gpustack_runtime/deployer/test_visible_devices_ordering.py +3 -3
- gpustack_runtime-0.2.5.post4/tests/gpustack_runtime/deployer/test_workload_resource_injection_policy.py +347 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/tests/gpustack_runtime/deployer/test_workload_status.py +2 -2
- gpustack_runtime-0.2.5.post2/PKG-INFO +0 -64
- gpustack_runtime-0.2.5.post2/README.md +0 -37
- gpustack_runtime-0.2.5.post2/gpustack_runtime/_version_appendix.py +0 -1
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/.codespelldict +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/.codespellrc +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/.dockerignore +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/.gitattributes +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/.gitignore +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/.pre-commit-config.yaml +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/.python-version +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/Makefile +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/deploy/manifests/docker-compose.yaml +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/deploy/manifests/kubernetes.yaml +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/docs/index.md +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/docs/modules/gpustack_runtime.deployer.md +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/docs/modules/gpustack_runtime.detector.md +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/docs/modules/gpustack_runtime.md +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/gpustack_runtime/__init__.py +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/gpustack_runtime/__main__.py +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/gpustack_runtime/_version.pyi +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/gpustack_runtime/cmds/__init__.py +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/gpustack_runtime/cmds/__types__.py +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/gpustack_runtime/cmds/deployer.py +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/gpustack_runtime/cmds/detector.py +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/gpustack_runtime/cmds/images.py +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/gpustack_runtime/deployer/__patches__.py +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/gpustack_runtime/deployer/__types__.py +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/gpustack_runtime/deployer/__utils__.py +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/gpustack_runtime/deployer/cdi/__init__.py +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/gpustack_runtime/deployer/cdi/__types__.py +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/gpustack_runtime/deployer/cdi/__utils__.py +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/gpustack_runtime/deployer/cdi/amd.py +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/gpustack_runtime/deployer/cdi/ascend.py +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/gpustack_runtime/deployer/cdi/hygon.py +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/gpustack_runtime/deployer/cdi/iluvatar.py +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/gpustack_runtime/deployer/cdi/metax.py +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/gpustack_runtime/deployer/cdi/thead.py +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/gpustack_runtime/detector/__init__.py +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/gpustack_runtime/detector/__types__.py +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/gpustack_runtime/detector/__utils__.py +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/gpustack_runtime/detector/amd.py +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/gpustack_runtime/detector/ascend.py +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/gpustack_runtime/detector/cambricon.py +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/gpustack_runtime/detector/hygon.py +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/gpustack_runtime/detector/iluvatar.py +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/gpustack_runtime/detector/metax.py +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/gpustack_runtime/detector/mthreads.py +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/gpustack_runtime/detector/nvidia.py +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/gpustack_runtime/detector/pyamdgpu/__init__.py +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/gpustack_runtime/detector/pyamdsmi/__init__.py +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/gpustack_runtime/detector/pycndev/__init__.py +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/gpustack_runtime/detector/pydcmi/__init__.py +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/gpustack_runtime/detector/pydmi/__init__.py +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/gpustack_runtime/detector/pyhgml/__init__.py +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/gpustack_runtime/detector/pyhgml/libhgml.so +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/gpustack_runtime/detector/pyhgml/libuki.so +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/gpustack_runtime/detector/pyhsa/__init__.py +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/gpustack_runtime/detector/pyixml/__init__.py +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/gpustack_runtime/detector/pymtml/__init__.py +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/gpustack_runtime/detector/pymxsml/__init__.py +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/gpustack_runtime/detector/pynvml/__init__.py +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/gpustack_runtime/detector/pyrocmsmi/__init__.py +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/gpustack_runtime/detector/thead.py +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/gpustack_runtime/envs.py +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/gpustack_runtime/logging.py +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/hatch.toml +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/pack/Dockerfile +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/pack/Dockerfile.dummy +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/pyproject.toml +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/pytest.ini +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/ruff.toml +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/tests/gpustack_runtime/deployer/fixtures/__init__.py +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/tests/gpustack_runtime/deployer/fixtures/test_compare_versions.json +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/tests/gpustack_runtime/deployer/fixtures/test_correct_runner_image.json +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/tests/gpustack_runtime/deployer/fixtures/test_load_yaml_or_json.json +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/tests/gpustack_runtime/deployer/fixtures/test_load_yaml_or_json_multiple_jsons.json +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/tests/gpustack_runtime/deployer/fixtures/test_load_yaml_or_json_multiple_yamls.yaml +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/tests/gpustack_runtime/deployer/fixtures/test_load_yaml_or_json_single_json.json +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/tests/gpustack_runtime/deployer/fixtures/test_load_yaml_or_json_single_yaml.yaml +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/tests/gpustack_runtime/deployer/fixtures/test_nginx_entrypoint.sh +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/tests/gpustack_runtime/deployer/test_ascend_ranktable.py +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/tests/gpustack_runtime/deployer/test_docker_status.py +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/tests/gpustack_runtime/deployer/test_podman_status.py +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/tests/gpustack_runtime/deployer/test_utils.py +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/tests/gpustack_runtime/detector/fixtures/__init__.py +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/tests/gpustack_runtime/detector/samples/README.md +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/tests/gpustack_runtime/detector/samples/detect_output_amd_mi300x.json +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/tests/gpustack_runtime/detector/samples/detect_output_amd_mi308x.json +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/tests/gpustack_runtime/detector/samples/detect_output_amd_rx7800xt.json +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/tests/gpustack_runtime/detector/samples/detect_output_ascend_310p3.json +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/tests/gpustack_runtime/detector/samples/detect_output_ascend_910b2.json +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/tests/gpustack_runtime/detector/samples/detect_output_hygon_k100ai.json +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/tests/gpustack_runtime/detector/samples/detect_output_metax_c500.json +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/tests/gpustack_runtime/detector/samples/detect_output_nvidia_gb10.json +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/tests/gpustack_runtime/detector/samples/detect_output_nvidia_h100.json +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/tests/gpustack_runtime/detector/samples/detect_output_nvidia_h100_mig.json +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/tests/gpustack_runtime/detector/samples/detect_output_nvidia_h200.json +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/tests/gpustack_runtime/detector/samples/detect_output_nvidia_rtx4080super.json +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/tests/gpustack_runtime/detector/samples/detect_output_nvidia_rtx4090_48g.json +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/tests/gpustack_runtime/detector/samples/detect_output_nvidia_rtx4090d.json +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/tests/gpustack_runtime/detector/samples/detect_output_nvidia_rtx5090d.json +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/tests/gpustack_runtime/detector/samples/detect_output_thead_ppu.json +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/tests/gpustack_runtime/detector/samples/topology_output_amd_mi300x.json +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/tests/gpustack_runtime/detector/samples/topology_output_amd_mi308x.json +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/tests/gpustack_runtime/detector/samples/topology_output_amd_rx7800xt.json +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/tests/gpustack_runtime/detector/samples/topology_output_ascend_310p3.json +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/tests/gpustack_runtime/detector/samples/topology_output_ascend_910b2.json +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/tests/gpustack_runtime/detector/samples/topology_output_hygon_k100ai.json +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/tests/gpustack_runtime/detector/samples/topology_output_metax_c500.json +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/tests/gpustack_runtime/detector/samples/topology_output_mthreads_s5000.json +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/tests/gpustack_runtime/detector/samples/topology_output_nvidia_h100.json +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/tests/gpustack_runtime/detector/samples/topology_output_nvidia_h100_mig.json +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/tests/gpustack_runtime/detector/samples/topology_output_nvidia_h200.json +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/tests/gpustack_runtime/detector/samples/topology_output_nvidia_rtx4080super.json +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/tests/gpustack_runtime/detector/samples/topology_output_nvidia_rtx4090_48g.json +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/tests/gpustack_runtime/detector/samples/topology_output_nvidia_rtx4090d.json +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/tests/gpustack_runtime/detector/samples/topology_output_nvidia_rtx5090d.json +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/tests/gpustack_runtime/detector/samples/topology_output_thead_ppu.json +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/tests/gpustack_runtime/detector/test_amd.py +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/tests/gpustack_runtime/detector/test_ascend.py +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/tests/gpustack_runtime/detector/test_cambricon.py +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/tests/gpustack_runtime/detector/test_detector_cli.py +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/tests/gpustack_runtime/detector/test_detector_types.py +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/tests/gpustack_runtime/detector/test_detector_utils.py +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/tests/gpustack_runtime/detector/test_hygon.py +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/tests/gpustack_runtime/detector/test_iluvatar.py +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/tests/gpustack_runtime/detector/test_metax.py +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/tests/gpustack_runtime/detector/test_mig_devices.py +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/tests/gpustack_runtime/detector/test_mthreads.py +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/tests/gpustack_runtime/detector/test_nvidia.py +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/tests/gpustack_runtime/detector/test_pycndev.py +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/tests/gpustack_runtime/detector/test_pydmi.py +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/tests/gpustack_runtime/detector/test_samples.py +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/tests/gpustack_runtime/detector/test_thead.py +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/uv.lock +0 -0
- {gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/uv.toml +0 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Who's using GPUStack Runtime
|
|
2
|
+
|
|
3
|
+
GPUStack Runtime is used by a growing range of companies and projects to detect accelerator (GPU/NPU) resources and run accelerator workloads on Docker, Kubernetes and Podman.
|
|
4
|
+
|
|
5
|
+
If you are using GPUStack Runtime and your name is not on this list, please send us a PR!
|
|
6
|
+
|
|
7
|
+
## Companies/Projects using GPUStack Runtime in production
|
|
8
|
+
|
|
9
|
+
These companies and projects are using GPUStack Runtime in production. If your company is using GPUStack Runtime, open a PR to add your company or project name and a description of how you are using GPUStack Runtime.
|
|
10
|
+
|
|
11
|
+
| Company / Project | Use Case |
|
|
12
|
+
| --- | --- |
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# GPUStack Runtime
|
|
2
|
+
|
|
3
|
+
A Python library with a unified interface for detecting accelerator (GPU/NPU) resources and
|
|
4
|
+
launching and managing GPU workloads on Docker, Kubernetes and Podman.
|
|
5
|
+
|
|
6
|
+
## Project Structure
|
|
7
|
+
|
|
8
|
+
- `gpustack_runtime/` — the library.
|
|
9
|
+
- `detector/` — one detector per vendor (`nvidia.py`, `amd.py`, `ascend.py`, `cambricon.py`,
|
|
10
|
+
`hygon.py`, `iluvatar.py`, `metax.py`, `mthreads.py`, `thead.py`), plus the `py*` packages,
|
|
11
|
+
ctypes bindings to vendor management libraries (`pynvml`, `pydcmi`, `pycndev`, ...).
|
|
12
|
+
- `deployer/` — one deployer per container runtime (`docker.py`, `kubernetes.py`, `podman.py`),
|
|
13
|
+
`cdi/` for vendor CDI spec handling, `k8s/` for Kubernetes helpers, and `__patches__.py` for
|
|
14
|
+
the vendored Podman client patch.
|
|
15
|
+
- `cmds/` — CLI subcommands behind the `gpustack-runtime` entrypoint (`__main__.py`).
|
|
16
|
+
- `envs.py` — environment variables; `logging.py` — logging helpers.
|
|
17
|
+
- `tests/gpustack_runtime/` — pytest suite mirroring the package; `detector/samples/` holds
|
|
18
|
+
captured vendor-tool outputs used as fixtures.
|
|
19
|
+
- `docs/` — MkDocs site; `docs/modules/` is API reference rendered from docstrings by
|
|
20
|
+
mkdocstrings.
|
|
21
|
+
- `specs/` — design records.
|
|
22
|
+
- `pack/` / `deploy/` — container image build and deployment manifests.
|
|
23
|
+
|
|
24
|
+
## Architecture
|
|
25
|
+
|
|
26
|
+
Detection: each vendor detector in `gpustack_runtime/detector/` probes its vendor library through
|
|
27
|
+
the matching `py*` binding and reports `Device`s with topology. `detector/__init__.py` owns the
|
|
28
|
+
registry (`_DETECTORS`) and the aggregate entry points (`supported_list()`, `detect_devices()`).
|
|
29
|
+
|
|
30
|
+
Deployment: `deployer/__init__.py` owns the registry (`_DEPLOYERS`) and picks the first available
|
|
31
|
+
runtime (Docker, Kubernetes, Podman). A `WorkloadPlan` describes the desired containers; the
|
|
32
|
+
deployer injects vendor resources (CDI devices, environment variables, mounts) and returns a
|
|
33
|
+
workload handle for inspect/logs/exec/delete. Shared types live in `deployer/__types__.py`,
|
|
34
|
+
including the `OperationError` / `UnsupportedError` error contract.
|
|
35
|
+
|
|
36
|
+
## Finding sources
|
|
37
|
+
|
|
38
|
+
- Confirm the checkout, branch and uncommitted changes before reasoning about behavior. The
|
|
39
|
+
published wheel or a merged PR may describe a different revision.
|
|
40
|
+
- Docstrings are the usage contract: `make docs` renders them into `site/`. Specs under
|
|
41
|
+
`specs/` own design rationale; current code establishes what this checkout implements. Report
|
|
42
|
+
disagreement rather than silently choosing one.
|
|
43
|
+
- For a vendor behavior claim, read the matching `py*` binding and the detector tests under
|
|
44
|
+
`tests/gpustack_runtime/detector/`; captured outputs live in `detector/samples/`.
|
|
45
|
+
- For a concrete error, search its stable text locally first. When it concerns an upstream
|
|
46
|
+
dependency (docker, kubernetes, podman clients), check that project's issues and pinned version
|
|
47
|
+
in `pyproject.toml` / `uv.lock`.
|
|
48
|
+
|
|
49
|
+
## Development
|
|
50
|
+
|
|
51
|
+
Setup is `make install` (uv sync plus pre-commit hooks). Day-to-day targets:
|
|
52
|
+
|
|
53
|
+
- `make lint` — pre-commit on all files: ruff check/format, codespell, commitizen.
|
|
54
|
+
- `make test` — pytest.
|
|
55
|
+
- `make docs` — build the MkDocs site into `site/` (git-ignored).
|
|
56
|
+
- `make build` — build wheel and sdist into `dist/` (git-ignored).
|
|
57
|
+
- `make package` — build the container image with docker buildx; `PACKAGE_PUSH=true` pushes.
|
|
58
|
+
|
|
59
|
+
`gpustack_runtime/_version.py` is generated by hatch-vcs and `_version_appendix.py` by
|
|
60
|
+
`make prepare`; never hand-edit either.
|
|
61
|
+
|
|
62
|
+
### Python conventions
|
|
63
|
+
|
|
64
|
+
- Prefer clarity over cleverness to simplify long-term maintenance.
|
|
65
|
+
- Start every package module with `from __future__ import annotations as __future_annotations__`.
|
|
66
|
+
- Follow the ruff configuration in `ruff.toml`; run `make lint` whenever modifying Python source.
|
|
67
|
+
- Type-annotate public APIs and re-export them from the package `__init__.py` (`__all__`).
|
|
68
|
+
- Write Google-style docstrings; they render into the published API reference.
|
|
69
|
+
- Handle errors explicitly. Deployers raise `OperationError` or `UnsupportedError` from
|
|
70
|
+
`deployer.__types__` instead of leaking runtime-client exceptions. Detectors degrade to an
|
|
71
|
+
empty result and log at debug level rather than failing on a host without that vendor.
|
|
72
|
+
- Keep private helpers in double-underscore modules (`__types__.py`, `__utils__.py`); import them
|
|
73
|
+
through the package, not across subpackages.
|
|
74
|
+
- Keep concurrency simple, safe and justified; minimize mutable shared state.
|
|
75
|
+
- Keep comments plain and short: no emoji, no decorative symbols. State the point in words.
|
|
76
|
+
|
|
77
|
+
### Testing conventions
|
|
78
|
+
|
|
79
|
+
- pytest; tests mirror the package layout under `tests/gpustack_runtime/`.
|
|
80
|
+
- Never require real hardware or a real container runtime. Detector tests fake the `py*` vendor
|
|
81
|
+
binding in the test module; deployer tests fake the runtime client.
|
|
82
|
+
- Reuse captured vendor outputs from `tests/gpustack_runtime/detector/samples/` and shared
|
|
83
|
+
fixtures from `fixtures/` instead of inventing new sample data.
|
|
84
|
+
- Verify one behavior or contract per test; assert observable state, not implementation details.
|
|
85
|
+
- Keep tests deterministic and repeatable: no wall-clock, ordering or randomness dependence.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
Developer Certificate of Origin
|
|
2
|
+
Version 1.1
|
|
3
|
+
|
|
4
|
+
Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
|
|
5
|
+
|
|
6
|
+
Everyone is permitted to copy and distribute verbatim copies of this
|
|
7
|
+
license document, but changing it is not allowed.
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
Developer's Certificate of Origin 1.1
|
|
11
|
+
|
|
12
|
+
By making a contribution to this project, I certify that:
|
|
13
|
+
|
|
14
|
+
(a) The contribution was created in whole or in part by me and I
|
|
15
|
+
have the right to submit it under the open source license
|
|
16
|
+
indicated in the file; or
|
|
17
|
+
|
|
18
|
+
(b) The contribution is based upon previous work that, to the best
|
|
19
|
+
of my knowledge, is covered under an appropriate open source
|
|
20
|
+
license and I have the right under that license to submit that
|
|
21
|
+
work with modifications, whether created in whole or in part
|
|
22
|
+
by me, under the same open source license (unless I am
|
|
23
|
+
permitted to submit under a different license), as indicated
|
|
24
|
+
in the file; or
|
|
25
|
+
|
|
26
|
+
(c) The contribution was provided directly to me by some other
|
|
27
|
+
person who certified (a), (b) or (c) and I have not modified
|
|
28
|
+
it.
|
|
29
|
+
|
|
30
|
+
(d) I understand and agree that this project and the contribution
|
|
31
|
+
are public and that a record of the contribution (including all
|
|
32
|
+
personal information I submit with it, including my sign-off) is
|
|
33
|
+
maintained indefinitely and may be redistributed consistent with
|
|
34
|
+
this project or the open source license(s) involved.
|
|
@@ -175,7 +175,7 @@ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
|
175
175
|
|
|
176
176
|
END OF TERMS AND CONDITIONS
|
|
177
177
|
|
|
178
|
-
Copyright (c)
|
|
178
|
+
Copyright (c) 2026 The GPUStack Authors
|
|
179
179
|
|
|
180
180
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
181
181
|
you may not use this file except in compliance with the License.
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: gpustack-runtime
|
|
3
|
+
Version: 0.2.5.post4
|
|
4
|
+
Summary: GPUStack Runtime is library for detecting GPU resources and launching GPU workloads.
|
|
5
|
+
Project-URL: Homepage, https://github.com/gpustack/runtime
|
|
6
|
+
Project-URL: Bug Tracker, https://github.com/gpustack/gpustack/issues
|
|
7
|
+
Author-email: GPUStack Authors <contact@gpustack.ai>
|
|
8
|
+
License-Expression: Apache-2.0
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
15
|
+
Requires-Python: >=3.10
|
|
16
|
+
Requires-Dist: argcomplete>=3.6.3
|
|
17
|
+
Requires-Dist: cachetools>=5.5.2
|
|
18
|
+
Requires-Dist: docker>=7.1.0
|
|
19
|
+
Requires-Dist: gpustack-runner>=0.1.29
|
|
20
|
+
Requires-Dist: kubernetes>=33.1.0
|
|
21
|
+
Requires-Dist: mthreads-ml-py>=2.2.10
|
|
22
|
+
Requires-Dist: nvidia-ml-py>=13.580.65
|
|
23
|
+
Requires-Dist: podman==5.6.0
|
|
24
|
+
Requires-Dist: pyyaml
|
|
25
|
+
Requires-Dist: tqdm
|
|
26
|
+
Description-Content-Type: text/markdown
|
|
27
|
+
|
|
28
|
+
# GPUStack Runtime
|
|
29
|
+
|
|
30
|
+
[](./LICENSE)
|
|
31
|
+
[](https://pypi.org/project/gpustack-runtime/)
|
|
32
|
+
[](https://github.com/gpustack/runtime/releases/latest)
|
|
33
|
+
[](https://hub.docker.com/r/gpustack/runtime)
|
|
34
|
+
[](https://deepwiki.com/gpustack/runtime)
|
|
35
|
+
|
|
36
|
+
GPUStack Runtime offers a unified interface for detecting GPU resources and managing GPU workloads.
|
|
37
|
+
|
|
38
|
+
## Features
|
|
39
|
+
|
|
40
|
+
- Detect a wide range of GPU and accelerator resources:
|
|
41
|
+
|
|
42
|
+
- AMD GPU
|
|
43
|
+
- Ascend NPU
|
|
44
|
+
- Cambricon MLU
|
|
45
|
+
- Hygon DCU
|
|
46
|
+
- Iluvatar GPU
|
|
47
|
+
- MetaX GPU
|
|
48
|
+
- Moore Threads GPU
|
|
49
|
+
- NVIDIA GPU
|
|
50
|
+
- T-Head PPU
|
|
51
|
+
|
|
52
|
+
- Manage GPU workloads on the following platforms:
|
|
53
|
+
|
|
54
|
+
- Docker
|
|
55
|
+
- Kubernetes
|
|
56
|
+
- Podman (>=4.9, experimental support via the `CONTAINER_HOST=http+unix:///path/to/podman/socket` environment variable)
|
|
57
|
+
|
|
58
|
+
Contributions to support additional GPU resources are welcome!
|
|
59
|
+
|
|
60
|
+
## Installation
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
pip install gpustack-runtime
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Documentation
|
|
67
|
+
|
|
68
|
+
The API reference renders from docstrings. Build the site locally with `make docs` and open
|
|
69
|
+
`site/index.html`.
|
|
70
|
+
|
|
71
|
+
## Contributing
|
|
72
|
+
|
|
73
|
+
Contributions are welcome. Commits must carry a `Signed-off-by` line certifying the
|
|
74
|
+
[Developer Certificate of Origin](./DCO).
|
|
75
|
+
|
|
76
|
+
Using GPUStack Runtime in production? Add your company or project to [ADOPTERS.md](./ADOPTERS.md)
|
|
77
|
+
via pull request.
|
|
78
|
+
|
|
79
|
+
## License
|
|
80
|
+
|
|
81
|
+
Copyright (c) 2026 The GPUStack Authors. Licensed under the
|
|
82
|
+
[Apache License 2.0](./LICENSE).
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# GPUStack Runtime
|
|
2
|
+
|
|
3
|
+
[](./LICENSE)
|
|
4
|
+
[](https://pypi.org/project/gpustack-runtime/)
|
|
5
|
+
[](https://github.com/gpustack/runtime/releases/latest)
|
|
6
|
+
[](https://hub.docker.com/r/gpustack/runtime)
|
|
7
|
+
[](https://deepwiki.com/gpustack/runtime)
|
|
8
|
+
|
|
9
|
+
GPUStack Runtime offers a unified interface for detecting GPU resources and managing GPU workloads.
|
|
10
|
+
|
|
11
|
+
## Features
|
|
12
|
+
|
|
13
|
+
- Detect a wide range of GPU and accelerator resources:
|
|
14
|
+
|
|
15
|
+
- AMD GPU
|
|
16
|
+
- Ascend NPU
|
|
17
|
+
- Cambricon MLU
|
|
18
|
+
- Hygon DCU
|
|
19
|
+
- Iluvatar GPU
|
|
20
|
+
- MetaX GPU
|
|
21
|
+
- Moore Threads GPU
|
|
22
|
+
- NVIDIA GPU
|
|
23
|
+
- T-Head PPU
|
|
24
|
+
|
|
25
|
+
- Manage GPU workloads on the following platforms:
|
|
26
|
+
|
|
27
|
+
- Docker
|
|
28
|
+
- Kubernetes
|
|
29
|
+
- Podman (>=4.9, experimental support via the `CONTAINER_HOST=http+unix:///path/to/podman/socket` environment variable)
|
|
30
|
+
|
|
31
|
+
Contributions to support additional GPU resources are welcome!
|
|
32
|
+
|
|
33
|
+
## Installation
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
pip install gpustack-runtime
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Documentation
|
|
40
|
+
|
|
41
|
+
The API reference renders from docstrings. Build the site locally with `make docs` and open
|
|
42
|
+
`site/index.html`.
|
|
43
|
+
|
|
44
|
+
## Contributing
|
|
45
|
+
|
|
46
|
+
Contributions are welcome. Commits must carry a `Signed-off-by` line certifying the
|
|
47
|
+
[Developer Certificate of Origin](./DCO).
|
|
48
|
+
|
|
49
|
+
Using GPUStack Runtime in production? Add your company or project to [ADOPTERS.md](./ADOPTERS.md)
|
|
50
|
+
via pull request.
|
|
51
|
+
|
|
52
|
+
## License
|
|
53
|
+
|
|
54
|
+
Copyright (c) 2026 The GPUStack Authors. Licensed under the
|
|
55
|
+
[Apache License 2.0](./LICENSE).
|
|
@@ -27,8 +27,8 @@ version_tuple: VERSION_TUPLE
|
|
|
27
27
|
__commit_id__: COMMIT_ID
|
|
28
28
|
commit_id: COMMIT_ID
|
|
29
29
|
|
|
30
|
-
__version__ = version = '0.2.5.
|
|
31
|
-
__version_tuple__ = version_tuple = (0, 2, 5, '
|
|
30
|
+
__version__ = version = '0.2.5.post4'
|
|
31
|
+
__version_tuple__ = version_tuple = (0, 2, 5, 'post4')
|
|
32
32
|
try:
|
|
33
33
|
from ._version_appendix import git_commit
|
|
34
34
|
__commit_id__ = commit_id = git_commit
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
git_commit = "089358e"
|
{gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/gpustack_runtime/deployer/__init__.py
RENAMED
|
@@ -36,7 +36,8 @@ from .docker import (
|
|
|
36
36
|
DockerWorkloadPlan,
|
|
37
37
|
DockerWorkloadStatus,
|
|
38
38
|
)
|
|
39
|
-
from .
|
|
39
|
+
from .k8s.devicemanager import KubernetesResourceInjectionPolicyEnum
|
|
40
|
+
from .kubernetes import (
|
|
40
41
|
KubernetesDeployer,
|
|
41
42
|
KubernetesWorkloadPlan,
|
|
42
43
|
KubernetesWorkloadStatus,
|
|
@@ -245,7 +246,7 @@ def logs_workload(
|
|
|
245
246
|
tail:
|
|
246
247
|
The number of lines from the end of the logs to show.
|
|
247
248
|
since:
|
|
248
|
-
Show logs since
|
|
249
|
+
Show logs since the given epoch in seconds.
|
|
249
250
|
follow:
|
|
250
251
|
Whether to follow the logs.
|
|
251
252
|
|
|
@@ -300,7 +301,7 @@ async def async_logs_workload(
|
|
|
300
301
|
tail:
|
|
301
302
|
The number of lines from the end of the logs to show.
|
|
302
303
|
since:
|
|
303
|
-
Show logs since
|
|
304
|
+
Show logs since the given epoch in seconds.
|
|
304
305
|
follow:
|
|
305
306
|
Whether to follow the logs.
|
|
306
307
|
|
|
@@ -434,7 +435,7 @@ def logs_self(
|
|
|
434
435
|
tail:
|
|
435
436
|
The number of lines from the end of the logs to show.
|
|
436
437
|
since:
|
|
437
|
-
Show logs since
|
|
438
|
+
Show logs since the given epoch in seconds.
|
|
438
439
|
follow:
|
|
439
440
|
Whether to follow the logs.
|
|
440
441
|
|
|
@@ -479,7 +480,7 @@ async def async_logs_self(
|
|
|
479
480
|
tail:
|
|
480
481
|
The number of lines from the end of the logs to show.
|
|
481
482
|
since:
|
|
482
|
-
Show logs since
|
|
483
|
+
Show logs since the given epoch in seconds.
|
|
483
484
|
follow:
|
|
484
485
|
Whether to follow the logs.
|
|
485
486
|
|
|
@@ -595,6 +596,7 @@ __all__ = [
|
|
|
595
596
|
"ContainerSecurity",
|
|
596
597
|
"DockerWorkloadPlan",
|
|
597
598
|
"DockerWorkloadStatus",
|
|
599
|
+
"KubernetesResourceInjectionPolicyEnum",
|
|
598
600
|
"KubernetesWorkloadPlan",
|
|
599
601
|
"KubernetesWorkloadStatus",
|
|
600
602
|
"OperationError",
|
{gpustack_runtime-0.2.5.post2 → gpustack_runtime-0.2.5.post4}/gpustack_runtime/deployer/docker.py
RENAMED
|
@@ -2105,7 +2105,7 @@ class DockerDeployer(EndoscopicDeployer):
|
|
|
2105
2105
|
|
|
2106
2106
|
logs_options = {
|
|
2107
2107
|
"timestamps": timestamps,
|
|
2108
|
-
"tail": tail if tail >= 0 else None,
|
|
2108
|
+
"tail": tail if tail is not None and tail >= 0 else None,
|
|
2109
2109
|
"since": since,
|
|
2110
2110
|
"follow": follow,
|
|
2111
2111
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
from __future__ import annotations as __future_annotations__
|
|
2
2
|
|
|
3
3
|
import stat
|
|
4
|
+
from enum import Enum
|
|
4
5
|
from functools import lru_cache
|
|
5
6
|
from pathlib import Path
|
|
6
7
|
from typing import TYPE_CHECKING, Any, Literal
|
|
@@ -11,6 +12,36 @@ if TYPE_CHECKING:
|
|
|
11
12
|
from collections.abc import Callable, Mapping
|
|
12
13
|
|
|
13
14
|
|
|
15
|
+
class KubernetesResourceInjectionPolicyEnum(str, Enum):
|
|
16
|
+
"""
|
|
17
|
+
Device injection policies for Kubernetes workloads.
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
AUTO = "Auto"
|
|
21
|
+
"""
|
|
22
|
+
Detect the policy from the target node's allocatable resources.
|
|
23
|
+
"""
|
|
24
|
+
ENV = "Env"
|
|
25
|
+
"""
|
|
26
|
+
Inject runtime-visible device environment variables without device-plugin requests.
|
|
27
|
+
"""
|
|
28
|
+
KDP = "KDP"
|
|
29
|
+
"""
|
|
30
|
+
Request device-plugin resources.
|
|
31
|
+
"""
|
|
32
|
+
|
|
33
|
+
@classmethod
|
|
34
|
+
def _missing_(cls, value: object) -> KubernetesResourceInjectionPolicyEnum | None:
|
|
35
|
+
if isinstance(value, str):
|
|
36
|
+
for member in cls:
|
|
37
|
+
if member.value.lower() == value.lower():
|
|
38
|
+
return member
|
|
39
|
+
return None
|
|
40
|
+
|
|
41
|
+
def __str__(self) -> str:
|
|
42
|
+
return self.value
|
|
43
|
+
|
|
44
|
+
|
|
14
45
|
def is_kubelet_socket_accessible(
|
|
15
46
|
kubelet_endpoint: Path | None = None,
|
|
16
47
|
) -> bool:
|
|
@@ -79,13 +110,16 @@ def node_has_device_plugin_resources(
|
|
|
79
110
|
|
|
80
111
|
def get_resource_injection_policy(
|
|
81
112
|
probe_node_allocatable: Callable[[], Mapping[str, Any] | None] | None = None,
|
|
113
|
+
*,
|
|
114
|
+
policy: KubernetesResourceInjectionPolicyEnum | None = None,
|
|
82
115
|
) -> Literal["env", "kdp"]:
|
|
83
116
|
"""
|
|
84
117
|
Get the resource injection policy (in lowercase) for the deployer.
|
|
85
118
|
|
|
86
|
-
|
|
87
|
-
cluster, not to the process doing the deploying:
|
|
88
|
-
orchestrates remotely, so whether *it* can reach
|
|
119
|
+
A workload policy overrides the environment setting. Under "auto" the
|
|
120
|
+
decision belongs to the cluster, not to the process doing the deploying:
|
|
121
|
+
the Kubernetes deployer orchestrates remotely, so whether *it* can reach
|
|
122
|
+
a kubelet socket says
|
|
89
123
|
nothing about whether the *target* node runs a device plugin. So the probe
|
|
90
124
|
reads that node's allocatable resources and looks for a device-plugin
|
|
91
125
|
resource family there.
|
|
@@ -99,14 +133,29 @@ def get_resource_injection_policy(
|
|
|
99
133
|
probe_node_allocatable:
|
|
100
134
|
Called only under the "auto" policy, to read the target node's
|
|
101
135
|
allocatable resources. Returns None when the node cannot be read.
|
|
136
|
+
policy:
|
|
137
|
+
Workload policy override. None inherits the environment setting;
|
|
138
|
+
Auto probes the node even if the environment selects Env or KDP.
|
|
139
|
+
|
|
140
|
+
Raises:
|
|
141
|
+
ValueError:
|
|
142
|
+
If the policy is not Auto, Env or KDP.
|
|
102
143
|
|
|
103
144
|
Returns:
|
|
104
145
|
The resource injection policy.
|
|
105
146
|
|
|
106
147
|
"""
|
|
107
|
-
policy
|
|
108
|
-
|
|
109
|
-
|
|
148
|
+
if policy is None:
|
|
149
|
+
policy = envs.GPUSTACK_RUNTIME_KUBERNETES_RESOURCE_INJECTION_POLICY
|
|
150
|
+
try:
|
|
151
|
+
policy = KubernetesResourceInjectionPolicyEnum(policy)
|
|
152
|
+
except ValueError as e:
|
|
153
|
+
msg = f"Invalid resource injection policy '{policy}'"
|
|
154
|
+
raise ValueError(msg) from e
|
|
155
|
+
if policy == KubernetesResourceInjectionPolicyEnum.ENV:
|
|
156
|
+
return "env"
|
|
157
|
+
if policy == KubernetesResourceInjectionPolicyEnum.KDP:
|
|
158
|
+
return "kdp"
|
|
110
159
|
|
|
111
160
|
if probe_node_allocatable is None:
|
|
112
161
|
return "kdp"
|
|
@@ -142,6 +191,7 @@ def cdi_kind_to_kdp_resource(
|
|
|
142
191
|
|
|
143
192
|
|
|
144
193
|
__all__ = [
|
|
194
|
+
"KubernetesResourceInjectionPolicyEnum",
|
|
145
195
|
"cdi_kind_to_kdp_resource",
|
|
146
196
|
"get_resource_injection_policy",
|
|
147
197
|
"is_kubelet_socket_accessible",
|