gpustack-runtime 0.1.40.post1__py3-none-any.whl → 0.1.41.post1__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/__init__.py +1 -1
- gpustack_runtime/__main__.py +5 -3
- gpustack_runtime/_version.py +2 -2
- gpustack_runtime/_version_appendix.py +1 -1
- gpustack_runtime/cmds/__init__.py +5 -3
- gpustack_runtime/cmds/__types__.py +1 -1
- gpustack_runtime/cmds/deployer.py +140 -18
- gpustack_runtime/cmds/detector.py +1 -1
- gpustack_runtime/cmds/images.py +1 -1
- gpustack_runtime/deployer/__init__.py +28 -2
- gpustack_runtime/deployer/__patches__.py +1 -1
- gpustack_runtime/deployer/__types__.py +2 -1
- gpustack_runtime/deployer/__utils__.py +2 -2
- gpustack_runtime/deployer/cdi/__init__.py +86 -5
- gpustack_runtime/deployer/cdi/__types__.py +92 -29
- gpustack_runtime/deployer/cdi/__utils__.py +180 -0
- gpustack_runtime/deployer/cdi/amd.py +146 -0
- gpustack_runtime/deployer/cdi/ascend.py +164 -0
- gpustack_runtime/deployer/cdi/hygon.py +147 -0
- gpustack_runtime/deployer/cdi/iluvatar.py +136 -0
- gpustack_runtime/deployer/cdi/metax.py +148 -0
- gpustack_runtime/deployer/cdi/thead.py +57 -23
- gpustack_runtime/deployer/docker.py +9 -8
- gpustack_runtime/deployer/k8s/deviceplugin/__init__.py +325 -0
- gpustack_runtime/deployer/k8s/deviceplugin/__types__.py +131 -0
- gpustack_runtime/deployer/k8s/deviceplugin/plugin.py +590 -0
- gpustack_runtime/deployer/k8s/types/kubelet/deviceplugin/v1beta1/__init__.py +3 -0
- gpustack_runtime/deployer/k8s/types/kubelet/deviceplugin/v1beta1/api.proto +212 -0
- gpustack_runtime/deployer/k8s/types/kubelet/deviceplugin/v1beta1/api_pb2.py +86 -0
- gpustack_runtime/deployer/k8s/types/kubelet/deviceplugin/v1beta1/api_pb2.pyi +168 -0
- gpustack_runtime/deployer/k8s/types/kubelet/deviceplugin/v1beta1/api_pb2_grpc.py +358 -0
- gpustack_runtime/deployer/k8s/types/kubelet/deviceplugin/v1beta1/constants.py +34 -0
- gpustack_runtime/deployer/kuberentes.py +50 -4
- gpustack_runtime/deployer/podman.py +9 -8
- gpustack_runtime/detector/__init__.py +42 -5
- gpustack_runtime/detector/__types__.py +8 -24
- gpustack_runtime/detector/__utils__.py +46 -39
- gpustack_runtime/detector/amd.py +55 -66
- gpustack_runtime/detector/ascend.py +29 -41
- gpustack_runtime/detector/cambricon.py +3 -3
- gpustack_runtime/detector/hygon.py +21 -49
- gpustack_runtime/detector/iluvatar.py +44 -60
- gpustack_runtime/detector/metax.py +54 -37
- gpustack_runtime/detector/mthreads.py +74 -36
- gpustack_runtime/detector/nvidia.py +130 -93
- gpustack_runtime/detector/pyacl/__init__.py +1 -1
- gpustack_runtime/detector/pyamdgpu/__init__.py +1 -1
- gpustack_runtime/detector/pyamdsmi/__init__.py +1 -1
- gpustack_runtime/detector/pycuda/__init__.py +1 -1
- gpustack_runtime/detector/pydcmi/__init__.py +1 -1
- gpustack_runtime/detector/pyhsa/__init__.py +1 -1
- gpustack_runtime/detector/pymxsml/__init__.py +1553 -1
- gpustack_runtime/detector/pyrocmcore/__init__.py +1 -1
- gpustack_runtime/detector/pyrocmsmi/__init__.py +1 -1
- gpustack_runtime/detector/thead.py +41 -60
- gpustack_runtime/envs.py +106 -12
- gpustack_runtime/logging.py +6 -2
- {gpustack_runtime-0.1.40.post1.dist-info → gpustack_runtime-0.1.41.post1.dist-info}/METADATA +6 -1
- gpustack_runtime-0.1.41.post1.dist-info/RECORD +67 -0
- gpustack_runtime/detector/pymxsml/mxsml.py +0 -1580
- gpustack_runtime/detector/pymxsml/mxsml_extension.py +0 -816
- gpustack_runtime/detector/pymxsml/mxsml_mcm.py +0 -476
- gpustack_runtime-0.1.40.post1.dist-info/RECORD +0 -55
- {gpustack_runtime-0.1.40.post1.dist-info → gpustack_runtime-0.1.41.post1.dist-info}/WHEEL +0 -0
- {gpustack_runtime-0.1.40.post1.dist-info → gpustack_runtime-0.1.41.post1.dist-info}/entry_points.txt +0 -0
- {gpustack_runtime-0.1.40.post1.dist-info → gpustack_runtime-0.1.41.post1.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
// To regenerate api.pb.go run `hack/update-codegen.sh protobindings`
|
|
2
|
+
syntax = "proto3";
|
|
3
|
+
|
|
4
|
+
package v1beta1;
|
|
5
|
+
//option go_package = "k8s.io/kubelet/pkg/apis/deviceplugin/v1beta1";
|
|
6
|
+
|
|
7
|
+
// Registration is the service advertised by the Kubelet
|
|
8
|
+
// Only when Kubelet answers with a success code to a Register Request
|
|
9
|
+
// may Device Plugins start their service
|
|
10
|
+
// Registration may fail when device plugin version is not supported by
|
|
11
|
+
// Kubelet or the registered resourceName is already taken by another
|
|
12
|
+
// active device plugin. Device plugin is expected to terminate upon registration failure
|
|
13
|
+
service Registration {
|
|
14
|
+
rpc Register(RegisterRequest) returns (Empty) {}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
message DevicePluginOptions {
|
|
18
|
+
// Indicates if PreStartContainer call is required before each container start
|
|
19
|
+
bool pre_start_required = 1;
|
|
20
|
+
// Indicates if GetPreferredAllocation is implemented and available for calling
|
|
21
|
+
bool get_preferred_allocation_available = 2;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
message RegisterRequest {
|
|
25
|
+
// Version of the API the Device Plugin was built against
|
|
26
|
+
string version = 1;
|
|
27
|
+
// Name of the unix socket the device plugin is listening on
|
|
28
|
+
// PATH = path.Join(DevicePluginPath, endpoint)
|
|
29
|
+
string endpoint = 2;
|
|
30
|
+
// Schedulable resource name. As of now it's expected to be a DNS Label
|
|
31
|
+
string resource_name = 3;
|
|
32
|
+
// Options to be communicated with Device Manager
|
|
33
|
+
DevicePluginOptions options = 4;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
message Empty {
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// DevicePlugin is the service advertised by Device Plugins
|
|
40
|
+
service DevicePlugin {
|
|
41
|
+
// GetDevicePluginOptions returns options to be communicated with Device
|
|
42
|
+
// Manager
|
|
43
|
+
rpc GetDevicePluginOptions(Empty) returns (DevicePluginOptions) {}
|
|
44
|
+
|
|
45
|
+
// ListAndWatch returns a stream of List of Devices
|
|
46
|
+
// Whenever a Device state change or a Device disappears, ListAndWatch
|
|
47
|
+
// returns the new list
|
|
48
|
+
rpc ListAndWatch(Empty) returns (stream ListAndWatchResponse) {}
|
|
49
|
+
|
|
50
|
+
// GetPreferredAllocation returns a preferred set of devices to allocate
|
|
51
|
+
// from a list of available ones. The resulting preferred allocation is not
|
|
52
|
+
// guaranteed to be the allocation ultimately performed by the
|
|
53
|
+
// devicemanager. It is only designed to help the devicemanager make a more
|
|
54
|
+
// informed allocation decision when possible.
|
|
55
|
+
rpc GetPreferredAllocation(PreferredAllocationRequest) returns (PreferredAllocationResponse) {}
|
|
56
|
+
|
|
57
|
+
// Allocate is called during container creation so that the Device
|
|
58
|
+
// Plugin can run device specific operations and instruct Kubelet
|
|
59
|
+
// of the steps to make the Device available in the container
|
|
60
|
+
rpc Allocate(AllocateRequest) returns (AllocateResponse) {}
|
|
61
|
+
|
|
62
|
+
// PreStartContainer is called, if indicated by Device Plugin during registeration phase,
|
|
63
|
+
// before each container start. Device plugin can run device specific operations
|
|
64
|
+
// such as resetting the device before making devices available to the container
|
|
65
|
+
rpc PreStartContainer(PreStartContainerRequest) returns (PreStartContainerResponse) {}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// ListAndWatch returns a stream of List of Devices
|
|
69
|
+
// Whenever a Device state change or a Device disappears, ListAndWatch
|
|
70
|
+
// returns the new list
|
|
71
|
+
message ListAndWatchResponse {
|
|
72
|
+
repeated Device devices = 1;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
message TopologyInfo {
|
|
76
|
+
repeated NUMANode nodes = 1;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
message NUMANode {
|
|
80
|
+
int64 ID = 1;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/* E.g:
|
|
84
|
+
* struct Device {
|
|
85
|
+
* ID: "GPU-fef8089b-4820-abfc-e83e-94318197576e",
|
|
86
|
+
* Health: "Healthy",
|
|
87
|
+
* Topology:
|
|
88
|
+
* Node:
|
|
89
|
+
* ID: 1
|
|
90
|
+
*} */
|
|
91
|
+
message Device {
|
|
92
|
+
// A unique ID assigned by the device plugin used
|
|
93
|
+
// to identify devices during the communication
|
|
94
|
+
// Max length of this field is 63 characters
|
|
95
|
+
string ID = 1;
|
|
96
|
+
// Health of the device, can be healthy or unhealthy, see constants.go
|
|
97
|
+
string health = 2;
|
|
98
|
+
// Topology for device
|
|
99
|
+
TopologyInfo topology = 3;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
// - PreStartContainer is expected to be called before each container start if indicated by plugin during registration phase.
|
|
103
|
+
// - PreStartContainer allows kubelet to pass reinitialized devices to containers.
|
|
104
|
+
// - PreStartContainer allows Device Plugin to run device specific operations on
|
|
105
|
+
// the Devices requested
|
|
106
|
+
message PreStartContainerRequest {
|
|
107
|
+
repeated string devices_ids = 1;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
// PreStartContainerResponse will be send by plugin in response to PreStartContainerRequest
|
|
111
|
+
message PreStartContainerResponse {
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
// PreferredAllocationRequest is passed via a call to GetPreferredAllocation()
|
|
115
|
+
// at pod admission time. The device plugin should take the list of
|
|
116
|
+
// `available_deviceIDs` and calculate a preferred allocation of size
|
|
117
|
+
// 'allocation_size' from them, making sure to include the set of devices
|
|
118
|
+
// listed in 'must_include_deviceIDs'.
|
|
119
|
+
message PreferredAllocationRequest {
|
|
120
|
+
repeated ContainerPreferredAllocationRequest container_requests = 1;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
message ContainerPreferredAllocationRequest {
|
|
124
|
+
// List of available deviceIDs from which to choose a preferred allocation
|
|
125
|
+
repeated string available_deviceIDs = 1;
|
|
126
|
+
// List of deviceIDs that must be included in the preferred allocation
|
|
127
|
+
repeated string must_include_deviceIDs = 2;
|
|
128
|
+
// Number of devices to include in the preferred allocation
|
|
129
|
+
int32 allocation_size = 3;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// PreferredAllocationResponse returns a preferred allocation,
|
|
133
|
+
// resulting from a PreferredAllocationRequest.
|
|
134
|
+
message PreferredAllocationResponse {
|
|
135
|
+
repeated ContainerPreferredAllocationResponse container_responses = 1;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
message ContainerPreferredAllocationResponse {
|
|
139
|
+
repeated string deviceIDs = 1;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
// - Allocate is expected to be called during pod creation since allocation
|
|
143
|
+
// failures for any container would result in pod startup failure.
|
|
144
|
+
// - Allocate allows kubelet to exposes additional artifacts in a pod's
|
|
145
|
+
// environment as directed by the plugin.
|
|
146
|
+
// - Allocate allows Device Plugin to run device specific operations on
|
|
147
|
+
// the Devices requested
|
|
148
|
+
message AllocateRequest {
|
|
149
|
+
repeated ContainerAllocateRequest container_requests = 1;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
message ContainerAllocateRequest {
|
|
153
|
+
repeated string devices_ids = 1;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
// CDIDevice specifies a CDI device information.
|
|
157
|
+
message CDIDevice {
|
|
158
|
+
// Fully qualified CDI device name
|
|
159
|
+
// for example: vendor.com/gpu=gpudevice1
|
|
160
|
+
// see more details in the CDI specification:
|
|
161
|
+
// https://github.com/container-orchestrated-devices/container-device-interface/blob/main/SPEC.md
|
|
162
|
+
string name = 1;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
// AllocateResponse includes the artifacts that needs to be injected into
|
|
166
|
+
// a container for accessing 'deviceIDs' that were mentioned as part of
|
|
167
|
+
// 'AllocateRequest'.
|
|
168
|
+
// Failure Handling:
|
|
169
|
+
// if Kubelet sends an allocation request for dev1 and dev2.
|
|
170
|
+
// Allocation on dev1 succeeds but allocation on dev2 fails.
|
|
171
|
+
// The Device plugin should send a ListAndWatch update and fail the
|
|
172
|
+
// Allocation request
|
|
173
|
+
message AllocateResponse {
|
|
174
|
+
repeated ContainerAllocateResponse container_responses = 1;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
message ContainerAllocateResponse {
|
|
178
|
+
// List of environment variable to be set in the container to access one of more devices.
|
|
179
|
+
map<string, string> envs = 1;
|
|
180
|
+
// Mounts for the container.
|
|
181
|
+
repeated Mount mounts = 2;
|
|
182
|
+
// Devices for the container.
|
|
183
|
+
repeated DeviceSpec devices = 3;
|
|
184
|
+
// Container annotations to pass to the container runtime
|
|
185
|
+
map<string, string> annotations = 4;
|
|
186
|
+
// CDI devices for the container.
|
|
187
|
+
repeated CDIDevice cdi_devices = 5;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
// Mount specifies a host volume to mount into a container.
|
|
191
|
+
// where device library or tools are installed on host and container
|
|
192
|
+
message Mount {
|
|
193
|
+
// Path of the mount within the container.
|
|
194
|
+
string container_path = 1;
|
|
195
|
+
// Path of the mount on the host.
|
|
196
|
+
string host_path = 2;
|
|
197
|
+
// If set, the mount is read-only.
|
|
198
|
+
bool read_only = 3;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
// DeviceSpec specifies a host device to mount into a container.
|
|
202
|
+
message DeviceSpec {
|
|
203
|
+
// Path of the device within the container.
|
|
204
|
+
string container_path = 1;
|
|
205
|
+
// Path of the device on the host.
|
|
206
|
+
string host_path = 2;
|
|
207
|
+
// Cgroups permissions of the device, candidates are one or more of
|
|
208
|
+
// * r - allows container to read from the specified device.
|
|
209
|
+
// * w - allows container to write to the specified device.
|
|
210
|
+
// * m - allows container to create device files that do not yet exist.
|
|
211
|
+
string permissions = 3;
|
|
212
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# NO CHECKED-IN PROTOBUF GENCODE
|
|
4
|
+
# source: gpustack_runtime/deployer/k8s/types/kubelet/deviceplugin/v1beta1/api.proto
|
|
5
|
+
# Protobuf Python Version: 5.28.3
|
|
6
|
+
"""Generated protocol buffer code."""
|
|
7
|
+
from google.protobuf import descriptor as _descriptor
|
|
8
|
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
9
|
+
from google.protobuf import runtime_version as _runtime_version
|
|
10
|
+
from google.protobuf import symbol_database as _symbol_database
|
|
11
|
+
from google.protobuf.internal import builder as _builder
|
|
12
|
+
_runtime_version.ValidateProtobufRuntimeVersion(
|
|
13
|
+
_runtime_version.Domain.PUBLIC,
|
|
14
|
+
5,
|
|
15
|
+
28,
|
|
16
|
+
3,
|
|
17
|
+
'',
|
|
18
|
+
'gpustack_runtime/deployer/k8s/types/kubelet/deviceplugin/v1beta1/api.proto'
|
|
19
|
+
)
|
|
20
|
+
# @@protoc_insertion_point(imports)
|
|
21
|
+
|
|
22
|
+
_sym_db = _symbol_database.Default()
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\nJgpustack_runtime/deployer/k8s/types/kubelet/deviceplugin/v1beta1/api.proto\x12\x07v1beta1\"\x90\x01\n\x13\x44\x65vicePluginOptions\x12,\n\x12pre_start_required\x18\x01 \x01(\x08R\x10preStartRequired\x12K\n\"get_preferred_allocation_available\x18\x02 \x01(\x08R\x1fgetPreferredAllocationAvailable\"\xa4\x01\n\x0fRegisterRequest\x12\x18\n\x07version\x18\x01 \x01(\tR\x07version\x12\x1a\n\x08\x65ndpoint\x18\x02 \x01(\tR\x08\x65ndpoint\x12#\n\rresource_name\x18\x03 \x01(\tR\x0cresourceName\x12\x36\n\x07options\x18\x04 \x01(\x0b\x32\x1c.v1beta1.DevicePluginOptionsR\x07options\"\x07\n\x05\x45mpty\"A\n\x14ListAndWatchResponse\x12)\n\x07\x64\x65vices\x18\x01 \x03(\x0b\x32\x0f.v1beta1.DeviceR\x07\x64\x65vices\"7\n\x0cTopologyInfo\x12\'\n\x05nodes\x18\x01 \x03(\x0b\x32\x11.v1beta1.NUMANodeR\x05nodes\"\x1a\n\x08NUMANode\x12\x0e\n\x02ID\x18\x01 \x01(\x03R\x02ID\"c\n\x06\x44\x65vice\x12\x0e\n\x02ID\x18\x01 \x01(\tR\x02ID\x12\x16\n\x06health\x18\x02 \x01(\tR\x06health\x12\x31\n\x08topology\x18\x03 \x01(\x0b\x32\x15.v1beta1.TopologyInfoR\x08topology\";\n\x18PreStartContainerRequest\x12\x1f\n\x0b\x64\x65vices_ids\x18\x01 \x03(\tR\ndevicesIds\"\x1b\n\x19PreStartContainerResponse\"y\n\x1aPreferredAllocationRequest\x12[\n\x12\x63ontainer_requests\x18\x01 \x03(\x0b\x32,.v1beta1.ContainerPreferredAllocationRequestR\x11\x63ontainerRequests\"\xb5\x01\n#ContainerPreferredAllocationRequest\x12/\n\x13\x61vailable_deviceIDs\x18\x01 \x03(\tR\x12\x61vailableDeviceIDs\x12\x34\n\x16must_include_deviceIDs\x18\x02 \x03(\tR\x14mustIncludeDeviceIDs\x12\'\n\x0f\x61llocation_size\x18\x03 \x01(\x05R\x0e\x61llocationSize\"}\n\x1bPreferredAllocationResponse\x12^\n\x13\x63ontainer_responses\x18\x01 \x03(\x0b\x32-.v1beta1.ContainerPreferredAllocationResponseR\x12\x63ontainerResponses\"D\n$ContainerPreferredAllocationResponse\x12\x1c\n\tdeviceIDs\x18\x01 \x03(\tR\tdeviceIDs\"c\n\x0f\x41llocateRequest\x12P\n\x12\x63ontainer_requests\x18\x01 \x03(\x0b\x32!.v1beta1.ContainerAllocateRequestR\x11\x63ontainerRequests\";\n\x18\x43ontainerAllocateRequest\x12\x1f\n\x0b\x64\x65vices_ids\x18\x01 \x03(\tR\ndevicesIds\"\x1f\n\tCDIDevice\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\"g\n\x10\x41llocateResponse\x12S\n\x13\x63ontainer_responses\x18\x01 \x03(\x0b\x32\".v1beta1.ContainerAllocateResponseR\x12\x63ontainerResponses\"\xb9\x03\n\x19\x43ontainerAllocateResponse\x12@\n\x04\x65nvs\x18\x01 \x03(\x0b\x32,.v1beta1.ContainerAllocateResponse.EnvsEntryR\x04\x65nvs\x12&\n\x06mounts\x18\x02 \x03(\x0b\x32\x0e.v1beta1.MountR\x06mounts\x12-\n\x07\x64\x65vices\x18\x03 \x03(\x0b\x32\x13.v1beta1.DeviceSpecR\x07\x64\x65vices\x12U\n\x0b\x61nnotations\x18\x04 \x03(\x0b\x32\x33.v1beta1.ContainerAllocateResponse.AnnotationsEntryR\x0b\x61nnotations\x12\x33\n\x0b\x63\x64i_devices\x18\x05 \x03(\x0b\x32\x12.v1beta1.CDIDeviceR\ncdiDevices\x1a\x37\n\tEnvsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\x1a>\n\x10\x41nnotationsEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"h\n\x05Mount\x12%\n\x0e\x63ontainer_path\x18\x01 \x01(\tR\rcontainerPath\x12\x1b\n\thost_path\x18\x02 \x01(\tR\x08hostPath\x12\x1b\n\tread_only\x18\x03 \x01(\x08R\x08readOnly\"r\n\nDeviceSpec\x12%\n\x0e\x63ontainer_path\x18\x01 \x01(\tR\rcontainerPath\x12\x1b\n\thost_path\x18\x02 \x01(\tR\x08hostPath\x12 \n\x0bpermissions\x18\x03 \x01(\tR\x0bpermissions2F\n\x0cRegistration\x12\x36\n\x08Register\x12\x18.v1beta1.RegisterRequest\x1a\x0e.v1beta1.Empty\"\x00\x32\xa3\x03\n\x0c\x44\x65vicePlugin\x12H\n\x16GetDevicePluginOptions\x12\x0e.v1beta1.Empty\x1a\x1c.v1beta1.DevicePluginOptions\"\x00\x12\x41\n\x0cListAndWatch\x12\x0e.v1beta1.Empty\x1a\x1d.v1beta1.ListAndWatchResponse\"\x00\x30\x01\x12\x65\n\x16GetPreferredAllocation\x12#.v1beta1.PreferredAllocationRequest\x1a$.v1beta1.PreferredAllocationResponse\"\x00\x12\x41\n\x08\x41llocate\x12\x18.v1beta1.AllocateRequest\x1a\x19.v1beta1.AllocateResponse\"\x00\x12\\\n\x11PreStartContainer\x12!.v1beta1.PreStartContainerRequest\x1a\".v1beta1.PreStartContainerResponse\"\x00\x62\x06proto3')
|
|
28
|
+
|
|
29
|
+
_globals = globals()
|
|
30
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
31
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'gpustack_runtime.deployer.k8s.types.kubelet.deviceplugin.v1beta1.api_pb2', _globals)
|
|
32
|
+
if not _descriptor._USE_C_DESCRIPTORS:
|
|
33
|
+
DESCRIPTOR._loaded_options = None
|
|
34
|
+
_globals['_CONTAINERALLOCATERESPONSE_ENVSENTRY']._loaded_options = None
|
|
35
|
+
_globals['_CONTAINERALLOCATERESPONSE_ENVSENTRY']._serialized_options = b'8\001'
|
|
36
|
+
_globals['_CONTAINERALLOCATERESPONSE_ANNOTATIONSENTRY']._loaded_options = None
|
|
37
|
+
_globals['_CONTAINERALLOCATERESPONSE_ANNOTATIONSENTRY']._serialized_options = b'8\001'
|
|
38
|
+
_globals['_DEVICEPLUGINOPTIONS']._serialized_start=88
|
|
39
|
+
_globals['_DEVICEPLUGINOPTIONS']._serialized_end=232
|
|
40
|
+
_globals['_REGISTERREQUEST']._serialized_start=235
|
|
41
|
+
_globals['_REGISTERREQUEST']._serialized_end=399
|
|
42
|
+
_globals['_EMPTY']._serialized_start=401
|
|
43
|
+
_globals['_EMPTY']._serialized_end=408
|
|
44
|
+
_globals['_LISTANDWATCHRESPONSE']._serialized_start=410
|
|
45
|
+
_globals['_LISTANDWATCHRESPONSE']._serialized_end=475
|
|
46
|
+
_globals['_TOPOLOGYINFO']._serialized_start=477
|
|
47
|
+
_globals['_TOPOLOGYINFO']._serialized_end=532
|
|
48
|
+
_globals['_NUMANODE']._serialized_start=534
|
|
49
|
+
_globals['_NUMANODE']._serialized_end=560
|
|
50
|
+
_globals['_DEVICE']._serialized_start=562
|
|
51
|
+
_globals['_DEVICE']._serialized_end=661
|
|
52
|
+
_globals['_PRESTARTCONTAINERREQUEST']._serialized_start=663
|
|
53
|
+
_globals['_PRESTARTCONTAINERREQUEST']._serialized_end=722
|
|
54
|
+
_globals['_PRESTARTCONTAINERRESPONSE']._serialized_start=724
|
|
55
|
+
_globals['_PRESTARTCONTAINERRESPONSE']._serialized_end=751
|
|
56
|
+
_globals['_PREFERREDALLOCATIONREQUEST']._serialized_start=753
|
|
57
|
+
_globals['_PREFERREDALLOCATIONREQUEST']._serialized_end=874
|
|
58
|
+
_globals['_CONTAINERPREFERREDALLOCATIONREQUEST']._serialized_start=877
|
|
59
|
+
_globals['_CONTAINERPREFERREDALLOCATIONREQUEST']._serialized_end=1058
|
|
60
|
+
_globals['_PREFERREDALLOCATIONRESPONSE']._serialized_start=1060
|
|
61
|
+
_globals['_PREFERREDALLOCATIONRESPONSE']._serialized_end=1185
|
|
62
|
+
_globals['_CONTAINERPREFERREDALLOCATIONRESPONSE']._serialized_start=1187
|
|
63
|
+
_globals['_CONTAINERPREFERREDALLOCATIONRESPONSE']._serialized_end=1255
|
|
64
|
+
_globals['_ALLOCATEREQUEST']._serialized_start=1257
|
|
65
|
+
_globals['_ALLOCATEREQUEST']._serialized_end=1356
|
|
66
|
+
_globals['_CONTAINERALLOCATEREQUEST']._serialized_start=1358
|
|
67
|
+
_globals['_CONTAINERALLOCATEREQUEST']._serialized_end=1417
|
|
68
|
+
_globals['_CDIDEVICE']._serialized_start=1419
|
|
69
|
+
_globals['_CDIDEVICE']._serialized_end=1450
|
|
70
|
+
_globals['_ALLOCATERESPONSE']._serialized_start=1452
|
|
71
|
+
_globals['_ALLOCATERESPONSE']._serialized_end=1555
|
|
72
|
+
_globals['_CONTAINERALLOCATERESPONSE']._serialized_start=1558
|
|
73
|
+
_globals['_CONTAINERALLOCATERESPONSE']._serialized_end=1999
|
|
74
|
+
_globals['_CONTAINERALLOCATERESPONSE_ENVSENTRY']._serialized_start=1880
|
|
75
|
+
_globals['_CONTAINERALLOCATERESPONSE_ENVSENTRY']._serialized_end=1935
|
|
76
|
+
_globals['_CONTAINERALLOCATERESPONSE_ANNOTATIONSENTRY']._serialized_start=1937
|
|
77
|
+
_globals['_CONTAINERALLOCATERESPONSE_ANNOTATIONSENTRY']._serialized_end=1999
|
|
78
|
+
_globals['_MOUNT']._serialized_start=2001
|
|
79
|
+
_globals['_MOUNT']._serialized_end=2105
|
|
80
|
+
_globals['_DEVICESPEC']._serialized_start=2107
|
|
81
|
+
_globals['_DEVICESPEC']._serialized_end=2221
|
|
82
|
+
_globals['_REGISTRATION']._serialized_start=2223
|
|
83
|
+
_globals['_REGISTRATION']._serialized_end=2293
|
|
84
|
+
_globals['_DEVICEPLUGIN']._serialized_start=2296
|
|
85
|
+
_globals['_DEVICEPLUGIN']._serialized_end=2715
|
|
86
|
+
# @@protoc_insertion_point(module_scope)
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
from google.protobuf.internal import containers as _containers
|
|
2
|
+
from google.protobuf import descriptor as _descriptor
|
|
3
|
+
from google.protobuf import message as _message
|
|
4
|
+
from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union
|
|
5
|
+
|
|
6
|
+
DESCRIPTOR: _descriptor.FileDescriptor
|
|
7
|
+
|
|
8
|
+
class DevicePluginOptions(_message.Message):
|
|
9
|
+
__slots__ = ("pre_start_required", "get_preferred_allocation_available")
|
|
10
|
+
PRE_START_REQUIRED_FIELD_NUMBER: _ClassVar[int]
|
|
11
|
+
GET_PREFERRED_ALLOCATION_AVAILABLE_FIELD_NUMBER: _ClassVar[int]
|
|
12
|
+
pre_start_required: bool
|
|
13
|
+
get_preferred_allocation_available: bool
|
|
14
|
+
def __init__(self, pre_start_required: bool = ..., get_preferred_allocation_available: bool = ...) -> None: ...
|
|
15
|
+
|
|
16
|
+
class RegisterRequest(_message.Message):
|
|
17
|
+
__slots__ = ("version", "endpoint", "resource_name", "options")
|
|
18
|
+
VERSION_FIELD_NUMBER: _ClassVar[int]
|
|
19
|
+
ENDPOINT_FIELD_NUMBER: _ClassVar[int]
|
|
20
|
+
RESOURCE_NAME_FIELD_NUMBER: _ClassVar[int]
|
|
21
|
+
OPTIONS_FIELD_NUMBER: _ClassVar[int]
|
|
22
|
+
version: str
|
|
23
|
+
endpoint: str
|
|
24
|
+
resource_name: str
|
|
25
|
+
options: DevicePluginOptions
|
|
26
|
+
def __init__(self, version: _Optional[str] = ..., endpoint: _Optional[str] = ..., resource_name: _Optional[str] = ..., options: _Optional[_Union[DevicePluginOptions, _Mapping]] = ...) -> None: ...
|
|
27
|
+
|
|
28
|
+
class Empty(_message.Message):
|
|
29
|
+
__slots__ = ()
|
|
30
|
+
def __init__(self) -> None: ...
|
|
31
|
+
|
|
32
|
+
class ListAndWatchResponse(_message.Message):
|
|
33
|
+
__slots__ = ("devices",)
|
|
34
|
+
DEVICES_FIELD_NUMBER: _ClassVar[int]
|
|
35
|
+
devices: _containers.RepeatedCompositeFieldContainer[Device]
|
|
36
|
+
def __init__(self, devices: _Optional[_Iterable[_Union[Device, _Mapping]]] = ...) -> None: ...
|
|
37
|
+
|
|
38
|
+
class TopologyInfo(_message.Message):
|
|
39
|
+
__slots__ = ("nodes",)
|
|
40
|
+
NODES_FIELD_NUMBER: _ClassVar[int]
|
|
41
|
+
nodes: _containers.RepeatedCompositeFieldContainer[NUMANode]
|
|
42
|
+
def __init__(self, nodes: _Optional[_Iterable[_Union[NUMANode, _Mapping]]] = ...) -> None: ...
|
|
43
|
+
|
|
44
|
+
class NUMANode(_message.Message):
|
|
45
|
+
__slots__ = ("ID",)
|
|
46
|
+
ID_FIELD_NUMBER: _ClassVar[int]
|
|
47
|
+
ID: int
|
|
48
|
+
def __init__(self, ID: _Optional[int] = ...) -> None: ...
|
|
49
|
+
|
|
50
|
+
class Device(_message.Message):
|
|
51
|
+
__slots__ = ("ID", "health", "topology")
|
|
52
|
+
ID_FIELD_NUMBER: _ClassVar[int]
|
|
53
|
+
HEALTH_FIELD_NUMBER: _ClassVar[int]
|
|
54
|
+
TOPOLOGY_FIELD_NUMBER: _ClassVar[int]
|
|
55
|
+
ID: str
|
|
56
|
+
health: str
|
|
57
|
+
topology: TopologyInfo
|
|
58
|
+
def __init__(self, ID: _Optional[str] = ..., health: _Optional[str] = ..., topology: _Optional[_Union[TopologyInfo, _Mapping]] = ...) -> None: ...
|
|
59
|
+
|
|
60
|
+
class PreStartContainerRequest(_message.Message):
|
|
61
|
+
__slots__ = ("devices_ids",)
|
|
62
|
+
DEVICES_IDS_FIELD_NUMBER: _ClassVar[int]
|
|
63
|
+
devices_ids: _containers.RepeatedScalarFieldContainer[str]
|
|
64
|
+
def __init__(self, devices_ids: _Optional[_Iterable[str]] = ...) -> None: ...
|
|
65
|
+
|
|
66
|
+
class PreStartContainerResponse(_message.Message):
|
|
67
|
+
__slots__ = ()
|
|
68
|
+
def __init__(self) -> None: ...
|
|
69
|
+
|
|
70
|
+
class PreferredAllocationRequest(_message.Message):
|
|
71
|
+
__slots__ = ("container_requests",)
|
|
72
|
+
CONTAINER_REQUESTS_FIELD_NUMBER: _ClassVar[int]
|
|
73
|
+
container_requests: _containers.RepeatedCompositeFieldContainer[ContainerPreferredAllocationRequest]
|
|
74
|
+
def __init__(self, container_requests: _Optional[_Iterable[_Union[ContainerPreferredAllocationRequest, _Mapping]]] = ...) -> None: ...
|
|
75
|
+
|
|
76
|
+
class ContainerPreferredAllocationRequest(_message.Message):
|
|
77
|
+
__slots__ = ("available_deviceIDs", "must_include_deviceIDs", "allocation_size")
|
|
78
|
+
AVAILABLE_DEVICEIDS_FIELD_NUMBER: _ClassVar[int]
|
|
79
|
+
MUST_INCLUDE_DEVICEIDS_FIELD_NUMBER: _ClassVar[int]
|
|
80
|
+
ALLOCATION_SIZE_FIELD_NUMBER: _ClassVar[int]
|
|
81
|
+
available_deviceIDs: _containers.RepeatedScalarFieldContainer[str]
|
|
82
|
+
must_include_deviceIDs: _containers.RepeatedScalarFieldContainer[str]
|
|
83
|
+
allocation_size: int
|
|
84
|
+
def __init__(self, available_deviceIDs: _Optional[_Iterable[str]] = ..., must_include_deviceIDs: _Optional[_Iterable[str]] = ..., allocation_size: _Optional[int] = ...) -> None: ...
|
|
85
|
+
|
|
86
|
+
class PreferredAllocationResponse(_message.Message):
|
|
87
|
+
__slots__ = ("container_responses",)
|
|
88
|
+
CONTAINER_RESPONSES_FIELD_NUMBER: _ClassVar[int]
|
|
89
|
+
container_responses: _containers.RepeatedCompositeFieldContainer[ContainerPreferredAllocationResponse]
|
|
90
|
+
def __init__(self, container_responses: _Optional[_Iterable[_Union[ContainerPreferredAllocationResponse, _Mapping]]] = ...) -> None: ...
|
|
91
|
+
|
|
92
|
+
class ContainerPreferredAllocationResponse(_message.Message):
|
|
93
|
+
__slots__ = ("deviceIDs",)
|
|
94
|
+
DEVICEIDS_FIELD_NUMBER: _ClassVar[int]
|
|
95
|
+
deviceIDs: _containers.RepeatedScalarFieldContainer[str]
|
|
96
|
+
def __init__(self, deviceIDs: _Optional[_Iterable[str]] = ...) -> None: ...
|
|
97
|
+
|
|
98
|
+
class AllocateRequest(_message.Message):
|
|
99
|
+
__slots__ = ("container_requests",)
|
|
100
|
+
CONTAINER_REQUESTS_FIELD_NUMBER: _ClassVar[int]
|
|
101
|
+
container_requests: _containers.RepeatedCompositeFieldContainer[ContainerAllocateRequest]
|
|
102
|
+
def __init__(self, container_requests: _Optional[_Iterable[_Union[ContainerAllocateRequest, _Mapping]]] = ...) -> None: ...
|
|
103
|
+
|
|
104
|
+
class ContainerAllocateRequest(_message.Message):
|
|
105
|
+
__slots__ = ("devices_ids",)
|
|
106
|
+
DEVICES_IDS_FIELD_NUMBER: _ClassVar[int]
|
|
107
|
+
devices_ids: _containers.RepeatedScalarFieldContainer[str]
|
|
108
|
+
def __init__(self, devices_ids: _Optional[_Iterable[str]] = ...) -> None: ...
|
|
109
|
+
|
|
110
|
+
class CDIDevice(_message.Message):
|
|
111
|
+
__slots__ = ("name",)
|
|
112
|
+
NAME_FIELD_NUMBER: _ClassVar[int]
|
|
113
|
+
name: str
|
|
114
|
+
def __init__(self, name: _Optional[str] = ...) -> None: ...
|
|
115
|
+
|
|
116
|
+
class AllocateResponse(_message.Message):
|
|
117
|
+
__slots__ = ("container_responses",)
|
|
118
|
+
CONTAINER_RESPONSES_FIELD_NUMBER: _ClassVar[int]
|
|
119
|
+
container_responses: _containers.RepeatedCompositeFieldContainer[ContainerAllocateResponse]
|
|
120
|
+
def __init__(self, container_responses: _Optional[_Iterable[_Union[ContainerAllocateResponse, _Mapping]]] = ...) -> None: ...
|
|
121
|
+
|
|
122
|
+
class ContainerAllocateResponse(_message.Message):
|
|
123
|
+
__slots__ = ("envs", "mounts", "devices", "annotations", "cdi_devices")
|
|
124
|
+
class EnvsEntry(_message.Message):
|
|
125
|
+
__slots__ = ("key", "value")
|
|
126
|
+
KEY_FIELD_NUMBER: _ClassVar[int]
|
|
127
|
+
VALUE_FIELD_NUMBER: _ClassVar[int]
|
|
128
|
+
key: str
|
|
129
|
+
value: str
|
|
130
|
+
def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ...
|
|
131
|
+
class AnnotationsEntry(_message.Message):
|
|
132
|
+
__slots__ = ("key", "value")
|
|
133
|
+
KEY_FIELD_NUMBER: _ClassVar[int]
|
|
134
|
+
VALUE_FIELD_NUMBER: _ClassVar[int]
|
|
135
|
+
key: str
|
|
136
|
+
value: str
|
|
137
|
+
def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ...
|
|
138
|
+
ENVS_FIELD_NUMBER: _ClassVar[int]
|
|
139
|
+
MOUNTS_FIELD_NUMBER: _ClassVar[int]
|
|
140
|
+
DEVICES_FIELD_NUMBER: _ClassVar[int]
|
|
141
|
+
ANNOTATIONS_FIELD_NUMBER: _ClassVar[int]
|
|
142
|
+
CDI_DEVICES_FIELD_NUMBER: _ClassVar[int]
|
|
143
|
+
envs: _containers.ScalarMap[str, str]
|
|
144
|
+
mounts: _containers.RepeatedCompositeFieldContainer[Mount]
|
|
145
|
+
devices: _containers.RepeatedCompositeFieldContainer[DeviceSpec]
|
|
146
|
+
annotations: _containers.ScalarMap[str, str]
|
|
147
|
+
cdi_devices: _containers.RepeatedCompositeFieldContainer[CDIDevice]
|
|
148
|
+
def __init__(self, envs: _Optional[_Mapping[str, str]] = ..., mounts: _Optional[_Iterable[_Union[Mount, _Mapping]]] = ..., devices: _Optional[_Iterable[_Union[DeviceSpec, _Mapping]]] = ..., annotations: _Optional[_Mapping[str, str]] = ..., cdi_devices: _Optional[_Iterable[_Union[CDIDevice, _Mapping]]] = ...) -> None: ...
|
|
149
|
+
|
|
150
|
+
class Mount(_message.Message):
|
|
151
|
+
__slots__ = ("container_path", "host_path", "read_only")
|
|
152
|
+
CONTAINER_PATH_FIELD_NUMBER: _ClassVar[int]
|
|
153
|
+
HOST_PATH_FIELD_NUMBER: _ClassVar[int]
|
|
154
|
+
READ_ONLY_FIELD_NUMBER: _ClassVar[int]
|
|
155
|
+
container_path: str
|
|
156
|
+
host_path: str
|
|
157
|
+
read_only: bool
|
|
158
|
+
def __init__(self, container_path: _Optional[str] = ..., host_path: _Optional[str] = ..., read_only: bool = ...) -> None: ...
|
|
159
|
+
|
|
160
|
+
class DeviceSpec(_message.Message):
|
|
161
|
+
__slots__ = ("container_path", "host_path", "permissions")
|
|
162
|
+
CONTAINER_PATH_FIELD_NUMBER: _ClassVar[int]
|
|
163
|
+
HOST_PATH_FIELD_NUMBER: _ClassVar[int]
|
|
164
|
+
PERMISSIONS_FIELD_NUMBER: _ClassVar[int]
|
|
165
|
+
container_path: str
|
|
166
|
+
host_path: str
|
|
167
|
+
permissions: str
|
|
168
|
+
def __init__(self, container_path: _Optional[str] = ..., host_path: _Optional[str] = ..., permissions: _Optional[str] = ...) -> None: ...
|