diff --git a/docs/proto/provider.md b/docs/proto/provider.md index aa7fe3f4..594bfe72 100644 --- a/docs/proto/provider.md +++ b/docs/proto/provider.md @@ -826,6 +826,10 @@ | `volumes_mounted` | [ResourcePair](#akash.inventory.v1.ResourcePair) | | | | `version` | [string](#string) | | | | `bandwidth` | [string](#string) | | | + | `os` | [string](#string) | | | + | `arch` | [string](#string) | | | + | `cuda_version` | [string](#string) | | | + | `nvidia_driver_version` | [string](#string) | | | diff --git a/go/inventory/v1/metrics.go b/go/inventory/v1/metrics.go index d9e97faa..2f7482d0 100644 --- a/go/inventory/v1/metrics.go +++ b/go/inventory/v1/metrics.go @@ -15,11 +15,15 @@ type ResourcesMetric struct { } type NodeMetrics struct { - Name string `json:"name"` - Allocatable ResourcesMetric `json:"allocatable"` - Available ResourcesMetric `json:"available"` - Bandwidth string `json:"bandwidth,omitempty"` - Version string `json:"version,omitempty"` + Name string `json:"name"` + Allocatable ResourcesMetric `json:"allocatable"` + Available ResourcesMetric `json:"available"` + Bandwidth string `json:"bandwidth,omitempty"` + Version string `json:"version,omitempty"` + Os string `json:"os,omitempty"` + Arch string `json:"arch,omitempty"` + CudaVersion string `json:"cuda_version,omitempty"` + NvidiaDriverVersion string `json:"nvidia_driver_version,omitempty"` } type Metrics struct { diff --git a/go/inventory/v1/resources.go b/go/inventory/v1/resources.go index 59104df3..6c23348f 100644 --- a/go/inventory/v1/resources.go +++ b/go/inventory/v1/resources.go @@ -10,6 +10,10 @@ func (s *NodeResources) Dup() NodeResources { VolumesMounted: s.VolumesMounted.Dup(), Version: s.Version, Bandwidth: s.Bandwidth, + Os: s.Os, + Arch: s.Arch, + CudaVersion: s.CudaVersion, + NvidiaDriverVersion: s.NvidiaDriverVersion, } return res diff --git a/go/inventory/v1/resources.pb.go b/go/inventory/v1/resources.pb.go index a4932a01..b4614a76 100644 --- a/go/inventory/v1/resources.pb.go +++ b/go/inventory/v1/resources.pb.go @@ -25,14 +25,18 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // NodeResources reports node inventory details type NodeResources struct { - CPU CPU `protobuf:"bytes,1,opt,name=cpu,proto3" json:"cpu" yaml:"cpu"` - Memory Memory `protobuf:"bytes,2,opt,name=memory,proto3" json:"memory" yaml:"memory"` - GPU GPU `protobuf:"bytes,3,opt,name=gpu,proto3,castrepeated=GPUs" json:"gpu" yaml:"gpu"` - EphemeralStorage ResourcePair `protobuf:"bytes,4,opt,name=ephemeral_storage,json=ephemeralStorage,proto3" json:"ephemeral_storage" yaml:"ephemeral_storage"` - VolumesAttached ResourcePair `protobuf:"bytes,5,opt,name=volumes_attached,json=volumesAttached,proto3" json:"volumes_attached" yaml:"volumes_attached"` - VolumesMounted ResourcePair `protobuf:"bytes,6,opt,name=volumes_mounted,json=volumesMounted,proto3" json:"volumes_mounted" yaml:"volumes_mounted"` - Version string `protobuf:"bytes,7,opt,name=version,proto3" json:"version" yaml:"version"` - Bandwidth string `protobuf:"bytes,8,opt,name=bandwidth,proto3" json:"bandwidth" yaml:"bandwidth"` + CPU CPU `protobuf:"bytes,1,opt,name=cpu,proto3" json:"cpu" yaml:"cpu"` + Memory Memory `protobuf:"bytes,2,opt,name=memory,proto3" json:"memory" yaml:"memory"` + GPU GPU `protobuf:"bytes,3,opt,name=gpu,proto3,castrepeated=GPUs" json:"gpu" yaml:"gpu"` + EphemeralStorage ResourcePair `protobuf:"bytes,4,opt,name=ephemeral_storage,json=ephemeralStorage,proto3" json:"ephemeral_storage" yaml:"ephemeral_storage"` + VolumesAttached ResourcePair `protobuf:"bytes,5,opt,name=volumes_attached,json=volumesAttached,proto3" json:"volumes_attached" yaml:"volumes_attached"` + VolumesMounted ResourcePair `protobuf:"bytes,6,opt,name=volumes_mounted,json=volumesMounted,proto3" json:"volumes_mounted" yaml:"volumes_mounted"` + Version string `protobuf:"bytes,7,opt,name=version,proto3" json:"version" yaml:"version"` + Bandwidth string `protobuf:"bytes,8,opt,name=bandwidth,proto3" json:"bandwidth" yaml:"bandwidth"` + Os string `protobuf:"bytes,9,opt,name=os,proto3" json:"os" yaml:"os"` + Arch string `protobuf:"bytes,10,opt,name=arch,proto3" json:"arch" yaml:"arch"` + CudaVersion string `protobuf:"bytes,11,opt,name=cuda_version,json=cudaVersion,proto3" json:"cuda_version" yaml:"cuda_version"` + NvidiaDriverVersion string `protobuf:"bytes,12,opt,name=nvidia_driver_version,json=nvidiaDriverVersion,proto3" json:"nvidia_driver_version" yaml:"nvidia_driver_version"` } func (m *NodeResources) Reset() { *m = NodeResources{} } @@ -124,6 +128,34 @@ func (m *NodeResources) GetBandwidth() string { return "" } +func (m *NodeResources) GetOs() string { + if m != nil { + return m.Os + } + return "" +} + +func (m *NodeResources) GetArch() string { + if m != nil { + return m.Arch + } + return "" +} + +func (m *NodeResources) GetCudaVersion() string { + if m != nil { + return m.CudaVersion + } + return "" +} + +func (m *NodeResources) GetNvidiaDriverVersion() string { + if m != nil { + return m.NvidiaDriverVersion + } + return "" +} + func init() { proto.RegisterType((*NodeResources)(nil), "akash.inventory.v1.NodeResources") } @@ -133,43 +165,52 @@ func init() { } var fileDescriptor_f20a722bd8ee01b5 = []byte{ - // 565 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0xcf, 0x8a, 0xd3, 0x40, - 0x1c, 0xc7, 0x1b, 0xbb, 0x76, 0xdd, 0xc8, 0x76, 0x6b, 0x10, 0x37, 0x14, 0xc9, 0x94, 0x80, 0x50, - 0xc1, 0x4d, 0xd8, 0xd5, 0x93, 0x37, 0x53, 0x6c, 0x11, 0xd9, 0x25, 0x64, 0xe9, 0x1e, 0x04, 0x29, - 0xd3, 0x64, 0x4c, 0xc2, 0x36, 0x99, 0x30, 0xf9, 0x23, 0xfb, 0x12, 0x22, 0x78, 0xf1, 0x19, 0x7c, - 0x92, 0x1e, 0xf7, 0xe8, 0x69, 0x94, 0xf6, 0x16, 0x3c, 0xe5, 0x09, 0xa4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d8, 0xbd, 0x60, 0xe3, 0x9c, 0x82, 0xaa, - 0x51, 0x50, 0xd0, 0xe4, 0x58, 0x36, 0x50, 0xad, 0x2a, 0x92, 0x4c, 0x71, 0x6f, 0x0c, 0x43, 0xe7, - 0xb3, 0xef, 0x24, 0x9e, 0xfc, 0xa0, 0x24, 0x9d, 0x70, 0xd2, 0x9e, 0x51, 0x05, 0x39, 0x05, 0x37, - 0xad, 0x82, 0x82, 0x16, 0xa3, 0x2d, 0x47, 0xaa, 0x75, 0x13, 0x1b, 0x67, 0xd3, 0x99, 0x22, 0x5c, - 0xcf, 0x14, 0xe1, 0xf7, 0x4c, 0x11, 0xbe, 0xce, 0x95, 0xda, 0xf5, 0x5c, 0xa9, 0xfd, 0x9c, 0x2b, - 0xb5, 0x0f, 0xaf, 0x5c, 0x3f, 0xf1, 0xd2, 0xb1, 0x66, 0xe3, 0x40, 0x8f, 0x23, 0x0f, 0x11, 0x1c, - 0xf6, 0x9d, 0x50, 0x2f, 0xff, 0xdf, 0x11, 0x8c, 0xfc, 0xa3, 0x4f, 0x98, 0x5c, 0xea, 0x2e, 0x5e, - 0xb9, 0xd1, 0xe3, 0x46, 0x79, 0x8b, 0x5f, 0xfe, 0x0d, 0x00, 0x00, 0xff, 0xff, 0xa8, 0x1e, 0xd2, - 0x28, 0x99, 0x04, 0x00, 0x00, + // 711 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x94, 0x4d, 0x6b, 0xdb, 0x48, + 0x1c, 0xc6, 0x2d, 0xdb, 0xeb, 0xac, 0xc7, 0x79, 0xf1, 0x2a, 0xbb, 0x1b, 0x11, 0xb2, 0x1e, 0x33, + 0xcb, 0x42, 0x16, 0x1a, 0x9b, 0xa4, 0x85, 0x42, 0x6e, 0xb1, 0xdb, 0x84, 0x52, 0x92, 0x1a, 0xa5, + 0xce, 0xa1, 0x10, 0xcc, 0x44, 0x9a, 0x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x8b, 0x4c, 0x39, 0xfc, 0x7b, 0xba, 0x92, 0x12, 0x90, 0xb9, 0x1c, 0x4f, 0x85, 0xf5, + 0x7d, 0xb0, 0x10, 0x13, 0x16, 0xb8, 0xd4, 0x33, 0x16, 0xea, 0xda, 0x66, 0xb9, 0xf5, 0xe8, 0x8a, + 0x43, 0x6d, 0xc8, 0xe1, 0xc2, 0x89, 0x1c, 0x27, 0x1c, 0x66, 0x8e, 0x94, 0xc3, 0x65, 0x85, 0x95, + 0x03, 0x64, 0x66, 0x92, 0xde, 0x01, 0xe5, 0x33, 0xec, 0xd9, 0xef, 0x5c, 0x3b, 0xec, 0x1b, 0xbf, + 0x0b, 0xd2, 0x8e, 0x22, 0x95, 0x5b, 0x99, 0x90, 0x70, 0x38, 0x71, 0xa5, 0x1c, 0x56, 0x25, 0x6d, + 0x3c, 0x42, 0xe6, 0x44, 0xd6, 0xb7, 0x40, 0x9e, 0x06, 0x46, 0x59, 0xa0, 0xfe, 0x51, 0xa8, 0xfc, + 0xab, 0x20, 0xe1, 0x30, 0x4f, 0x83, 0x94, 0xc3, 0xb2, 0x0c, 0xd3, 0x00, 0x99, 0x79, 0x1a, 0xe8, + 0x4f, 0x41, 0x11, 0x33, 0xab, 0x6f, 0x00, 0x11, 0xf8, 0x57, 0x05, 0x8a, 0x7b, 0xcc, 0x1a, 0xad, + 0x15, 0x5a, 0xca, 0x61, 0x45, 0x86, 0x46, 0x27, 0x64, 0x8a, 0xa1, 0x7e, 0x0a, 0x16, 0xad, 0xc8, + 0xc6, 0xbd, 0xec, 0x1a, 0x2a, 0x02, 0xb0, 0xab, 0x00, 0x95, 0x76, 0x64, 0xe3, 0xc9, 0x55, 0x4c, + 0x59, 0x53, 0x0e, 0x57, 0xd5, 0x5b, 0x7c, 0x6b, 0x8a, 0xcc, 0x8a, 0x35, 0xc9, 0xe8, 0xef, 0x35, + 0xf0, 0x97, 0x17, 0xbb, 0xb6, 0x8b, 0x7b, 0x36, 0x73, 0x63, 0xc2, 0xc6, 0x8b, 0x16, 0xc5, 0xa2, + 0xd7, 0x6a, 0xd1, 0xea, 0x91, 0x30, 0x3d, 0x13, 0x9e, 0xc9, 0xc2, 0xf9, 0xd9, 0x94, 0xc3, 0x0d, + 0xb9, 0x79, 0xae, 0x8c, 0xcc, 0x55, 0x6f, 0x96, 0xd6, 0x3a, 0xba, 0x1a, 0xd6, 0xb4, 0xeb, 0x61, + 0x4d, 0xfb, 0x31, 0xac, 0x69, 0x1f, 0x6f, 0x6a, 0xb9, 0xeb, 0x9b, 0x5a, 0xee, 0xdb, 0x4d, 0x2d, + 0xf7, 0xe6, 0x89, 0xe3, 0x86, 0xfd, 0xe8, 0xac, 0x61, 0xd1, 0x41, 0x33, 0xf0, 0xfb, 0x84, 0x51, + 0x6f, 0xdf, 0xf6, 0x9a, 0xe2, 0x1f, 0xb9, 0x85, 0x7d, 0x77, 0xeb, 0x2d, 0x65, 0xe7, 0x4d, 0x87, + 0x4e, 0x7d, 0x23, 0xcf, 0x4a, 0xe2, 0xbb, 0xf8, 0xf8, 0x67, 0x00, 0x00, 0x00, 0xff, 0xff, 0x2f, + 0x0c, 0x69, 0xe3, 0xeb, 0x05, 0x00, 0x00, } func (m *NodeResources) Marshal() (dAtA []byte, err error) { @@ -192,6 +233,34 @@ func (m *NodeResources) 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 = encodeVarintResources(dAtA, i, uint64(len(m.NvidiaDriverVersion))) + i-- + dAtA[i] = 0x62 + } + if len(m.CudaVersion) > 0 { + i -= len(m.CudaVersion) + copy(dAtA[i:], m.CudaVersion) + i = encodeVarintResources(dAtA, i, uint64(len(m.CudaVersion))) + i-- + dAtA[i] = 0x5a + } + if len(m.Arch) > 0 { + i -= len(m.Arch) + copy(dAtA[i:], m.Arch) + i = encodeVarintResources(dAtA, i, uint64(len(m.Arch))) + i-- + dAtA[i] = 0x52 + } + if len(m.Os) > 0 { + i -= len(m.Os) + copy(dAtA[i:], m.Os) + i = encodeVarintResources(dAtA, i, uint64(len(m.Os))) + i-- + dAtA[i] = 0x4a + } if len(m.Bandwidth) > 0 { i -= len(m.Bandwidth) copy(dAtA[i:], m.Bandwidth) @@ -306,6 +375,22 @@ func (m *NodeResources) Size() (n int) { if l > 0 { n += 1 + l + sovResources(uint64(l)) } + l = len(m.Os) + if l > 0 { + n += 1 + l + sovResources(uint64(l)) + } + l = len(m.Arch) + if l > 0 { + n += 1 + l + sovResources(uint64(l)) + } + l = len(m.CudaVersion) + if l > 0 { + n += 1 + l + sovResources(uint64(l)) + } + l = len(m.NvidiaDriverVersion) + if l > 0 { + n += 1 + l + sovResources(uint64(l)) + } return n } @@ -606,6 +691,134 @@ func (m *NodeResources) Unmarshal(dAtA []byte) error { } m.Bandwidth = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Os", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowResources + } + 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 ErrInvalidLengthResources + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthResources + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Os = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Arch", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowResources + } + 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 ErrInvalidLengthResources + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthResources + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Arch = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 11: + 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 ErrIntOverflowResources + } + 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 ErrInvalidLengthResources + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthResources + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CudaVersion = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 12: + 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 ErrIntOverflowResources + } + 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 ErrInvalidLengthResources + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthResources + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NvidiaDriverVersion = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipResources(dAtA[iNdEx:]) diff --git a/proto/provider/akash/inventory/v1/resources.proto b/proto/provider/akash/inventory/v1/resources.proto index 5831fd17..88655cf6 100644 --- a/proto/provider/akash/inventory/v1/resources.proto +++ b/proto/provider/akash/inventory/v1/resources.proto @@ -66,4 +66,28 @@ message NodeResources { (gogoproto.jsontag) = "bandwidth", (gogoproto.moretags) = "yaml:\"bandwidth\"" ]; + string os = 9 [ + (gogoproto.nullable) = true, + (gogoproto.customname) = "Os", + (gogoproto.jsontag) = "os", + (gogoproto.moretags) = "yaml:\"os\"" + ]; + string arch = 10 [ + (gogoproto.nullable) = true, + (gogoproto.customname) = "Arch", + (gogoproto.jsontag) = "arch", + (gogoproto.moretags) = "yaml:\"arch\"" + ]; + string cuda_version = 11 [ + (gogoproto.nullable) = true, + (gogoproto.customname) = "CudaVersion", + (gogoproto.jsontag) = "cuda_version", + (gogoproto.moretags) = "yaml:\"cuda_version\"" + ]; + string nvidia_driver_version = 12 [ + (gogoproto.nullable) = true, + (gogoproto.customname) = "NvidiaDriverVersion", + (gogoproto.jsontag) = "nvidia_driver_version", + (gogoproto.moretags) = "yaml:\"nvidia_driver_version\"" + ]; }