diff --git a/docs/proto/provider.md b/docs/proto/provider.md index 594bfe72..229cef42 100644 --- a/docs/proto/provider.md +++ b/docs/proto/provider.md @@ -863,6 +863,8 @@ | `name` | [string](#string) | | | | `resources` | [NodeResources](#akash.inventory.v1.NodeResources) | | | | `capabilities` | [NodeCapabilities](#akash.inventory.v1.NodeCapabilities) | | | + | `cuda_version` | [string](#string) | | | + | `nvidia_driver_version` | [string](#string) | | | diff --git a/go/inventory/v1/node.go b/go/inventory/v1/node.go index f4e2bca8..c4c0fb12 100644 --- a/go/inventory/v1/node.go +++ b/go/inventory/v1/node.go @@ -26,6 +26,8 @@ func (nd *Node) Dup() Node { Name: nd.Name, Resources: nd.Resources.Dup(), Capabilities: nd.Capabilities.Dup(), + CudaVersion: nd.CudaVersion, + NvidiaDriverVersion: nd.NvidiaDriverVersion, } return res diff --git a/go/inventory/v1/node.pb.go b/go/inventory/v1/node.pb.go index a24862e1..fa5a779a 100644 --- a/go/inventory/v1/node.pb.go +++ b/go/inventory/v1/node.pb.go @@ -70,9 +70,11 @@ func (m *NodeCapabilities) GetStorageClasses() []string { // Node reports node inventory details type Node struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name" yaml:"name"` - Resources NodeResources `protobuf:"bytes,2,opt,name=resources,proto3" json:"resources" yaml:"resources"` - Capabilities NodeCapabilities `protobuf:"bytes,3,opt,name=capabilities,proto3" json:"capabilities" yaml:"capabilities"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name" yaml:"name"` + Resources NodeResources `protobuf:"bytes,2,opt,name=resources,proto3" json:"resources" yaml:"resources"` + Capabilities NodeCapabilities `protobuf:"bytes,3,opt,name=capabilities,proto3" json:"capabilities" yaml:"capabilities"` + CudaVersion string `protobuf:"bytes,4,opt,name=cuda_version,json=cudaVersion,proto3" json:"cuda_version" yaml:"cuda_version"` + NvidiaDriverVersion string `protobuf:"bytes,5,opt,name=nvidia_driver_version,json=nvidiaDriverVersion,proto3" json:"nvidia_driver_version" yaml:"nvidia_driver_version"` } func (m *Node) Reset() { *m = Node{} } @@ -129,6 +131,20 @@ func (m *Node) GetCapabilities() NodeCapabilities { return NodeCapabilities{} } +func (m *Node) GetCudaVersion() string { + if m != nil { + return m.CudaVersion + } + return "" +} + +func (m *Node) GetNvidiaDriverVersion() string { + if m != nil { + return m.NvidiaDriverVersion + } + return "" +} + func init() { proto.RegisterType((*NodeCapabilities)(nil), "akash.inventory.v1.NodeCapabilities") proto.RegisterType((*Node)(nil), "akash.inventory.v1.Node") @@ -137,32 +153,37 @@ func init() { func init() { proto.RegisterFile("akash/inventory/v1/node.proto", fileDescriptor_5f97c0fb35079221) } var fileDescriptor_5f97c0fb35079221 = []byte{ - // 385 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x92, 0x41, 0x6f, 0xa2, 0x40, - 0x1c, 0xc5, 0x19, 0x35, 0x9b, 0x80, 0xc6, 0x35, 0xec, 0x66, 0x43, 0x4c, 0x96, 0x71, 0x27, 0x7b, - 0xf0, 0x22, 0x44, 0xdd, 0xd3, 0xf6, 0xd0, 0x04, 0x93, 0x1e, 0x3d, 0xd0, 0x5b, 0x2f, 0xcd, 0x88, - 0x53, 0x20, 0x0a, 0x43, 0x18, 0x34, 0x31, 0xe9, 0xb5, 0xf7, 0x7e, 0x9c, 0x7e, 0x04, 0x8f, 0x1e, - 0x7b, 0x9a, 0x34, 0x78, 0xe3, 0xc8, 0x27, 0x68, 0x80, 0x16, 0xc1, 0xb6, 0x37, 0x78, 0xbf, 0xc7, - 0x7b, 0x7f, 0xfe, 0xf9, 0x4b, 0xbf, 0xf1, 0x0a, 0x33, 0x47, 0x77, 0xfd, 0x2d, 0xf1, 0x23, 0x1a, - 0xee, 0xf4, 0xed, 0x58, 0xf7, 0xe9, 0x92, 0x68, 0x41, 0x48, 0x23, 0x2a, 0xcb, 0x39, 0xd6, 0x4a, - 0xac, 0x6d, 0xc7, 0xfd, 0x9f, 0x36, 0xb5, 0x69, 0x8e, 0xf5, 0xec, 0xa9, 0x70, 0xf6, 0xd1, 0x27, - 0x41, 0x21, 0x61, 0x74, 0x13, 0x5a, 0x84, 0x15, 0x1e, 0x74, 0x2f, 0xf5, 0xe6, 0x74, 0x49, 0x66, - 0x38, 0xc0, 0x0b, 0x77, 0xed, 0x46, 0x2e, 0x61, 0xb2, 0x23, 0x7d, 0x67, 0x11, 0x0d, 0xb1, 0x4d, - 0x6e, 0xad, 0x35, 0x66, 0x8c, 0x30, 0x05, 0x0c, 0x9a, 0x43, 0xd1, 0xb8, 0x8c, 0x39, 0xec, 0x5e, - 0x17, 0x68, 0x56, 0x90, 0x84, 0xc3, 0x73, 0x73, 0xca, 0xe1, 0xaf, 0x1d, 0xf6, 0xd6, 0xff, 0xd1, - 0x19, 0x40, 0x66, 0x97, 0xd5, 0x3e, 0x46, 0x4f, 0x0d, 0xa9, 0x95, 0xd5, 0xcb, 0x53, 0xa9, 0xe5, - 0x63, 0x8f, 0x28, 0x60, 0x00, 0x86, 0xa2, 0x01, 0x63, 0x0e, 0x5b, 0x73, 0xec, 0x91, 0x84, 0xc3, - 0x5c, 0x4f, 0x39, 0x6c, 0x17, 0x91, 0xd9, 0x1b, 0x32, 0x73, 0x51, 0x66, 0x92, 0x58, 0xfe, 0x8e, - 0xd2, 0x18, 0x80, 0x61, 0x7b, 0xf2, 0x47, 0xfb, 0xb8, 0x1d, 0x2d, 0x6b, 0x30, 0xdf, 0x8d, 0xc6, - 0x64, 0xcf, 0xa1, 0x10, 0x73, 0x28, 0x96, 0x52, 0xc2, 0xe1, 0x29, 0x28, 0xe5, 0xb0, 0x57, 0x54, - 0x95, 0x12, 0x32, 0x4f, 0x58, 0x7e, 0x00, 0x52, 0xc7, 0xaa, 0x6c, 0x4b, 0x69, 0xe6, 0xc5, 0x7f, - 0xbf, 0x2a, 0xae, 0x6e, 0xd6, 0xb8, 0x78, 0xeb, 0xee, 0x54, 0xd5, 0x84, 0xc3, 0x5a, 0x62, 0xca, - 0xe1, 0x8f, 0x62, 0x82, 0xaa, 0x8a, 0xcc, 0x9a, 0xc9, 0x98, 0xef, 0x63, 0x15, 0x1c, 0x62, 0x15, - 0xbc, 0xc4, 0x2a, 0x78, 0x3c, 0xaa, 0xc2, 0xe1, 0xa8, 0x0a, 0xcf, 0x47, 0x55, 0xb8, 0xf9, 0x67, - 0xbb, 0x91, 0xb3, 0x59, 0x68, 0x16, 0xf5, 0x74, 0x16, 0x38, 0x24, 0xa4, 0xfe, 0xd5, 0xd2, 0xd7, - 0xf3, 0xf9, 0x46, 0x38, 0x70, 0x47, 0x77, 0x34, 0x5c, 0xe9, 0x36, 0xad, 0x1d, 0xc6, 0xe2, 0x5b, - 0x7e, 0x0f, 0xd3, 0xd7, 0x00, 0x00, 0x00, 0xff, 0xff, 0x93, 0xcc, 0x20, 0x4b, 0x7e, 0x02, 0x00, - 0x00, + // 474 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x93, 0x31, 0x6f, 0xd3, 0x40, + 0x1c, 0xc5, 0x73, 0xd4, 0x20, 0xe5, 0x12, 0x95, 0xca, 0x01, 0x64, 0x55, 0xe0, 0x0b, 0x27, 0x86, + 0x2c, 0xb5, 0xd5, 0x96, 0xa9, 0x0c, 0x48, 0x0e, 0x62, 0xcc, 0x60, 0x10, 0x03, 0x12, 0x8a, 0x2e, + 0xf6, 0xe1, 0x9c, 0x9a, 0xdc, 0x45, 0x77, 0x8e, 0xa5, 0x4a, 0xac, 0x48, 0x8c, 0x7c, 0x06, 0x3e, + 0x4d, 0xc6, 0x8e, 0x4c, 0x27, 0xe4, 0x6c, 0x19, 0xfd, 0x09, 0x50, 0xce, 0xc1, 0xb1, 0xdb, 0xb0, + 0xd9, 0xef, 0xbd, 0xff, 0xfb, 0xd9, 0xff, 0xb3, 0xe1, 0x0b, 0x72, 0x4d, 0xd4, 0xd4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, 0x5f, 0xfe, 0xe5, 0xdf, 0x00, 0x00, 0x00, + 0xff, 0xff, 0x62, 0x4d, 0xb3, 0x03, 0x68, 0x03, 0x00, 0x00, } func (m *NodeCapabilities) Marshal() (dAtA []byte, err error) { @@ -217,6 +238,20 @@ func (m *Node) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.NvidiaDriverVersion) > 0 { + i -= len(m.NvidiaDriverVersion) + copy(dAtA[i:], m.NvidiaDriverVersion) + i = encodeVarintNode(dAtA, i, uint64(len(m.NvidiaDriverVersion))) + i-- + dAtA[i] = 0x2a + } + if len(m.CudaVersion) > 0 { + i -= len(m.CudaVersion) + copy(dAtA[i:], m.CudaVersion) + i = encodeVarintNode(dAtA, i, uint64(len(m.CudaVersion))) + i-- + dAtA[i] = 0x22 + } { size, err := m.Capabilities.MarshalToSizedBuffer(dAtA[:i]) if err != nil { @@ -287,6 +322,14 @@ func (m *Node) Size() (n int) { n += 1 + l + sovNode(uint64(l)) l = m.Capabilities.Size() n += 1 + l + sovNode(uint64(l)) + l = len(m.CudaVersion) + if l > 0 { + n += 1 + l + sovNode(uint64(l)) + } + l = len(m.NvidiaDriverVersion) + if l > 0 { + n += 1 + l + sovNode(uint64(l)) + } return n } @@ -505,6 +548,70 @@ func (m *Node) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CudaVersion", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNode + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthNode + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthNode + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CudaVersion = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NvidiaDriverVersion", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNode + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthNode + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthNode + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NvidiaDriverVersion = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipNode(dAtA[iNdEx:]) diff --git a/proto/provider/akash/inventory/v1/node.proto b/proto/provider/akash/inventory/v1/node.proto index d97099fb..35616620 100644 --- a/proto/provider/akash/inventory/v1/node.proto +++ b/proto/provider/akash/inventory/v1/node.proto @@ -36,4 +36,18 @@ message Node { (gogoproto.jsontag) = "capabilities", (gogoproto.moretags) = "yaml:\"capabilities\"" ]; + + string cuda_version = 4 [ + (gogoproto.nullable) = true, + (gogoproto.customname) = "CudaVersion", + (gogoproto.jsontag) = "cuda_version", + (gogoproto.moretags) = "yaml:\"cuda_version\"" + ]; + + string nvidia_driver_version = 5 [ + (gogoproto.nullable) = true, + (gogoproto.customname) = "NvidiaDriverVersion", + (gogoproto.jsontag) = "nvidia_driver_version", + (gogoproto.moretags) = "yaml:\"nvidia_driver_version\"" + ]; }