mirror of
https://github.com/onepanelio/onepanel.git
synced 2025-09-27 01:56:03 +08:00
Compare commits
38 Commits
v1.0.0-rc.
...
master
Author | SHA1 | Date | |
---|---|---|---|
![]() |
1170b53f61 | ||
![]() |
0213e1ead6 | ||
![]() |
9c1430273c | ||
![]() |
90c45fb6db | ||
![]() |
c984ff34d5 | ||
![]() |
5283b7beb6 | ||
![]() |
2cddf4a88a | ||
![]() |
dd3d7f6632 | ||
![]() |
4d1aff5c5b | ||
![]() |
719613ecd4 | ||
![]() |
09b854a434 | ||
![]() |
493ca51682 | ||
![]() |
6407c2a7b4 | ||
![]() |
62896b2f52 | ||
![]() |
d934163fc8 | ||
![]() |
e991102d85 | ||
![]() |
467f7f71dd | ||
![]() |
f1c0f0d31e | ||
![]() |
11fc055ee3 | ||
![]() |
d9c79370e9 | ||
![]() |
98f78d453a | ||
![]() |
700b3bd512 | ||
![]() |
3abdc54d3c | ||
![]() |
f570a710ba | ||
![]() |
c922b708fc | ||
![]() |
fc9669d757 | ||
![]() |
8eeb90d3f1 | ||
![]() |
c25dfce84f | ||
![]() |
5705bfa47f | ||
![]() |
44a78effed | ||
![]() |
a8985a7878 | ||
![]() |
69006309b4 | ||
![]() |
22b3d984ec | ||
![]() |
4528927463 | ||
![]() |
edf7a30f64 | ||
![]() |
51fb86e3fe | ||
![]() |
d8e0e5c968 | ||
![]() |
75719caec9 |
@@ -12,6 +12,7 @@ FROM golang:1.15.5
|
||||
COPY --from=builder /go/bin/core .
|
||||
COPY --from=builder /go/src/db ./db
|
||||
COPY --from=builder /go/bin/goose .
|
||||
COPY --from=builder /go/src/manifest ./manifest
|
||||
|
||||
EXPOSE 8888
|
||||
EXPOSE 8887
|
||||
|
@@ -6,7 +6,6 @@
|
||||
[](https://pypi.org/project/onepanel-sdk/)
|
||||
[](https://docs.onepanel.io)
|
||||
[](https://github.com/onepanelio/core/issues)
|
||||
[](https://join.slack.com/t/onepanel-ce/shared_invite/zt-eyjnwec0-nLaHhjif9Y~gA05KuX6AUg)
|
||||
[](https://landscape.lfai.foundation/?selected=onepanel)
|
||||
[](https://opensource.org/licenses/Apache-2.0)
|
||||
|
||||
@@ -21,14 +20,9 @@ https://user-images.githubusercontent.com/1211823/116489376-afc60000-a849-11eb-8
|
||||
## Quick start
|
||||
See [quick start guide](https://docs.onepanel.ai/docs/getting-started/quickstart) to get started.
|
||||
|
||||
## Online demo
|
||||
For a quick look at some features see this shared, read-only [online demo](https://onepanel.typeform.com/to/kQfDX5Vf?product=github).
|
||||
|
||||
## Community
|
||||
To submit a feature request, report a bug or documentation issue, please open a GitHub [pull request](https://github.com/onepanelio/core/pulls) or [issue](https://github.com/onepanelio/core/issues).
|
||||
|
||||
For help, questions, release announcements and contribution discussions, join us on [Slack](https://join.slack.com/t/onepanel-ce/shared_invite/zt-eyjnwec0-nLaHhjif9Y~gA05KuX6AUg).
|
||||
|
||||
## Contributing
|
||||
Onepanel is modular and consists of [multiple repositories](https://docs.onepanel.ai/docs/getting-started/contributing/#project-repositories).
|
||||
|
||||
@@ -43,6 +37,3 @@ We are grateful for the support these communities provide and do our best to con
|
||||
|
||||
## License
|
||||
Onepanel is licensed under [Apache 2.0](https://github.com/onepanelio/core/blob/master/LICENSE).
|
||||
|
||||
## Enterprise support
|
||||
Need enterprise features and support? Visit our [website](https://www.onepanel.ai/) for more information.
|
||||
|
@@ -3,7 +3,7 @@
|
||||
"info": {
|
||||
"title": "Onepanel",
|
||||
"description": "Onepanel API",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.2",
|
||||
"contact": {
|
||||
"name": "Onepanel project",
|
||||
"url": "https://github.com/onepanelio/core"
|
||||
@@ -763,6 +763,114 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/apis/v1beta1/{namespace}/inferenceservice": {
|
||||
"post": {
|
||||
"operationId": "CreateInferenceService",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/GetInferenceServiceResponse"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/google.rpc.Status"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "namespace",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/CreateInferenceServiceRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"InferenceService"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/apis/v1beta1/{namespace}/inferenceservice/{name}": {
|
||||
"get": {
|
||||
"operationId": "GetInferenceService",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/GetInferenceServiceResponse"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/google.rpc.Status"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "namespace",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "name",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"InferenceService"
|
||||
]
|
||||
},
|
||||
"delete": {
|
||||
"operationId": "DeleteInferenceService",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"properties": {}
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/google.rpc.Status"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "namespace",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "name",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"InferenceService"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/apis/v1beta1/{namespace}/secrets": {
|
||||
"get": {
|
||||
"operationId": "ListSecrets",
|
||||
@@ -3260,6 +3368,43 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"Container": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"image": {
|
||||
"type": "string"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"env": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/Env"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"CreateInferenceServiceRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"namespace": {
|
||||
"type": "string"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"defaultTransformerImage": {
|
||||
"type": "string"
|
||||
},
|
||||
"predictor": {
|
||||
"$ref": "#/definitions/InferenceServicePredictor"
|
||||
},
|
||||
"transformer": {
|
||||
"$ref": "#/definitions/InferenceServiceTransformer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"CreateWorkflowExecutionBody": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -3362,6 +3507,17 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"Env": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"value": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"File": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -3431,6 +3587,23 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"GetInferenceServiceResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"ready": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"conditions": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/InferenceServiceCondition"
|
||||
}
|
||||
},
|
||||
"predictUrl": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"GetLabelsResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -3497,6 +3670,72 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"InferenceServiceCondition": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"lastTransitionTime": {
|
||||
"type": "string"
|
||||
},
|
||||
"status": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"InferenceServicePredictor": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"runtimeVersion": {
|
||||
"type": "string"
|
||||
},
|
||||
"storageUri": {
|
||||
"type": "string"
|
||||
},
|
||||
"nodeSelector": {
|
||||
"type": "string"
|
||||
},
|
||||
"minCpu": {
|
||||
"type": "string"
|
||||
},
|
||||
"minMemory": {
|
||||
"type": "string"
|
||||
},
|
||||
"maxCpu": {
|
||||
"type": "string"
|
||||
},
|
||||
"maxMemory": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"InferenceServiceTransformer": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"containers": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/Container"
|
||||
}
|
||||
},
|
||||
"minCpu": {
|
||||
"type": "string"
|
||||
},
|
||||
"minMemory": {
|
||||
"type": "string"
|
||||
},
|
||||
"maxCpu": {
|
||||
"type": "string"
|
||||
},
|
||||
"maxMemory": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"IsAuthorized": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -3945,6 +4184,9 @@
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"sourceName": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
999
api/gen/inference_service.pb.go
Normal file
999
api/gen/inference_service.pb.go
Normal file
@@ -0,0 +1,999 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.25.0
|
||||
// protoc v3.14.0
|
||||
// source: inference_service.proto
|
||||
|
||||
package gen
|
||||
|
||||
import (
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
_ "google.golang.org/genproto/googleapis/api/annotations"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
emptypb "google.golang.org/protobuf/types/known/emptypb"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// This is a compile-time assertion that a sufficiently up-to-date version
|
||||
// of the legacy proto package is being used.
|
||||
const _ = proto.ProtoPackageIsVersion4
|
||||
|
||||
type InferenceServiceIdentifier struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
|
||||
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
||||
}
|
||||
|
||||
func (x *InferenceServiceIdentifier) Reset() {
|
||||
*x = InferenceServiceIdentifier{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_inference_service_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *InferenceServiceIdentifier) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*InferenceServiceIdentifier) ProtoMessage() {}
|
||||
|
||||
func (x *InferenceServiceIdentifier) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_inference_service_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use InferenceServiceIdentifier.ProtoReflect.Descriptor instead.
|
||||
func (*InferenceServiceIdentifier) Descriptor() ([]byte, []int) {
|
||||
return file_inference_service_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *InferenceServiceIdentifier) GetNamespace() string {
|
||||
if x != nil {
|
||||
return x.Namespace
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *InferenceServiceIdentifier) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type Env struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
|
||||
}
|
||||
|
||||
func (x *Env) Reset() {
|
||||
*x = Env{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_inference_service_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *Env) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Env) ProtoMessage() {}
|
||||
|
||||
func (x *Env) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_inference_service_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Env.ProtoReflect.Descriptor instead.
|
||||
func (*Env) Descriptor() ([]byte, []int) {
|
||||
return file_inference_service_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *Env) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Env) GetValue() string {
|
||||
if x != nil {
|
||||
return x.Value
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type Container struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Image string `protobuf:"bytes,1,opt,name=image,proto3" json:"image,omitempty"`
|
||||
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Env []*Env `protobuf:"bytes,3,rep,name=env,proto3" json:"env,omitempty"`
|
||||
}
|
||||
|
||||
func (x *Container) Reset() {
|
||||
*x = Container{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_inference_service_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *Container) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Container) ProtoMessage() {}
|
||||
|
||||
func (x *Container) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_inference_service_proto_msgTypes[2]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Container.ProtoReflect.Descriptor instead.
|
||||
func (*Container) Descriptor() ([]byte, []int) {
|
||||
return file_inference_service_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *Container) GetImage() string {
|
||||
if x != nil {
|
||||
return x.Image
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Container) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Container) GetEnv() []*Env {
|
||||
if x != nil {
|
||||
return x.Env
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type InferenceServiceTransformer struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Containers []*Container `protobuf:"bytes,1,rep,name=containers,proto3" json:"containers,omitempty"`
|
||||
MinCpu string `protobuf:"bytes,2,opt,name=minCpu,proto3" json:"minCpu,omitempty"`
|
||||
MinMemory string `protobuf:"bytes,3,opt,name=minMemory,proto3" json:"minMemory,omitempty"`
|
||||
MaxCpu string `protobuf:"bytes,4,opt,name=maxCpu,proto3" json:"maxCpu,omitempty"`
|
||||
MaxMemory string `protobuf:"bytes,5,opt,name=maxMemory,proto3" json:"maxMemory,omitempty"`
|
||||
}
|
||||
|
||||
func (x *InferenceServiceTransformer) Reset() {
|
||||
*x = InferenceServiceTransformer{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_inference_service_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *InferenceServiceTransformer) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*InferenceServiceTransformer) ProtoMessage() {}
|
||||
|
||||
func (x *InferenceServiceTransformer) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_inference_service_proto_msgTypes[3]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use InferenceServiceTransformer.ProtoReflect.Descriptor instead.
|
||||
func (*InferenceServiceTransformer) Descriptor() ([]byte, []int) {
|
||||
return file_inference_service_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *InferenceServiceTransformer) GetContainers() []*Container {
|
||||
if x != nil {
|
||||
return x.Containers
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *InferenceServiceTransformer) GetMinCpu() string {
|
||||
if x != nil {
|
||||
return x.MinCpu
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *InferenceServiceTransformer) GetMinMemory() string {
|
||||
if x != nil {
|
||||
return x.MinMemory
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *InferenceServiceTransformer) GetMaxCpu() string {
|
||||
if x != nil {
|
||||
return x.MaxCpu
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *InferenceServiceTransformer) GetMaxMemory() string {
|
||||
if x != nil {
|
||||
return x.MaxMemory
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type InferenceServicePredictor struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
RuntimeVersion string `protobuf:"bytes,2,opt,name=runtimeVersion,proto3" json:"runtimeVersion,omitempty"`
|
||||
StorageUri string `protobuf:"bytes,3,opt,name=storageUri,proto3" json:"storageUri,omitempty"`
|
||||
NodeSelector string `protobuf:"bytes,4,opt,name=nodeSelector,proto3" json:"nodeSelector,omitempty"`
|
||||
MinCpu string `protobuf:"bytes,5,opt,name=minCpu,proto3" json:"minCpu,omitempty"`
|
||||
MinMemory string `protobuf:"bytes,6,opt,name=minMemory,proto3" json:"minMemory,omitempty"`
|
||||
MaxCpu string `protobuf:"bytes,7,opt,name=maxCpu,proto3" json:"maxCpu,omitempty"`
|
||||
MaxMemory string `protobuf:"bytes,8,opt,name=maxMemory,proto3" json:"maxMemory,omitempty"`
|
||||
}
|
||||
|
||||
func (x *InferenceServicePredictor) Reset() {
|
||||
*x = InferenceServicePredictor{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_inference_service_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *InferenceServicePredictor) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*InferenceServicePredictor) ProtoMessage() {}
|
||||
|
||||
func (x *InferenceServicePredictor) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_inference_service_proto_msgTypes[4]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use InferenceServicePredictor.ProtoReflect.Descriptor instead.
|
||||
func (*InferenceServicePredictor) Descriptor() ([]byte, []int) {
|
||||
return file_inference_service_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *InferenceServicePredictor) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *InferenceServicePredictor) GetRuntimeVersion() string {
|
||||
if x != nil {
|
||||
return x.RuntimeVersion
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *InferenceServicePredictor) GetStorageUri() string {
|
||||
if x != nil {
|
||||
return x.StorageUri
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *InferenceServicePredictor) GetNodeSelector() string {
|
||||
if x != nil {
|
||||
return x.NodeSelector
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *InferenceServicePredictor) GetMinCpu() string {
|
||||
if x != nil {
|
||||
return x.MinCpu
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *InferenceServicePredictor) GetMinMemory() string {
|
||||
if x != nil {
|
||||
return x.MinMemory
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *InferenceServicePredictor) GetMaxCpu() string {
|
||||
if x != nil {
|
||||
return x.MaxCpu
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *InferenceServicePredictor) GetMaxMemory() string {
|
||||
if x != nil {
|
||||
return x.MaxMemory
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type CreateInferenceServiceRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
|
||||
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
||||
DefaultTransformerImage string `protobuf:"bytes,3,opt,name=defaultTransformerImage,proto3" json:"defaultTransformerImage,omitempty"`
|
||||
Predictor *InferenceServicePredictor `protobuf:"bytes,4,opt,name=predictor,proto3" json:"predictor,omitempty"`
|
||||
Transformer *InferenceServiceTransformer `protobuf:"bytes,5,opt,name=transformer,proto3" json:"transformer,omitempty"`
|
||||
}
|
||||
|
||||
func (x *CreateInferenceServiceRequest) Reset() {
|
||||
*x = CreateInferenceServiceRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_inference_service_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *CreateInferenceServiceRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*CreateInferenceServiceRequest) ProtoMessage() {}
|
||||
|
||||
func (x *CreateInferenceServiceRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_inference_service_proto_msgTypes[5]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use CreateInferenceServiceRequest.ProtoReflect.Descriptor instead.
|
||||
func (*CreateInferenceServiceRequest) Descriptor() ([]byte, []int) {
|
||||
return file_inference_service_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (x *CreateInferenceServiceRequest) GetNamespace() string {
|
||||
if x != nil {
|
||||
return x.Namespace
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *CreateInferenceServiceRequest) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *CreateInferenceServiceRequest) GetDefaultTransformerImage() string {
|
||||
if x != nil {
|
||||
return x.DefaultTransformerImage
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *CreateInferenceServiceRequest) GetPredictor() *InferenceServicePredictor {
|
||||
if x != nil {
|
||||
return x.Predictor
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *CreateInferenceServiceRequest) GetTransformer() *InferenceServiceTransformer {
|
||||
if x != nil {
|
||||
return x.Transformer
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type DeployModelResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
|
||||
}
|
||||
|
||||
func (x *DeployModelResponse) Reset() {
|
||||
*x = DeployModelResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_inference_service_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *DeployModelResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DeployModelResponse) ProtoMessage() {}
|
||||
|
||||
func (x *DeployModelResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_inference_service_proto_msgTypes[6]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use DeployModelResponse.ProtoReflect.Descriptor instead.
|
||||
func (*DeployModelResponse) Descriptor() ([]byte, []int) {
|
||||
return file_inference_service_proto_rawDescGZIP(), []int{6}
|
||||
}
|
||||
|
||||
func (x *DeployModelResponse) GetStatus() string {
|
||||
if x != nil {
|
||||
return x.Status
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type InferenceServiceCondition struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
LastTransitionTime string `protobuf:"bytes,1,opt,name=lastTransitionTime,proto3" json:"lastTransitionTime,omitempty"`
|
||||
Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"`
|
||||
Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
|
||||
}
|
||||
|
||||
func (x *InferenceServiceCondition) Reset() {
|
||||
*x = InferenceServiceCondition{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_inference_service_proto_msgTypes[7]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *InferenceServiceCondition) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*InferenceServiceCondition) ProtoMessage() {}
|
||||
|
||||
func (x *InferenceServiceCondition) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_inference_service_proto_msgTypes[7]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use InferenceServiceCondition.ProtoReflect.Descriptor instead.
|
||||
func (*InferenceServiceCondition) Descriptor() ([]byte, []int) {
|
||||
return file_inference_service_proto_rawDescGZIP(), []int{7}
|
||||
}
|
||||
|
||||
func (x *InferenceServiceCondition) GetLastTransitionTime() string {
|
||||
if x != nil {
|
||||
return x.LastTransitionTime
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *InferenceServiceCondition) GetStatus() string {
|
||||
if x != nil {
|
||||
return x.Status
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *InferenceServiceCondition) GetType() string {
|
||||
if x != nil {
|
||||
return x.Type
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type GetInferenceServiceResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Ready bool `protobuf:"varint,1,opt,name=ready,proto3" json:"ready,omitempty"`
|
||||
Conditions []*InferenceServiceCondition `protobuf:"bytes,2,rep,name=conditions,proto3" json:"conditions,omitempty"`
|
||||
PredictUrl string `protobuf:"bytes,3,opt,name=predictUrl,proto3" json:"predictUrl,omitempty"`
|
||||
}
|
||||
|
||||
func (x *GetInferenceServiceResponse) Reset() {
|
||||
*x = GetInferenceServiceResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_inference_service_proto_msgTypes[8]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *GetInferenceServiceResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetInferenceServiceResponse) ProtoMessage() {}
|
||||
|
||||
func (x *GetInferenceServiceResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_inference_service_proto_msgTypes[8]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GetInferenceServiceResponse.ProtoReflect.Descriptor instead.
|
||||
func (*GetInferenceServiceResponse) Descriptor() ([]byte, []int) {
|
||||
return file_inference_service_proto_rawDescGZIP(), []int{8}
|
||||
}
|
||||
|
||||
func (x *GetInferenceServiceResponse) GetReady() bool {
|
||||
if x != nil {
|
||||
return x.Ready
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *GetInferenceServiceResponse) GetConditions() []*InferenceServiceCondition {
|
||||
if x != nil {
|
||||
return x.Conditions
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *GetInferenceServiceResponse) GetPredictUrl() string {
|
||||
if x != nil {
|
||||
return x.PredictUrl
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type InferenceServiceEndpoints struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Predict string `protobuf:"bytes,1,opt,name=predict,proto3" json:"predict,omitempty"`
|
||||
}
|
||||
|
||||
func (x *InferenceServiceEndpoints) Reset() {
|
||||
*x = InferenceServiceEndpoints{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_inference_service_proto_msgTypes[9]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *InferenceServiceEndpoints) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*InferenceServiceEndpoints) ProtoMessage() {}
|
||||
|
||||
func (x *InferenceServiceEndpoints) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_inference_service_proto_msgTypes[9]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use InferenceServiceEndpoints.ProtoReflect.Descriptor instead.
|
||||
func (*InferenceServiceEndpoints) Descriptor() ([]byte, []int) {
|
||||
return file_inference_service_proto_rawDescGZIP(), []int{9}
|
||||
}
|
||||
|
||||
func (x *InferenceServiceEndpoints) GetPredict() string {
|
||||
if x != nil {
|
||||
return x.Predict
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_inference_service_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_inference_service_proto_rawDesc = []byte{
|
||||
0x0a, 0x17, 0x69, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x76,
|
||||
0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, 0x61, 0x70, 0x69, 0x1a, 0x1c,
|
||||
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74,
|
||||
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f,
|
||||
0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d,
|
||||
0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x4e, 0x0a, 0x1a, 0x49, 0x6e, 0x66,
|
||||
0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x65,
|
||||
0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73,
|
||||
0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65,
|
||||
0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x2f, 0x0a, 0x03, 0x45, 0x6e, 0x76,
|
||||
0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
|
||||
0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x51, 0x0a, 0x09, 0x43, 0x6f,
|
||||
0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x12, 0x0a,
|
||||
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,
|
||||
0x65, 0x12, 0x1a, 0x0a, 0x03, 0x65, 0x6e, 0x76, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x08,
|
||||
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x45, 0x6e, 0x76, 0x52, 0x03, 0x65, 0x6e, 0x76, 0x22, 0xb9, 0x01,
|
||||
0x0a, 0x1b, 0x49, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69,
|
||||
0x63, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x12, 0x2e, 0x0a,
|
||||
0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28,
|
||||
0x0b, 0x32, 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65,
|
||||
0x72, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x73, 0x12, 0x16, 0x0a,
|
||||
0x06, 0x6d, 0x69, 0x6e, 0x43, 0x70, 0x75, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d,
|
||||
0x69, 0x6e, 0x43, 0x70, 0x75, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x69, 0x6e, 0x4d, 0x65, 0x6d, 0x6f,
|
||||
0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x69, 0x6e, 0x4d, 0x65, 0x6d,
|
||||
0x6f, 0x72, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x61, 0x78, 0x43, 0x70, 0x75, 0x18, 0x04, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x61, 0x78, 0x43, 0x70, 0x75, 0x12, 0x1c, 0x0a, 0x09, 0x6d,
|
||||
0x61, 0x78, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,
|
||||
0x6d, 0x61, 0x78, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x22, 0x87, 0x02, 0x0a, 0x19, 0x49, 0x6e,
|
||||
0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72,
|
||||
0x65, 0x64, 0x69, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x72,
|
||||
0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x56, 0x65, 0x72, 0x73,
|
||||
0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x55, 0x72,
|
||||
0x69, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65,
|
||||
0x55, 0x72, 0x69, 0x12, 0x22, 0x0a, 0x0c, 0x6e, 0x6f, 0x64, 0x65, 0x53, 0x65, 0x6c, 0x65, 0x63,
|
||||
0x74, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6e, 0x6f, 0x64, 0x65, 0x53,
|
||||
0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x69, 0x6e, 0x43, 0x70,
|
||||
0x75, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x69, 0x6e, 0x43, 0x70, 0x75, 0x12,
|
||||
0x1c, 0x0a, 0x09, 0x6d, 0x69, 0x6e, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x18, 0x06, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x09, 0x6d, 0x69, 0x6e, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x12, 0x16, 0x0a,
|
||||
0x06, 0x6d, 0x61, 0x78, 0x43, 0x70, 0x75, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d,
|
||||
0x61, 0x78, 0x43, 0x70, 0x75, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x4d, 0x65, 0x6d, 0x6f,
|
||||
0x72, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x61, 0x78, 0x4d, 0x65, 0x6d,
|
||||
0x6f, 0x72, 0x79, 0x22, 0x8d, 0x02, 0x0a, 0x1d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e,
|
||||
0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61,
|
||||
0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70,
|
||||
0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x38, 0x0a, 0x17, 0x64, 0x65, 0x66, 0x61, 0x75,
|
||||
0x6c, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x49, 0x6d, 0x61,
|
||||
0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x17, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c,
|
||||
0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x49, 0x6d, 0x61, 0x67,
|
||||
0x65, 0x12, 0x3c, 0x0a, 0x09, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x04,
|
||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x49, 0x6e, 0x66, 0x65, 0x72,
|
||||
0x65, 0x6e, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x65, 0x64, 0x69,
|
||||
0x63, 0x74, 0x6f, 0x72, 0x52, 0x09, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x6f, 0x72, 0x12,
|
||||
0x42, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x18, 0x05,
|
||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x49, 0x6e, 0x66, 0x65, 0x72,
|
||||
0x65, 0x6e, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73,
|
||||
0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x52, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72,
|
||||
0x6d, 0x65, 0x72, 0x22, 0x2d, 0x0a, 0x13, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x4d, 0x6f, 0x64,
|
||||
0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74,
|
||||
0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74,
|
||||
0x75, 0x73, 0x22, 0x77, 0x0a, 0x19, 0x49, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53,
|
||||
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12,
|
||||
0x2e, 0x0a, 0x12, 0x6c, 0x61, 0x73, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x6c, 0x61, 0x73,
|
||||
0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12,
|
||||
0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18,
|
||||
0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x93, 0x01, 0x0a, 0x1b,
|
||||
0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76,
|
||||
0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x72,
|
||||
0x65, 0x61, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x72, 0x65, 0x61, 0x64,
|
||||
0x79, 0x12, 0x3e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18,
|
||||
0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x49, 0x6e, 0x66, 0x65,
|
||||
0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x64,
|
||||
0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x55, 0x72, 0x6c, 0x18,
|
||||
0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x55, 0x72,
|
||||
0x6c, 0x22, 0x35, 0x0a, 0x19, 0x49, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x65,
|
||||
0x72, 0x76, 0x69, 0x63, 0x65, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x18,
|
||||
0x0a, 0x07, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x07, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x32, 0xcf, 0x03, 0x0a, 0x10, 0x49, 0x6e, 0x66,
|
||||
0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x95, 0x01,
|
||||
0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63,
|
||||
0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43,
|
||||
0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x65,
|
||||
0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x61,
|
||||
0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53,
|
||||
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x35,
|
||||
0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x22, 0x2a, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31,
|
||||
0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65,
|
||||
0x7d, 0x2f, 0x69, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x65, 0x72, 0x76, 0x69,
|
||||
0x63, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x93, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66,
|
||||
0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x1f, 0x2e,
|
||||
0x61, 0x70, 0x69, 0x2e, 0x49, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x65, 0x72,
|
||||
0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x1a, 0x20,
|
||||
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63,
|
||||
0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||
0x22, 0x39, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x33, 0x12, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f,
|
||||
0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61,
|
||||
0x63, 0x65, 0x7d, 0x2f, 0x69, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x65, 0x72,
|
||||
0x76, 0x69, 0x63, 0x65, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x12, 0x8c, 0x01, 0x0a, 0x16,
|
||||
0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53,
|
||||
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x1f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x49, 0x6e, 0x66,
|
||||
0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x65,
|
||||
0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
|
||||
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22,
|
||||
0x39, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x33, 0x2a, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76,
|
||||
0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63,
|
||||
0x65, 0x7d, 0x2f, 0x69, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x65, 0x72, 0x76,
|
||||
0x69, 0x63, 0x65, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x42, 0x24, 0x5a, 0x22, 0x67, 0x69,
|
||||
0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x65, 0x70, 0x61, 0x6e, 0x65,
|
||||
0x6c, 0x69, 0x6f, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x65, 0x6e,
|
||||
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_inference_service_proto_rawDescOnce sync.Once
|
||||
file_inference_service_proto_rawDescData = file_inference_service_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_inference_service_proto_rawDescGZIP() []byte {
|
||||
file_inference_service_proto_rawDescOnce.Do(func() {
|
||||
file_inference_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_inference_service_proto_rawDescData)
|
||||
})
|
||||
return file_inference_service_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_inference_service_proto_msgTypes = make([]protoimpl.MessageInfo, 10)
|
||||
var file_inference_service_proto_goTypes = []interface{}{
|
||||
(*InferenceServiceIdentifier)(nil), // 0: api.InferenceServiceIdentifier
|
||||
(*Env)(nil), // 1: api.Env
|
||||
(*Container)(nil), // 2: api.Container
|
||||
(*InferenceServiceTransformer)(nil), // 3: api.InferenceServiceTransformer
|
||||
(*InferenceServicePredictor)(nil), // 4: api.InferenceServicePredictor
|
||||
(*CreateInferenceServiceRequest)(nil), // 5: api.CreateInferenceServiceRequest
|
||||
(*DeployModelResponse)(nil), // 6: api.DeployModelResponse
|
||||
(*InferenceServiceCondition)(nil), // 7: api.InferenceServiceCondition
|
||||
(*GetInferenceServiceResponse)(nil), // 8: api.GetInferenceServiceResponse
|
||||
(*InferenceServiceEndpoints)(nil), // 9: api.InferenceServiceEndpoints
|
||||
(*emptypb.Empty)(nil), // 10: google.protobuf.Empty
|
||||
}
|
||||
var file_inference_service_proto_depIdxs = []int32{
|
||||
1, // 0: api.Container.env:type_name -> api.Env
|
||||
2, // 1: api.InferenceServiceTransformer.containers:type_name -> api.Container
|
||||
4, // 2: api.CreateInferenceServiceRequest.predictor:type_name -> api.InferenceServicePredictor
|
||||
3, // 3: api.CreateInferenceServiceRequest.transformer:type_name -> api.InferenceServiceTransformer
|
||||
7, // 4: api.GetInferenceServiceResponse.conditions:type_name -> api.InferenceServiceCondition
|
||||
5, // 5: api.InferenceService.CreateInferenceService:input_type -> api.CreateInferenceServiceRequest
|
||||
0, // 6: api.InferenceService.GetInferenceService:input_type -> api.InferenceServiceIdentifier
|
||||
0, // 7: api.InferenceService.DeleteInferenceService:input_type -> api.InferenceServiceIdentifier
|
||||
8, // 8: api.InferenceService.CreateInferenceService:output_type -> api.GetInferenceServiceResponse
|
||||
8, // 9: api.InferenceService.GetInferenceService:output_type -> api.GetInferenceServiceResponse
|
||||
10, // 10: api.InferenceService.DeleteInferenceService:output_type -> google.protobuf.Empty
|
||||
8, // [8:11] is the sub-list for method output_type
|
||||
5, // [5:8] is the sub-list for method input_type
|
||||
5, // [5:5] is the sub-list for extension type_name
|
||||
5, // [5:5] is the sub-list for extension extendee
|
||||
0, // [0:5] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_inference_service_proto_init() }
|
||||
func file_inference_service_proto_init() {
|
||||
if File_inference_service_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_inference_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*InferenceServiceIdentifier); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_inference_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Env); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_inference_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Container); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_inference_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*InferenceServiceTransformer); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_inference_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*InferenceServicePredictor); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_inference_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*CreateInferenceServiceRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_inference_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DeployModelResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_inference_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*InferenceServiceCondition); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_inference_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*GetInferenceServiceResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_inference_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*InferenceServiceEndpoints); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_inference_service_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 10,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_inference_service_proto_goTypes,
|
||||
DependencyIndexes: file_inference_service_proto_depIdxs,
|
||||
MessageInfos: file_inference_service_proto_msgTypes,
|
||||
}.Build()
|
||||
File_inference_service_proto = out.File
|
||||
file_inference_service_proto_rawDesc = nil
|
||||
file_inference_service_proto_goTypes = nil
|
||||
file_inference_service_proto_depIdxs = nil
|
||||
}
|
439
api/gen/inference_service.pb.gw.go
Normal file
439
api/gen/inference_service.pb.gw.go
Normal file
@@ -0,0 +1,439 @@
|
||||
// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
|
||||
// source: inference_service.proto
|
||||
|
||||
/*
|
||||
Package gen is a reverse proxy.
|
||||
|
||||
It translates gRPC into RESTful JSON APIs.
|
||||
*/
|
||||
package gen
|
||||
|
||||
import (
|
||||
"context"
|
||||
"io"
|
||||
"net/http"
|
||||
|
||||
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
|
||||
"github.com/grpc-ecosystem/grpc-gateway/v2/utilities"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/grpclog"
|
||||
"google.golang.org/grpc/metadata"
|
||||
"google.golang.org/grpc/status"
|
||||
"google.golang.org/protobuf/proto"
|
||||
)
|
||||
|
||||
// Suppress "imported and not used" errors
|
||||
var _ codes.Code
|
||||
var _ io.Reader
|
||||
var _ status.Status
|
||||
var _ = runtime.String
|
||||
var _ = utilities.NewDoubleArray
|
||||
var _ = metadata.Join
|
||||
|
||||
func request_InferenceService_CreateInferenceService_0(ctx context.Context, marshaler runtime.Marshaler, client InferenceServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq CreateInferenceServiceRequest
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
newReader, berr := utilities.IOReaderFactory(req.Body)
|
||||
if berr != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
||||
}
|
||||
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
var (
|
||||
val string
|
||||
ok bool
|
||||
err error
|
||||
_ = err
|
||||
)
|
||||
|
||||
val, ok = pathParams["namespace"]
|
||||
if !ok {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace")
|
||||
}
|
||||
|
||||
protoReq.Namespace, err = runtime.String(val)
|
||||
if err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
|
||||
}
|
||||
|
||||
msg, err := client.CreateInferenceService(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func local_request_InferenceService_CreateInferenceService_0(ctx context.Context, marshaler runtime.Marshaler, server InferenceServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq CreateInferenceServiceRequest
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
newReader, berr := utilities.IOReaderFactory(req.Body)
|
||||
if berr != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
||||
}
|
||||
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
var (
|
||||
val string
|
||||
ok bool
|
||||
err error
|
||||
_ = err
|
||||
)
|
||||
|
||||
val, ok = pathParams["namespace"]
|
||||
if !ok {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace")
|
||||
}
|
||||
|
||||
protoReq.Namespace, err = runtime.String(val)
|
||||
if err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
|
||||
}
|
||||
|
||||
msg, err := server.CreateInferenceService(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func request_InferenceService_GetInferenceService_0(ctx context.Context, marshaler runtime.Marshaler, client InferenceServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq InferenceServiceIdentifier
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
var (
|
||||
val string
|
||||
ok bool
|
||||
err error
|
||||
_ = err
|
||||
)
|
||||
|
||||
val, ok = pathParams["namespace"]
|
||||
if !ok {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace")
|
||||
}
|
||||
|
||||
protoReq.Namespace, err = runtime.String(val)
|
||||
if err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
|
||||
}
|
||||
|
||||
val, ok = pathParams["name"]
|
||||
if !ok {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")
|
||||
}
|
||||
|
||||
protoReq.Name, err = runtime.String(val)
|
||||
if err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
|
||||
}
|
||||
|
||||
msg, err := client.GetInferenceService(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func local_request_InferenceService_GetInferenceService_0(ctx context.Context, marshaler runtime.Marshaler, server InferenceServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq InferenceServiceIdentifier
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
var (
|
||||
val string
|
||||
ok bool
|
||||
err error
|
||||
_ = err
|
||||
)
|
||||
|
||||
val, ok = pathParams["namespace"]
|
||||
if !ok {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace")
|
||||
}
|
||||
|
||||
protoReq.Namespace, err = runtime.String(val)
|
||||
if err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
|
||||
}
|
||||
|
||||
val, ok = pathParams["name"]
|
||||
if !ok {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")
|
||||
}
|
||||
|
||||
protoReq.Name, err = runtime.String(val)
|
||||
if err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
|
||||
}
|
||||
|
||||
msg, err := server.GetInferenceService(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func request_InferenceService_DeleteInferenceService_0(ctx context.Context, marshaler runtime.Marshaler, client InferenceServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq InferenceServiceIdentifier
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
var (
|
||||
val string
|
||||
ok bool
|
||||
err error
|
||||
_ = err
|
||||
)
|
||||
|
||||
val, ok = pathParams["namespace"]
|
||||
if !ok {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace")
|
||||
}
|
||||
|
||||
protoReq.Namespace, err = runtime.String(val)
|
||||
if err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
|
||||
}
|
||||
|
||||
val, ok = pathParams["name"]
|
||||
if !ok {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")
|
||||
}
|
||||
|
||||
protoReq.Name, err = runtime.String(val)
|
||||
if err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
|
||||
}
|
||||
|
||||
msg, err := client.DeleteInferenceService(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func local_request_InferenceService_DeleteInferenceService_0(ctx context.Context, marshaler runtime.Marshaler, server InferenceServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq InferenceServiceIdentifier
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
var (
|
||||
val string
|
||||
ok bool
|
||||
err error
|
||||
_ = err
|
||||
)
|
||||
|
||||
val, ok = pathParams["namespace"]
|
||||
if !ok {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace")
|
||||
}
|
||||
|
||||
protoReq.Namespace, err = runtime.String(val)
|
||||
if err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
|
||||
}
|
||||
|
||||
val, ok = pathParams["name"]
|
||||
if !ok {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")
|
||||
}
|
||||
|
||||
protoReq.Name, err = runtime.String(val)
|
||||
if err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
|
||||
}
|
||||
|
||||
msg, err := server.DeleteInferenceService(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
// RegisterInferenceServiceHandlerServer registers the http handlers for service InferenceService to "mux".
|
||||
// UnaryRPC :call InferenceServiceServer directly.
|
||||
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
|
||||
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterInferenceServiceHandlerFromEndpoint instead.
|
||||
func RegisterInferenceServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server InferenceServiceServer) error {
|
||||
|
||||
mux.Handle("POST", pattern_InferenceService_CreateInferenceService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.InferenceService/CreateInferenceService")
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_InferenceService_CreateInferenceService_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_InferenceService_CreateInferenceService_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("GET", pattern_InferenceService_GetInferenceService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.InferenceService/GetInferenceService")
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_InferenceService_GetInferenceService_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_InferenceService_GetInferenceService_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("DELETE", pattern_InferenceService_DeleteInferenceService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.InferenceService/DeleteInferenceService")
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_InferenceService_DeleteInferenceService_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_InferenceService_DeleteInferenceService_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// RegisterInferenceServiceHandlerFromEndpoint is same as RegisterInferenceServiceHandler but
|
||||
// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
|
||||
func RegisterInferenceServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
|
||||
conn, err := grpc.Dial(endpoint, opts...)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer func() {
|
||||
if err != nil {
|
||||
if cerr := conn.Close(); cerr != nil {
|
||||
grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
|
||||
}
|
||||
return
|
||||
}
|
||||
go func() {
|
||||
<-ctx.Done()
|
||||
if cerr := conn.Close(); cerr != nil {
|
||||
grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
|
||||
}
|
||||
}()
|
||||
}()
|
||||
|
||||
return RegisterInferenceServiceHandler(ctx, mux, conn)
|
||||
}
|
||||
|
||||
// RegisterInferenceServiceHandler registers the http handlers for service InferenceService to "mux".
|
||||
// The handlers forward requests to the grpc endpoint over "conn".
|
||||
func RegisterInferenceServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
|
||||
return RegisterInferenceServiceHandlerClient(ctx, mux, NewInferenceServiceClient(conn))
|
||||
}
|
||||
|
||||
// RegisterInferenceServiceHandlerClient registers the http handlers for service InferenceService
|
||||
// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "InferenceServiceClient".
|
||||
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "InferenceServiceClient"
|
||||
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
|
||||
// "InferenceServiceClient" to call the correct interceptors.
|
||||
func RegisterInferenceServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client InferenceServiceClient) error {
|
||||
|
||||
mux.Handle("POST", pattern_InferenceService_CreateInferenceService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.InferenceService/CreateInferenceService")
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_InferenceService_CreateInferenceService_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_InferenceService_CreateInferenceService_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("GET", pattern_InferenceService_GetInferenceService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.InferenceService/GetInferenceService")
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_InferenceService_GetInferenceService_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_InferenceService_GetInferenceService_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("DELETE", pattern_InferenceService_DeleteInferenceService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.InferenceService/DeleteInferenceService")
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_InferenceService_DeleteInferenceService_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_InferenceService_DeleteInferenceService_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
var (
|
||||
pattern_InferenceService_CreateInferenceService_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"apis", "v1beta1", "namespace", "inferenceservice"}, ""))
|
||||
|
||||
pattern_InferenceService_GetInferenceService_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"apis", "v1beta1", "namespace", "inferenceservice", "name"}, ""))
|
||||
|
||||
pattern_InferenceService_DeleteInferenceService_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"apis", "v1beta1", "namespace", "inferenceservice", "name"}, ""))
|
||||
)
|
||||
|
||||
var (
|
||||
forward_InferenceService_CreateInferenceService_0 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_InferenceService_GetInferenceService_0 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_InferenceService_DeleteInferenceService_0 = runtime.ForwardResponseMessage
|
||||
)
|
170
api/gen/inference_service_grpc.pb.go
Normal file
170
api/gen/inference_service_grpc.pb.go
Normal file
@@ -0,0 +1,170 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
|
||||
package gen
|
||||
|
||||
import (
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
emptypb "google.golang.org/protobuf/types/known/emptypb"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
const _ = grpc.SupportPackageIsVersion7
|
||||
|
||||
// InferenceServiceClient is the client API for InferenceService service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
type InferenceServiceClient interface {
|
||||
CreateInferenceService(ctx context.Context, in *CreateInferenceServiceRequest, opts ...grpc.CallOption) (*GetInferenceServiceResponse, error)
|
||||
GetInferenceService(ctx context.Context, in *InferenceServiceIdentifier, opts ...grpc.CallOption) (*GetInferenceServiceResponse, error)
|
||||
DeleteInferenceService(ctx context.Context, in *InferenceServiceIdentifier, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
||||
}
|
||||
|
||||
type inferenceServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewInferenceServiceClient(cc grpc.ClientConnInterface) InferenceServiceClient {
|
||||
return &inferenceServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *inferenceServiceClient) CreateInferenceService(ctx context.Context, in *CreateInferenceServiceRequest, opts ...grpc.CallOption) (*GetInferenceServiceResponse, error) {
|
||||
out := new(GetInferenceServiceResponse)
|
||||
err := c.cc.Invoke(ctx, "/api.InferenceService/CreateInferenceService", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *inferenceServiceClient) GetInferenceService(ctx context.Context, in *InferenceServiceIdentifier, opts ...grpc.CallOption) (*GetInferenceServiceResponse, error) {
|
||||
out := new(GetInferenceServiceResponse)
|
||||
err := c.cc.Invoke(ctx, "/api.InferenceService/GetInferenceService", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *inferenceServiceClient) DeleteInferenceService(ctx context.Context, in *InferenceServiceIdentifier, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
||||
out := new(emptypb.Empty)
|
||||
err := c.cc.Invoke(ctx, "/api.InferenceService/DeleteInferenceService", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// InferenceServiceServer is the server API for InferenceService service.
|
||||
// All implementations must embed UnimplementedInferenceServiceServer
|
||||
// for forward compatibility
|
||||
type InferenceServiceServer interface {
|
||||
CreateInferenceService(context.Context, *CreateInferenceServiceRequest) (*GetInferenceServiceResponse, error)
|
||||
GetInferenceService(context.Context, *InferenceServiceIdentifier) (*GetInferenceServiceResponse, error)
|
||||
DeleteInferenceService(context.Context, *InferenceServiceIdentifier) (*emptypb.Empty, error)
|
||||
mustEmbedUnimplementedInferenceServiceServer()
|
||||
}
|
||||
|
||||
// UnimplementedInferenceServiceServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedInferenceServiceServer struct {
|
||||
}
|
||||
|
||||
func (UnimplementedInferenceServiceServer) CreateInferenceService(context.Context, *CreateInferenceServiceRequest) (*GetInferenceServiceResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CreateInferenceService not implemented")
|
||||
}
|
||||
func (UnimplementedInferenceServiceServer) GetInferenceService(context.Context, *InferenceServiceIdentifier) (*GetInferenceServiceResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetInferenceService not implemented")
|
||||
}
|
||||
func (UnimplementedInferenceServiceServer) DeleteInferenceService(context.Context, *InferenceServiceIdentifier) (*emptypb.Empty, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method DeleteInferenceService not implemented")
|
||||
}
|
||||
func (UnimplementedInferenceServiceServer) mustEmbedUnimplementedInferenceServiceServer() {}
|
||||
|
||||
// UnsafeInferenceServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to InferenceServiceServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeInferenceServiceServer interface {
|
||||
mustEmbedUnimplementedInferenceServiceServer()
|
||||
}
|
||||
|
||||
func RegisterInferenceServiceServer(s grpc.ServiceRegistrar, srv InferenceServiceServer) {
|
||||
s.RegisterService(&_InferenceService_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _InferenceService_CreateInferenceService_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CreateInferenceServiceRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(InferenceServiceServer).CreateInferenceService(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/api.InferenceService/CreateInferenceService",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(InferenceServiceServer).CreateInferenceService(ctx, req.(*CreateInferenceServiceRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _InferenceService_GetInferenceService_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(InferenceServiceIdentifier)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(InferenceServiceServer).GetInferenceService(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/api.InferenceService/GetInferenceService",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(InferenceServiceServer).GetInferenceService(ctx, req.(*InferenceServiceIdentifier))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _InferenceService_DeleteInferenceService_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(InferenceServiceIdentifier)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(InferenceServiceServer).DeleteInferenceService(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/api.InferenceService/DeleteInferenceService",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(InferenceServiceServer).DeleteInferenceService(ctx, req.(*InferenceServiceIdentifier))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _InferenceService_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "api.InferenceService",
|
||||
HandlerType: (*InferenceServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "CreateInferenceService",
|
||||
Handler: _InferenceService_CreateInferenceService_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetInferenceService",
|
||||
Handler: _InferenceService_GetInferenceService_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DeleteInferenceService",
|
||||
Handler: _InferenceService_DeleteInferenceService_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "inference_service.proto",
|
||||
}
|
@@ -221,6 +221,7 @@ type Namespace struct {
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
SourceName string `protobuf:"bytes,2,opt,name=sourceName,proto3" json:"sourceName,omitempty"`
|
||||
}
|
||||
|
||||
func (x *Namespace) Reset() {
|
||||
@@ -262,6 +263,13 @@ func (x *Namespace) GetName() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Namespace) GetSourceName() string {
|
||||
if x != nil {
|
||||
return x.SourceName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_namespace_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_namespace_proto_rawDesc = []byte{
|
||||
@@ -289,9 +297,11 @@ var file_namespace_proto_rawDesc = []byte{
|
||||
0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65,
|
||||
0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x61, 0x70,
|
||||
0x69, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x09, 0x6e, 0x61, 0x6d,
|
||||
0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x1f, 0x0a, 0x09, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70,
|
||||
0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x3f, 0x0a, 0x09, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70,
|
||||
0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x32, 0xec, 0x01, 0x0a, 0x10, 0x4e, 0x61, 0x6d, 0x65,
|
||||
0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63,
|
||||
0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6f, 0x75,
|
||||
0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x32, 0xec, 0x01, 0x0a, 0x10, 0x4e, 0x61, 0x6d, 0x65,
|
||||
0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6b, 0x0a, 0x0e,
|
||||
0x4c, 0x69, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x12, 0x1a,
|
||||
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61,
|
||||
|
92
api/proto/inference_service.proto
Normal file
92
api/proto/inference_service.proto
Normal file
@@ -0,0 +1,92 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package api;
|
||||
option go_package = "github.com/onepanelio/core/api/gen";
|
||||
|
||||
import "google/api/annotations.proto";
|
||||
import "google/protobuf/empty.proto";
|
||||
|
||||
service InferenceService {
|
||||
rpc CreateInferenceService (CreateInferenceServiceRequest) returns (GetInferenceServiceResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/apis/v1beta1/{namespace}/inferenceservice"
|
||||
body: "*"
|
||||
};
|
||||
}
|
||||
|
||||
rpc GetInferenceService(InferenceServiceIdentifier) returns (GetInferenceServiceResponse) {
|
||||
option (google.api.http) = {
|
||||
get: "/apis/v1beta1/{namespace}/inferenceservice/{name}"
|
||||
};
|
||||
}
|
||||
|
||||
rpc DeleteInferenceService (InferenceServiceIdentifier) returns (google.protobuf.Empty) {
|
||||
option (google.api.http) = {
|
||||
delete: "/apis/v1beta1/{namespace}/inferenceservice/{name}"
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
message InferenceServiceIdentifier {
|
||||
string namespace = 1;
|
||||
string name = 2;
|
||||
}
|
||||
|
||||
message Env {
|
||||
string name = 1;
|
||||
string value = 2;
|
||||
}
|
||||
|
||||
message Container {
|
||||
string image = 1;
|
||||
string name = 2;
|
||||
repeated Env env = 3;
|
||||
}
|
||||
|
||||
message InferenceServiceTransformer {
|
||||
repeated Container containers = 1;
|
||||
string minCpu = 2;
|
||||
string minMemory = 3;
|
||||
string maxCpu = 4;
|
||||
string maxMemory = 5;
|
||||
}
|
||||
|
||||
message InferenceServicePredictor {
|
||||
string name = 1;
|
||||
string runtimeVersion = 2;
|
||||
string storageUri = 3;
|
||||
string nodeSelector = 4;
|
||||
string minCpu = 5;
|
||||
string minMemory = 6;
|
||||
string maxCpu = 7;
|
||||
string maxMemory = 8;
|
||||
}
|
||||
|
||||
message CreateInferenceServiceRequest {
|
||||
string namespace = 1;
|
||||
string name = 2;
|
||||
string defaultTransformerImage = 3;
|
||||
|
||||
InferenceServicePredictor predictor = 4;
|
||||
InferenceServiceTransformer transformer = 5;
|
||||
}
|
||||
|
||||
message DeployModelResponse {
|
||||
string status = 1;
|
||||
}
|
||||
|
||||
message InferenceServiceCondition {
|
||||
string lastTransitionTime = 1;
|
||||
string status = 2;
|
||||
string type = 3;
|
||||
}
|
||||
|
||||
message GetInferenceServiceResponse {
|
||||
bool ready = 1;
|
||||
repeated InferenceServiceCondition conditions = 2;
|
||||
string predictUrl = 3;
|
||||
}
|
||||
|
||||
message InferenceServiceEndpoints {
|
||||
string predict = 1;
|
||||
}
|
@@ -40,4 +40,5 @@ message CreateNamespaceRequest {
|
||||
|
||||
message Namespace {
|
||||
string name = 1;
|
||||
string sourceName = 2;
|
||||
}
|
28
db/go/20211028205201_cvat_1_6.go
Normal file
28
db/go/20211028205201_cvat_1_6.go
Normal file
@@ -0,0 +1,28 @@
|
||||
package migration
|
||||
|
||||
import (
|
||||
"database/sql"
|
||||
"github.com/pressly/goose"
|
||||
"path/filepath"
|
||||
)
|
||||
|
||||
func initialize20211028205201() {
|
||||
if _, ok := initializedMigrations[20211028205201]; !ok {
|
||||
goose.AddMigration(Up20211028205201, Down20211028205201)
|
||||
initializedMigrations[20211028205201] = true
|
||||
}
|
||||
}
|
||||
|
||||
// Up20211028205201 creates the new cvat 1.6.0 workspace template
|
||||
func Up20211028205201(tx *sql.Tx) error {
|
||||
// This code is executed when the migration is applied.
|
||||
return createWorkspaceTemplate(
|
||||
filepath.Join("workspaces", "cvat_1_6_0", "20211028205201.yaml"),
|
||||
"CVAT_1.6.0",
|
||||
"Powerful and efficient Computer Vision Annotation Tool (CVAT)")
|
||||
}
|
||||
|
||||
// Down20211028205201 archives the new cvat 1.6.0 workspace template
|
||||
func Down20211028205201(tx *sql.Tx) error {
|
||||
return archiveWorkspaceTemplate("CVAT_1.6.0")
|
||||
}
|
@@ -96,6 +96,7 @@ func Initialize() {
|
||||
initialize20210329194731()
|
||||
initialize20210414165510()
|
||||
initialize20210719190719()
|
||||
initialize20211028205201()
|
||||
|
||||
if err := client.DB.Close(); err != nil {
|
||||
log.Printf("[error] closing db %v", err)
|
||||
|
@@ -3,7 +3,9 @@ package migration
|
||||
import (
|
||||
"fmt"
|
||||
v1 "github.com/onepanelio/core/pkg"
|
||||
"github.com/onepanelio/core/pkg/util/data"
|
||||
uid2 "github.com/onepanelio/core/pkg/util/uid"
|
||||
"path/filepath"
|
||||
)
|
||||
|
||||
// createWorkspaceTemplate will create the workspace template given by {{templateName}} with the contents
|
||||
@@ -21,7 +23,13 @@ func createWorkspaceTemplate(filename, templateName, description string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
newManifest, err := readDataFile(filename)
|
||||
filename = filepath.Join("db", "yaml", filename)
|
||||
manifestFile, err := data.ManifestFileFromFile(filename)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
newManifest, err := manifestFile.SpecString()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -97,12 +105,19 @@ func updateWorkspaceTemplateManifest(filename, templateName string) error {
|
||||
}
|
||||
defer client.DB.Close()
|
||||
|
||||
filename = filepath.Join("db", "yaml", filename)
|
||||
|
||||
namespaces, err := client.ListOnepanelEnabledNamespaces()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
newManifest, err := readDataFile(filename)
|
||||
manifest, err := data.ManifestFileFromFile(filename)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
newManifest, err := manifest.SpecString()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -145,7 +160,14 @@ func createWorkflowTemplate(filename, templateName string, labels map[string]str
|
||||
return err
|
||||
}
|
||||
|
||||
manifest, err := readDataFile(filename)
|
||||
filename = filepath.Join("db", "yaml", filename)
|
||||
|
||||
manifestFile, err := data.ManifestFileFromFile(filename)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
manifest, err := manifestFile.SpecString()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -190,7 +212,14 @@ func updateWorkflowTemplateManifest(filename, templateName string, labels map[st
|
||||
return err
|
||||
}
|
||||
|
||||
newManifest, err := readDataFile(filename)
|
||||
filename = filepath.Join("db", "yaml", filename)
|
||||
|
||||
manifestFile, err := data.ManifestFileFromFile(filename)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
newManifest, err := manifestFile.SpecString()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
@@ -1,4 +1,15 @@
|
||||
# source: https://github.com/onepanelio/templates/blob/master/workflows/nni-hyperparameter-tuning/mnist/
|
||||
metadata:
|
||||
name: "Hyperparameter Tuning Example"
|
||||
kind: Workflow
|
||||
version: 20201225172926
|
||||
action: create
|
||||
source: "https://github.com/onepanelio/templates/blob/master/workflows/nni-hyperparameter-tuning/mnist/"
|
||||
deprecated: true
|
||||
labels:
|
||||
framework: tensorflow
|
||||
tuner: TPE
|
||||
"created-by": system
|
||||
spec:
|
||||
entrypoint: main
|
||||
arguments:
|
||||
parameters:
|
||||
@@ -46,7 +57,7 @@ arguments:
|
||||
hint: Name of node pool or group to run this workflow task
|
||||
type: select.nodepool
|
||||
name: sys-node-pool
|
||||
value: {{.DefaultNodePoolOption}}
|
||||
value: "{{.DefaultNodePoolOption}}"
|
||||
required: true
|
||||
|
||||
volumeClaimTemplates:
|
||||
|
@@ -1,4 +1,15 @@
|
||||
# source: https://github.com/onepanelio/templates/blob/master/workflows/nni-hyperparameter-tuning/mnist/
|
||||
metadata:
|
||||
name: "Hyperparameter Tuning Example"
|
||||
kind: Workflow
|
||||
version: 20210118175809
|
||||
action: update
|
||||
source: "https://github.com/onepanelio/templates/blob/master/workflows/nni-hyperparameter-tuning/mnist/"
|
||||
deprecated: true
|
||||
labels:
|
||||
framework: tensorflow
|
||||
tuner: TPE
|
||||
"created-by": system
|
||||
spec:
|
||||
# Workflow Template example for hyperparameter tuning
|
||||
# Documentation: https://docs.onepanel.ai/docs/reference/workflows/hyperparameter-tuning
|
||||
#
|
||||
@@ -65,7 +76,7 @@ arguments:
|
||||
hint: Name of node pool or group to run this workflow task
|
||||
type: select.nodepool
|
||||
name: sys-node-pool
|
||||
value: {{.DefaultNodePoolOption}}
|
||||
value: "{{.DefaultNodePoolOption}}"
|
||||
required: true
|
||||
|
||||
templates:
|
||||
@@ -130,7 +141,7 @@ templates:
|
||||
- name: hyperparamtuning-output
|
||||
mountPath: /mnt/output
|
||||
nodeSelector:
|
||||
{{.NodePoolLabel}}: '{{workflow.parameters.sys-node-pool}}'
|
||||
"{{.NodePoolLabel}}": '{{workflow.parameters.sys-node-pool}}'
|
||||
sidecars:
|
||||
- name: nni-web-ui
|
||||
image: onepanel/nni-web-ui:0.17.0
|
||||
|
197
db/yaml/workflows/maskrcnn-training/20200812104328.yaml
Normal file
197
db/yaml/workflows/maskrcnn-training/20200812104328.yaml
Normal file
@@ -0,0 +1,197 @@
|
||||
metadata:
|
||||
name: "MaskRCNN Training"
|
||||
kind: Workflow
|
||||
version: 20200812104328
|
||||
action: create
|
||||
labels:
|
||||
"used-by": "cvat"
|
||||
"created-by": "system"
|
||||
spec:
|
||||
arguments:
|
||||
parameters:
|
||||
- name: source
|
||||
value: https://github.com/onepanelio/Mask_RCNN.git
|
||||
displayName: Model source code
|
||||
type: hidden
|
||||
visibility: private
|
||||
|
||||
- name: sys-annotation-path
|
||||
value: annotation-dump/sample_dataset
|
||||
hint: Path to annotated data in default object storage (i.e S3). In CVAT, this parameter will be pre-populated.
|
||||
displayName: Dataset path
|
||||
visibility: private
|
||||
|
||||
- name: sys-output-path
|
||||
value: workflow-data/output/sample_output
|
||||
hint: Path to store output artifacts in default object storage (i.e s3). In CVAT, this parameter will be pre-populated.
|
||||
displayName: Workflow output path
|
||||
visibility: private
|
||||
|
||||
- name: sys-finetune-checkpoint
|
||||
value: ''
|
||||
hint: Select the last fine-tune checkpoint for this model. It may take up to 5 minutes for a recent checkpoint show here. Leave empty if this is the first time you're training this model.
|
||||
displayName: Checkpoint path
|
||||
visibility: public
|
||||
|
||||
- name: sys-num-classes
|
||||
displayName: Number of classes
|
||||
hint: Number of classes (i.e in CVAT taks) + 1 for background
|
||||
value: '81'
|
||||
visibility: private
|
||||
|
||||
- name: extras
|
||||
displayName: Hyperparameters
|
||||
visibility: public
|
||||
type: textarea.textarea
|
||||
value: |-
|
||||
stage-1-epochs=1 # Epochs for network heads
|
||||
stage-2-epochs=2 # Epochs for finetune layers
|
||||
stage-3-epochs=3 # Epochs for all layers
|
||||
hint: "Please refer to our <a href='https://docs.onepanel.ai/docs/getting-started/use-cases/computervision/annotation/cvat/cvat_annotation_model#arguments-optional' target='_blank'>documentation</a> for more information on parameters."
|
||||
|
||||
- name: dump-format
|
||||
type: select.select
|
||||
value: cvat_coco
|
||||
displayName: CVAT dump format
|
||||
visibility: public
|
||||
options:
|
||||
- name: 'MS COCO'
|
||||
value: 'cvat_coco'
|
||||
- name: 'TF Detection API'
|
||||
value: 'cvat_tfrecord'
|
||||
|
||||
- name: tf-image
|
||||
visibility: public
|
||||
value: tensorflow/tensorflow:1.13.1-py3
|
||||
type: select.select
|
||||
displayName: Select TensorFlow image
|
||||
hint: Select the GPU image if you are running on a GPU node pool
|
||||
options:
|
||||
- name: 'TensorFlow 1.13.1 CPU Image'
|
||||
value: 'tensorflow/tensorflow:1.13.1-py3'
|
||||
- name: 'TensorFlow 1.13.1 GPU Image'
|
||||
value: 'tensorflow/tensorflow:1.13.1-gpu-py3'
|
||||
|
||||
- displayName: Node pool
|
||||
hint: Name of node pool or group to run this workflow task
|
||||
type: select.select
|
||||
visibility: public
|
||||
name: sys-node-pool
|
||||
value: Standard_D4s_v3
|
||||
required: true
|
||||
options:
|
||||
- name: 'CPU: 2, RAM: 8GB'
|
||||
value: Standard_D2s_v3
|
||||
- name: 'CPU: 4, RAM: 16GB'
|
||||
value: Standard_D4s_v3
|
||||
- name: 'GPU: 1xK80, CPU: 6, RAM: 56GB'
|
||||
value: Standard_NC6
|
||||
|
||||
entrypoint: main
|
||||
templates:
|
||||
- dag:
|
||||
tasks:
|
||||
- name: train-model
|
||||
template: tensorflow
|
||||
# Uncomment the lines below if you want to send Slack notifications
|
||||
# - arguments:
|
||||
# artifacts:
|
||||
# - from: '{{tasks.train-model.outputs.artifacts.sys-metrics}}'
|
||||
# name: metrics
|
||||
# parameters:
|
||||
# - name: status
|
||||
# value: '{{tasks.train-model.status}}'
|
||||
# dependencies:
|
||||
# - train-model
|
||||
# name: notify-in-slack
|
||||
# template: slack-notify-success
|
||||
name: main
|
||||
- container:
|
||||
args:
|
||||
- |
|
||||
apt-get update \
|
||||
&& apt-get install -y git wget libglib2.0-0 libsm6 libxext6 libxrender-dev \
|
||||
&& pip install -r requirements.txt \
|
||||
&& pip install boto3 pyyaml google-cloud-storage \
|
||||
&& git clone https://github.com/waleedka/coco \
|
||||
&& cd coco/PythonAPI \
|
||||
&& python setup.py build_ext install \
|
||||
&& rm -rf build \
|
||||
&& cd ../../ \
|
||||
&& wget https://github.com/matterport/Mask_RCNN/releases/download/v2.0/mask_rcnn_coco.h5 \
|
||||
&& python setup.py install && ls \
|
||||
&& python samples/coco/cvat.py train --dataset=/mnt/data/datasets \
|
||||
--model=workflow_maskrcnn \
|
||||
--extras="{{workflow.parameters.extras}}" \
|
||||
--ref_model_path="{{workflow.parameters.sys-finetune-checkpoint}}" \
|
||||
--num_classes="{{workflow.parameters.sys-num-classes}}" \
|
||||
&& cd /mnt/src/ \
|
||||
&& python prepare_dataset.py /mnt/data/datasets/annotations/instances_default.json
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
image: '{{workflow.parameters.tf-image}}'
|
||||
volumeMounts:
|
||||
- mountPath: /mnt/data
|
||||
name: data
|
||||
- mountPath: /mnt/output
|
||||
name: output
|
||||
workingDir: /mnt/src
|
||||
nodeSelector:
|
||||
beta.kubernetes.io/instance-type: '{{workflow.parameters.sys-node-pool}}'
|
||||
inputs:
|
||||
artifacts:
|
||||
- name: data
|
||||
path: /mnt/data/datasets/
|
||||
"{{.ArtifactRepositoryType}}":
|
||||
key: '{{workflow.namespace}}/{{workflow.parameters.sys-annotation-path}}'
|
||||
- git:
|
||||
repo: '{{workflow.parameters.source}}'
|
||||
revision: "no-boto"
|
||||
name: src
|
||||
path: /mnt/src
|
||||
name: tensorflow
|
||||
outputs:
|
||||
artifacts:
|
||||
- name: model
|
||||
optional: true
|
||||
path: /mnt/output
|
||||
"{{.ArtifactRepositoryType}}":
|
||||
key: '{{workflow.namespace}}/{{workflow.parameters.sys-output-path}}'
|
||||
# Uncomment the lines below if you want to send Slack notifications
|
||||
#- container:
|
||||
# args:
|
||||
# - SLACK_USERNAME=Onepanel SLACK_TITLE="{{workflow.name}} {{inputs.parameters.status}}"
|
||||
# SLACK_ICON=https://www.gravatar.com/avatar/5c4478592fe00878f62f0027be59c1bd
|
||||
# SLACK_MESSAGE=$(cat /tmp/metrics.json)} ./slack-notify
|
||||
# command:
|
||||
# - sh
|
||||
# - -c
|
||||
# image: technosophos/slack-notify
|
||||
# inputs:
|
||||
# artifacts:
|
||||
# - name: metrics
|
||||
# optional: true
|
||||
# path: /tmp/metrics.json
|
||||
# parameters:
|
||||
# - name: status
|
||||
# name: slack-notify-success
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
creationTimestamp: null
|
||||
name: data
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 200Gi
|
||||
- metadata:
|
||||
creationTimestamp: null
|
||||
name: output
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 200Gi
|
191
db/yaml/workflows/maskrcnn-training/20200824095513.yaml
Normal file
191
db/yaml/workflows/maskrcnn-training/20200824095513.yaml
Normal file
@@ -0,0 +1,191 @@
|
||||
metadata:
|
||||
name: "MaskRCNN Training"
|
||||
kind: Workflow
|
||||
version: 20200824095513
|
||||
action: update
|
||||
labels:
|
||||
"used-by": "cvat"
|
||||
"created-by": "system"
|
||||
spec:
|
||||
arguments:
|
||||
parameters:
|
||||
- name: source
|
||||
value: https://github.com/onepanelio/Mask_RCNN.git
|
||||
displayName: Model source code
|
||||
type: hidden
|
||||
visibility: private
|
||||
|
||||
- name: cvat-annotation-path
|
||||
value: annotation-dump/sample_dataset
|
||||
hint: Path to annotated data in default object storage (i.e S3). In CVAT, this parameter will be pre-populated.
|
||||
displayName: Dataset path
|
||||
visibility: private
|
||||
|
||||
- name: cvat-output-path
|
||||
value: workflow-data/output/sample_output
|
||||
hint: Path to store output artifacts in default object storage (i.e s3). In CVAT, this parameter will be pre-populated.
|
||||
displayName: Workflow output path
|
||||
visibility: private
|
||||
|
||||
- name: cvat-finetune-checkpoint
|
||||
value: ''
|
||||
hint: Select the last fine-tune checkpoint for this model. It may take up to 5 minutes for a recent checkpoint show here. Leave empty if this is the first time you're training this model.
|
||||
displayName: Checkpoint path
|
||||
visibility: public
|
||||
|
||||
- name: cvat-num-classes
|
||||
displayName: Number of classes
|
||||
hint: Number of classes (i.e in CVAT taks) + 1 for background
|
||||
value: '81'
|
||||
visibility: private
|
||||
|
||||
- name: hyperparameters
|
||||
displayName: Hyperparameters
|
||||
visibility: public
|
||||
type: textarea.textarea
|
||||
value: |-
|
||||
stage-1-epochs=1 # Epochs for network heads
|
||||
stage-2-epochs=2 # Epochs for finetune layers
|
||||
stage-3-epochs=3 # Epochs for all layers
|
||||
hint: "Please refer to our <a href='https://docs.onepanel.ai/docs/getting-started/use-cases/computervision/annotation/cvat/cvat_annotation_model#arguments-optional' target='_blank'>documentation</a> for more information on parameters. Number of classes will be automatically populated if you had 'sys-num-classes' parameter in a workflow."
|
||||
|
||||
- name: dump-format
|
||||
value: cvat_coco
|
||||
displayName: CVAT dump format
|
||||
visibility: public
|
||||
|
||||
- name: tf-image
|
||||
visibility: public
|
||||
value: tensorflow/tensorflow:1.13.1-py3
|
||||
type: select.select
|
||||
displayName: Select TensorFlow image
|
||||
hint: Select the GPU image if you are running on a GPU node pool
|
||||
options:
|
||||
- name: 'TensorFlow 1.13.1 CPU Image'
|
||||
value: 'tensorflow/tensorflow:1.13.1-py3'
|
||||
- name: 'TensorFlow 1.13.1 GPU Image'
|
||||
value: 'tensorflow/tensorflow:1.13.1-gpu-py3'
|
||||
|
||||
- displayName: Node pool
|
||||
hint: Name of node pool or group to run this workflow task
|
||||
type: select.select
|
||||
visibility: public
|
||||
name: sys-node-pool
|
||||
value: Standard_D4s_v3
|
||||
required: true
|
||||
options:
|
||||
- name: 'CPU: 2, RAM: 8GB'
|
||||
value: Standard_D2s_v3
|
||||
- name: 'CPU: 4, RAM: 16GB'
|
||||
value: Standard_D4s_v3
|
||||
- name: 'GPU: 1xK80, CPU: 6, RAM: 56GB'
|
||||
value: Standard_NC6
|
||||
|
||||
entrypoint: main
|
||||
templates:
|
||||
- dag:
|
||||
tasks:
|
||||
- name: train-model
|
||||
template: tensorflow
|
||||
# Uncomment the lines below if you want to send Slack notifications
|
||||
# - arguments:
|
||||
# artifacts:
|
||||
# - from: '{{tasks.train-model.outputs.artifacts.sys-metrics}}'
|
||||
# name: metrics
|
||||
# parameters:
|
||||
# - name: status
|
||||
# value: '{{tasks.train-model.status}}'
|
||||
# dependencies:
|
||||
# - train-model
|
||||
# name: notify-in-slack
|
||||
# template: slack-notify-success
|
||||
name: main
|
||||
- container:
|
||||
args:
|
||||
- |
|
||||
apt-get update \
|
||||
&& apt-get install -y git wget libglib2.0-0 libsm6 libxext6 libxrender-dev \
|
||||
&& pip install -r requirements.txt \
|
||||
&& pip install boto3 pyyaml google-cloud-storage \
|
||||
&& git clone https://github.com/waleedka/coco \
|
||||
&& cd coco/PythonAPI \
|
||||
&& python setup.py build_ext install \
|
||||
&& rm -rf build \
|
||||
&& cd ../../ \
|
||||
&& wget https://github.com/matterport/Mask_RCNN/releases/download/v2.0/mask_rcnn_coco.h5 \
|
||||
&& python setup.py install && ls \
|
||||
&& python samples/coco/cvat.py train --dataset=/mnt/data/datasets \
|
||||
--model=workflow_maskrcnn \
|
||||
--extras="{{workflow.parameters.hyperparameters}}" \
|
||||
--ref_model_path="{{workflow.parameters.cvat-finetune-checkpoint}}" \
|
||||
--num_classes="{{workflow.parameters.cvat-num-classes}}" \
|
||||
&& cd /mnt/src/ \
|
||||
&& python prepare_dataset.py /mnt/data/datasets/annotations/instances_default.json
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
image: '{{workflow.parameters.tf-image}}'
|
||||
volumeMounts:
|
||||
- mountPath: /mnt/data
|
||||
name: data
|
||||
- mountPath: /mnt/output
|
||||
name: output
|
||||
workingDir: /mnt/src
|
||||
nodeSelector:
|
||||
beta.kubernetes.io/instance-type: '{{workflow.parameters.sys-node-pool}}'
|
||||
inputs:
|
||||
artifacts:
|
||||
- name: data
|
||||
path: /mnt/data/datasets/
|
||||
"{{.ArtifactRepositoryType}}":
|
||||
key: '{{workflow.namespace}}/{{workflow.parameters.cvat-annotation-path}}'
|
||||
- git:
|
||||
repo: '{{workflow.parameters.source}}'
|
||||
revision: "no-boto"
|
||||
name: src
|
||||
path: /mnt/src
|
||||
name: tensorflow
|
||||
outputs:
|
||||
artifacts:
|
||||
- name: model
|
||||
optional: true
|
||||
path: /mnt/output
|
||||
"{{.ArtifactRepositoryType}}":
|
||||
key: '{{workflow.namespace}}/{{workflow.parameters.cvat-output-path}}/{{workflow.name}}'
|
||||
# Uncomment the lines below if you want to send Slack notifications
|
||||
#- container:
|
||||
# args:
|
||||
# - SLACK_USERNAME=Onepanel SLACK_TITLE="{{workflow.name}} {{inputs.parameters.status}}"
|
||||
# SLACK_ICON=https://www.gravatar.com/avatar/5c4478592fe00878f62f0027be59c1bd
|
||||
# SLACK_MESSAGE=$(cat /tmp/metrics.json)} ./slack-notify
|
||||
# command:
|
||||
# - sh
|
||||
# - -c
|
||||
# image: technosophos/slack-notify
|
||||
# inputs:
|
||||
# artifacts:
|
||||
# - name: metrics
|
||||
# optional: true
|
||||
# path: /tmp/metrics.json
|
||||
# parameters:
|
||||
# - name: status
|
||||
# name: slack-notify-success
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
creationTimestamp: null
|
||||
name: data
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 200Gi
|
||||
- metadata:
|
||||
creationTimestamp: null
|
||||
name: output
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 200Gi
|
@@ -1,3 +1,12 @@
|
||||
metadata:
|
||||
name: "MaskRCNN Training"
|
||||
kind: Workflow
|
||||
version: 20201115145814
|
||||
action: update
|
||||
labels:
|
||||
"used-by": "cvat"
|
||||
"created-by": "system"
|
||||
spec:
|
||||
entrypoint: main
|
||||
arguments:
|
||||
parameters:
|
||||
@@ -137,7 +146,7 @@ templates:
|
||||
artifacts:
|
||||
- name: data
|
||||
path: /mnt/data/datasets/
|
||||
{{.ArtifactRepositoryType}}:
|
||||
"{{.ArtifactRepositoryType}}":
|
||||
key: '{{workflow.namespace}}/{{workflow.parameters.cvat-annotation-path}}'
|
||||
- git:
|
||||
repo: '{{workflow.parameters.source}}'
|
||||
@@ -149,7 +158,7 @@ templates:
|
||||
- name: model
|
||||
optional: true
|
||||
path: /mnt/output
|
||||
{{.ArtifactRepositoryType}}:
|
||||
"{{.ArtifactRepositoryType}}":
|
||||
key: '{{workflow.namespace}}/{{workflow.parameters.cvat-output-path}}/{{workflow.name}}'
|
||||
# Uncomment the lines below if you want to send Slack notifications
|
||||
#- container:
|
||||
|
@@ -1,3 +1,12 @@
|
||||
metadata:
|
||||
name: "MaskRCNN Training"
|
||||
kind: Workflow
|
||||
version: 20201208155115
|
||||
action: update
|
||||
labels:
|
||||
"used-by": "cvat"
|
||||
"created-by": "system"
|
||||
spec:
|
||||
entrypoint: main
|
||||
arguments:
|
||||
parameters:
|
||||
@@ -139,7 +148,7 @@ templates:
|
||||
artifacts:
|
||||
- name: data
|
||||
path: /mnt/data/datasets/
|
||||
{{.ArtifactRepositoryType}}:
|
||||
"{{.ArtifactRepositoryType}}":
|
||||
key: '{{workflow.namespace}}/{{workflow.parameters.cvat-annotation-path}}'
|
||||
- git:
|
||||
repo: '{{workflow.parameters.source}}'
|
||||
@@ -151,7 +160,7 @@ templates:
|
||||
- name: model
|
||||
optional: true
|
||||
path: /mnt/output
|
||||
{{.ArtifactRepositoryType}}:
|
||||
"{{.ArtifactRepositoryType}}":
|
||||
key: '{{workflow.namespace}}/{{workflow.parameters.cvat-output-path}}/{{workflow.name}}'
|
||||
# Uncomment the lines below if you want to send Slack notifications
|
||||
#- container:
|
||||
|
@@ -1,4 +1,13 @@
|
||||
# source: https://github.com/onepanelio/templates/blob/master/workflows/maskrcnn-training/
|
||||
metadata:
|
||||
name: "MaskRCNN Training"
|
||||
kind: Workflow
|
||||
version: 20201221195937
|
||||
action: update
|
||||
source: "https://github.com/onepanelio/templates/blob/master/workflows/maskrcnn-training/"
|
||||
labels:
|
||||
"used-by": "cvat"
|
||||
"created-by": "system"
|
||||
spec:
|
||||
arguments:
|
||||
parameters:
|
||||
- name: cvat-annotation-path
|
||||
@@ -57,7 +66,7 @@ arguments:
|
||||
type: select.nodepool
|
||||
visibility: public
|
||||
name: sys-node-pool
|
||||
value: {{.DefaultNodePoolOption}}
|
||||
value: "{{.DefaultNodePoolOption}}"
|
||||
required: true
|
||||
|
||||
entrypoint: main
|
||||
|
@@ -1,4 +1,13 @@
|
||||
# source: https://github.com/onepanelio/templates/blob/master/workflows/maskrcnn-training/
|
||||
metadata:
|
||||
name: "MaskRCNN Training"
|
||||
kind: Workflow
|
||||
version: 20210118175809
|
||||
action: update
|
||||
source: "https://github.com/onepanelio/templates/blob/master/workflows/maskrcnn-training/"
|
||||
labels:
|
||||
"used-by": "cvat"
|
||||
"created-by": "system"
|
||||
spec:
|
||||
arguments:
|
||||
parameters:
|
||||
- name: cvat-annotation-path
|
||||
@@ -71,7 +80,7 @@ arguments:
|
||||
type: select.nodepool
|
||||
visibility: public
|
||||
name: sys-node-pool
|
||||
value: {{.DefaultNodePoolOption}}
|
||||
value: "{{.DefaultNodePoolOption}}"
|
||||
required: true
|
||||
|
||||
entrypoint: main
|
||||
@@ -122,7 +131,7 @@ templates:
|
||||
- containerPort: 6006
|
||||
name: tensorboard
|
||||
nodeSelector:
|
||||
{{.NodePoolLabel}}: '{{workflow.parameters.sys-node-pool}}'
|
||||
"{{.NodePoolLabel}}": '{{workflow.parameters.sys-node-pool}}'
|
||||
inputs:
|
||||
artifacts:
|
||||
- name: data
|
||||
@@ -163,7 +172,7 @@ templates:
|
||||
name: processed-data
|
||||
workingDir: /mnt/src
|
||||
nodeSelector:
|
||||
{{.NodePoolLabel}}: '{{workflow.parameters.sys-node-pool}}'
|
||||
"{{.NodePoolLabel}}": '{{workflow.parameters.sys-node-pool}}'
|
||||
inputs:
|
||||
artifacts:
|
||||
- name: data
|
||||
|
@@ -1,3 +1,12 @@
|
||||
metadata:
|
||||
name: "PyTorch Training"
|
||||
kind: Workflow
|
||||
version: 20200605090509
|
||||
action: create
|
||||
labels:
|
||||
"created-by": "system"
|
||||
framework: pytorch
|
||||
spec:
|
||||
entrypoint: main
|
||||
arguments:
|
||||
parameters:
|
||||
|
@@ -1,4 +1,13 @@
|
||||
# source: https://github.com/onepanelio/templates/blob/master/workflows/pytorch-mnist-training/
|
||||
metadata:
|
||||
name: "PyTorch Training"
|
||||
kind: Workflow
|
||||
version: 20201221194344
|
||||
action: update
|
||||
source: "https://github.com/onepanelio/templates/blob/master/workflows/pytorch-mnist-training/"
|
||||
labels:
|
||||
"created-by": "system"
|
||||
framework: pytorch
|
||||
spec:
|
||||
arguments:
|
||||
parameters:
|
||||
- name: epochs
|
||||
@@ -7,7 +16,7 @@ arguments:
|
||||
hint: Name of node pool or group to run this workflow task
|
||||
type: select.nodepool
|
||||
name: sys-node-pool
|
||||
value: {{.DefaultNodePoolOption}}
|
||||
value: "{{.DefaultNodePoolOption}}"
|
||||
visibility: public
|
||||
required: true
|
||||
entrypoint: main
|
||||
|
@@ -1,4 +1,13 @@
|
||||
# source: https://github.com/onepanelio/templates/blob/master/workflows/pytorch-mnist-training/
|
||||
metadata:
|
||||
name: "PyTorch Training"
|
||||
kind: Workflow
|
||||
version: 20210118175809
|
||||
action: update
|
||||
source: "https://github.com/onepanelio/templates/blob/master/workflows/pytorch-mnist-training/"
|
||||
labels:
|
||||
"created-by": "system"
|
||||
framework: pytorch
|
||||
spec:
|
||||
arguments:
|
||||
parameters:
|
||||
- name: epochs
|
||||
@@ -7,7 +16,7 @@ arguments:
|
||||
hint: Name of node pool or group to run this workflow task
|
||||
type: select.nodepool
|
||||
name: sys-node-pool
|
||||
value: {{.DefaultNodePoolOption}}
|
||||
value: "{{.DefaultNodePoolOption}}"
|
||||
visibility: public
|
||||
required: true
|
||||
entrypoint: main
|
||||
@@ -173,7 +182,7 @@ templates:
|
||||
- name: output
|
||||
mountPath: /mnt/output
|
||||
nodeSelector:
|
||||
{{.NodePoolLabel}}: '{{workflow.parameters.sys-node-pool}}'
|
||||
"{{.NodePoolLabel}}": '{{workflow.parameters.sys-node-pool}}'
|
||||
sidecars:
|
||||
- name: tensorboard
|
||||
image: onepanel/dl:0.17.0
|
||||
|
@@ -1,4 +1,13 @@
|
||||
# source: https://github.com/onepanelio/templates/blob/master/workflows/pytorch-mnist-training/
|
||||
metadata:
|
||||
name: "PyTorch Training"
|
||||
kind: Workflow
|
||||
version: 20210323175655
|
||||
action: update
|
||||
source: "https://github.com/onepanelio/templates/blob/master/workflows/pytorch-mnist-training/"
|
||||
labels:
|
||||
"created-by": "system"
|
||||
framework: pytorch
|
||||
spec:
|
||||
arguments:
|
||||
parameters:
|
||||
- name: epochs
|
||||
@@ -7,7 +16,7 @@ arguments:
|
||||
hint: Name of node pool or group to run this workflow task
|
||||
type: select.nodepool
|
||||
name: sys-node-pool
|
||||
value: {{.DefaultNodePoolOption}}
|
||||
value: "{{.DefaultNodePoolOption}}"
|
||||
visibility: public
|
||||
required: true
|
||||
entrypoint: main
|
||||
@@ -173,7 +182,7 @@ templates:
|
||||
- name: output
|
||||
mountPath: /mnt/output
|
||||
nodeSelector:
|
||||
{{.NodePoolLabel}}: '{{workflow.parameters.sys-node-pool}}'
|
||||
"{{.NodePoolLabel}}": '{{workflow.parameters.sys-node-pool}}'
|
||||
sidecars:
|
||||
- name: tensorboard
|
||||
image: onepanel/dl:v0.20.0
|
||||
|
@@ -1,4 +1,13 @@
|
||||
# source: https://github.com/onepanelio/templates/blob/master/workflows/tensorflow-mnist-training/template.yaml
|
||||
metadata:
|
||||
name: "TensorFlow Training"
|
||||
kind: Workflow
|
||||
version: 20200605090535
|
||||
action: create
|
||||
source: "https://github.com/onepanelio/templates/blob/master/workflows/tensorflow-mnist-training/template.yaml"
|
||||
labels:
|
||||
"created-by": "system"
|
||||
framework: tensorflow
|
||||
spec:
|
||||
entrypoint: main
|
||||
arguments:
|
||||
parameters:
|
||||
|
@@ -1,4 +1,13 @@
|
||||
# source: https://github.com/onepanelio/templates/blob/master/workflows/tensorflow-mnist-training/template.yaml
|
||||
metadata:
|
||||
name: "TensorFlow Training"
|
||||
kind: Workflow
|
||||
version: 20201209124226
|
||||
action: update
|
||||
source: "https://github.com/onepanelio/templates/blob/master/workflows/tensorflow-mnist-training/template.yaml"
|
||||
labels:
|
||||
"created-by": "system"
|
||||
framework: tensorflow
|
||||
spec:
|
||||
arguments:
|
||||
parameters:
|
||||
- name: epochs
|
||||
|
@@ -1,4 +1,13 @@
|
||||
# source: https://github.com/onepanelio/templates/blob/master/workflows/tensorflow-mnist-training/
|
||||
metadata:
|
||||
name: "TensorFlow Training"
|
||||
kind: Workflow
|
||||
version: 20201223062947
|
||||
action: update
|
||||
source: "https://github.com/onepanelio/templates/blob/master/workflows/tensorflow-mnist-training/"
|
||||
labels:
|
||||
"created-by": "system"
|
||||
framework: tensorflow
|
||||
spec:
|
||||
arguments:
|
||||
parameters:
|
||||
- name: epochs
|
||||
@@ -7,7 +16,7 @@ arguments:
|
||||
hint: Name of node pool or group to run this workflow task
|
||||
type: select.nodepool
|
||||
name: sys-node-pool
|
||||
value: {{.DefaultNodePoolOption}}
|
||||
value: "{{.DefaultNodePoolOption}}"
|
||||
visibility: public
|
||||
required: true
|
||||
entrypoint: main
|
||||
|
@@ -1,4 +1,13 @@
|
||||
# source: https://github.com/onepanelio/templates/blob/master/workflows/tensorflow-mnist-training/
|
||||
metadata:
|
||||
name: "TensorFlow Training"
|
||||
kind: Workflow
|
||||
version: 20210118175809
|
||||
action: update
|
||||
source: "https://github.com/onepanelio/templates/blob/master/workflows/tensorflow-mnist-training/"
|
||||
labels:
|
||||
"created-by": "system"
|
||||
framework: tensorflow
|
||||
spec:
|
||||
arguments:
|
||||
parameters:
|
||||
- name: epochs
|
||||
@@ -7,7 +16,7 @@ arguments:
|
||||
hint: Name of node pool or group to run this workflow task
|
||||
type: select.nodepool
|
||||
name: sys-node-pool
|
||||
value: {{.DefaultNodePoolOption}}
|
||||
value: "{{.DefaultNodePoolOption}}"
|
||||
visibility: public
|
||||
required: true
|
||||
entrypoint: main
|
||||
@@ -84,7 +93,7 @@ templates:
|
||||
- name: output
|
||||
mountPath: /mnt/output
|
||||
nodeSelector:
|
||||
{{.NodePoolLabel}}: '{{workflow.parameters.sys-node-pool}}'
|
||||
"{{.NodePoolLabel}}": '{{workflow.parameters.sys-node-pool}}'
|
||||
sidecars:
|
||||
- name: tensorboard
|
||||
image: onepanel/dl:0.17.0
|
||||
|
@@ -1,4 +1,13 @@
|
||||
# source: https://github.com/onepanelio/templates/blob/master/workflows/tensorflow-mnist-training/
|
||||
metadata:
|
||||
name: "TensorFlow Training"
|
||||
kind: Workflow
|
||||
version: 20210323175655
|
||||
action: update
|
||||
source: "https://github.com/onepanelio/templates/blob/master/workflows/tensorflow-mnist-training/"
|
||||
labels:
|
||||
"created-by": "system"
|
||||
framework: tensorflow
|
||||
spec:
|
||||
arguments:
|
||||
parameters:
|
||||
- name: epochs
|
||||
@@ -7,7 +16,7 @@ arguments:
|
||||
hint: Name of node pool or group to run this workflow task
|
||||
type: select.nodepool
|
||||
name: sys-node-pool
|
||||
value: {{.DefaultNodePoolOption}}
|
||||
value: "{{.DefaultNodePoolOption}}"
|
||||
visibility: public
|
||||
required: true
|
||||
entrypoint: main
|
||||
@@ -84,7 +93,7 @@ templates:
|
||||
- name: output
|
||||
mountPath: /mnt/output
|
||||
nodeSelector:
|
||||
{{.NodePoolLabel}}: '{{workflow.parameters.sys-node-pool}}'
|
||||
"{{.NodePoolLabel}}": '{{workflow.parameters.sys-node-pool}}'
|
||||
sidecars:
|
||||
- name: tensorboard
|
||||
image: onepanel/dl:v0.20.0
|
||||
|
@@ -0,0 +1,221 @@
|
||||
metadata:
|
||||
name: "TF Object Detection Training"
|
||||
kind: Workflow
|
||||
version: 20200812104328
|
||||
action: create
|
||||
source: "https://github.com/onepanelio/templates/blob/master/workflows/tf-object-detection-training/"
|
||||
labels:
|
||||
"created-by": "system"
|
||||
"used-by": "cvat"
|
||||
spec:
|
||||
arguments:
|
||||
parameters:
|
||||
- name: source
|
||||
value: https://github.com/tensorflow/models.git
|
||||
displayName: Model source code
|
||||
type: hidden
|
||||
visibility: private
|
||||
|
||||
- name: trainingsource
|
||||
value: https://github.com/onepanelio/cvat-training.git
|
||||
type: hidden
|
||||
visibility: private
|
||||
|
||||
- name: revision
|
||||
value: v1.13.0
|
||||
type: hidden
|
||||
visibility: private
|
||||
|
||||
- name: sys-annotation-path
|
||||
value: annotation-dump/sample_dataset
|
||||
displayName: Dataset path
|
||||
hint: Path to annotated data in default object storage (i.e S3). In CVAT, this parameter will be pre-populated.
|
||||
|
||||
- name: sys-output-path
|
||||
value: workflow-data/output/sample_output
|
||||
hint: Path to store output artifacts in default object storage (i.e s3). In CVAT, this parameter will be pre-populated.
|
||||
displayName: Workflow output path
|
||||
visibility: private
|
||||
|
||||
- name: ref-model
|
||||
value: frcnn-res50-coco
|
||||
displayName: Model
|
||||
hint: TF Detection API's model to use for training.
|
||||
type: select.select
|
||||
visibility: public
|
||||
options:
|
||||
- name: 'Faster RCNN-ResNet 101-COCO'
|
||||
value: frcnn-res101-coco
|
||||
- name: 'Faster RCNN-ResNet 101-Low Proposal-COCO'
|
||||
value: frcnn-res101-low
|
||||
- name: 'Faster RCNN-ResNet 50-COCO'
|
||||
value: frcnn-res50-coco
|
||||
- name: 'Faster RCNN-NAS-COCO'
|
||||
value: frcnn-nas-coco
|
||||
- name: 'SSD MobileNet V1-COCO'
|
||||
value: ssd-mobilenet-v1-coco2
|
||||
- name: 'SSD MobileNet V2-COCO'
|
||||
value: ssd-mobilenet-v2-coco
|
||||
- name: 'SSDLite MobileNet-COCO'
|
||||
value: ssdlite-mobilenet-coco
|
||||
|
||||
- name: extras
|
||||
value: |-
|
||||
epochs=1000
|
||||
displayName: Hyperparameters
|
||||
visibility: public
|
||||
type: textarea.textarea
|
||||
hint: "Please refer to our <a href='https://docs.onepanel.ai/docs/getting-started/use-cases/computervision/annotation/cvat/cvat_annotation_model#arguments-optional' target='_blank'>documentation</a> for more information on parameters. Number of classes will be automatically populated if you had 'sys-num-classes' parameter in a workflow."
|
||||
|
||||
- name: sys-finetune-checkpoint
|
||||
value: ''
|
||||
hint: Select the last fine-tune checkpoint for this model. It may take up to 5 minutes for a recent checkpoint show here. Leave empty if this is the first time you're training this model.
|
||||
displayName: Checkpoint path
|
||||
visibility: public
|
||||
|
||||
- name: sys-num-classes
|
||||
value: '81'
|
||||
hint: Number of classes
|
||||
displayName: Number of classes
|
||||
visibility: private
|
||||
|
||||
- name: tf-image
|
||||
value: tensorflow/tensorflow:1.13.1-py3
|
||||
type: select.select
|
||||
displayName: Select TensorFlow image
|
||||
visibility: public
|
||||
hint: Select the GPU image if you are running on a GPU node pool
|
||||
options:
|
||||
- name: 'TensorFlow 1.13.1 CPU Image'
|
||||
value: 'tensorflow/tensorflow:1.13.1-py3'
|
||||
- name: 'TensorFlow 1.13.1 GPU Image'
|
||||
value: 'tensorflow/tensorflow:1.13.1-gpu-py3'
|
||||
|
||||
- displayName: Node pool
|
||||
hint: Name of node pool or group to run this workflow task
|
||||
type: select.select
|
||||
name: sys-node-pool
|
||||
value: Standard_D4s_v3
|
||||
visibility: public
|
||||
required: true
|
||||
options:
|
||||
- name: 'CPU: 2, RAM: 8GB'
|
||||
value: Standard_D2s_v3
|
||||
- name: 'CPU: 4, RAM: 16GB'
|
||||
value: Standard_D4s_v3
|
||||
- name: 'GPU: 1xK80, CPU: 6, RAM: 56GB'
|
||||
value: Standard_NC6
|
||||
- name: dump-format
|
||||
value: cvat_tfrecord
|
||||
visibility: public
|
||||
entrypoint: main
|
||||
templates:
|
||||
- dag:
|
||||
tasks:
|
||||
- name: train-model
|
||||
template: tensorflow
|
||||
# Uncomment the lines below if you want to send Slack notifications
|
||||
# - arguments:
|
||||
# artifacts:
|
||||
# - from: '{{tasks.train-model.outputs.artifacts.sys-metrics}}'
|
||||
# name: metrics
|
||||
# parameters:
|
||||
# - name: status
|
||||
# value: '{{tasks.train-model.status}}'
|
||||
# dependencies:
|
||||
# - train-model
|
||||
# name: notify-in-slack
|
||||
# template: slack-notify-success
|
||||
name: main
|
||||
- container:
|
||||
args:
|
||||
- |
|
||||
apt-get update && \
|
||||
apt-get install -y python3-pip git wget unzip libglib2.0-0 libsm6 libxext6 libxrender-dev && \
|
||||
pip install pillow lxml Cython contextlib2 jupyter matplotlib numpy scipy boto3 pycocotools pyyaml google-cloud-storage && \
|
||||
cd /mnt/src/tf/research && \
|
||||
export PYTHONPATH=$PYTHONPATH:` + "`pwd`:`pwd`/slim" + ` && \
|
||||
cd /mnt/src/train && \
|
||||
python convert_workflow.py \
|
||||
--extras="{{workflow.parameters.extras}}" \
|
||||
--model="{{workflow.parameters.ref-model}}" \
|
||||
--num_classes="{{workflow.parameters.sys-num-classes}}" \
|
||||
--sys_finetune_checkpoint={{workflow.parameters.sys-finetune-checkpoint}}
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
image: '{{workflow.parameters.tf-image}}'
|
||||
volumeMounts:
|
||||
- mountPath: /mnt/data
|
||||
name: data
|
||||
- mountPath: /mnt/output
|
||||
name: output
|
||||
workingDir: /mnt/src
|
||||
nodeSelector:
|
||||
beta.kubernetes.io/instance-type: '{{workflow.parameters.sys-node-pool}}'
|
||||
inputs:
|
||||
artifacts:
|
||||
- name: data
|
||||
path: /mnt/data/datasets/
|
||||
"{{.ArtifactRepositoryType}}":
|
||||
key: '{{workflow.namespace}}/{{workflow.parameters.sys-annotation-path}}'
|
||||
- name: models
|
||||
path: /mnt/data/models/
|
||||
optional: true
|
||||
"{{.ArtifactRepositoryType}}":
|
||||
key: '{{workflow.namespace}}/{{workflow.parameters.sys-finetune-checkpoint}}'
|
||||
- git:
|
||||
repo: '{{workflow.parameters.source}}'
|
||||
revision: '{{workflow.parameters.revision}}'
|
||||
name: src
|
||||
path: /mnt/src/tf
|
||||
- git:
|
||||
repo: '{{workflow.parameters.trainingsource}}'
|
||||
revision: 'optional-artifacts'
|
||||
name: tsrc
|
||||
path: /mnt/src/train
|
||||
name: tensorflow
|
||||
outputs:
|
||||
artifacts:
|
||||
- name: model
|
||||
optional: true
|
||||
path: /mnt/output
|
||||
"{{.ArtifactRepositoryType}}":
|
||||
key: '{{workflow.namespace}}/{{workflow.parameters.sys-output-path}}'
|
||||
# Uncomment the lines below if you want to send Slack notifications
|
||||
#- container:
|
||||
# args:
|
||||
# - SLACK_USERNAME=Onepanel SLACK_TITLE="{{workflow.name}} {{inputs.parameters.status}}"
|
||||
# SLACK_ICON=https://www.gravatar.com/avatar/5c4478592fe00878f62f0027be59c1bd
|
||||
# SLACK_MESSAGE=$(cat /tmp/metrics.json)} ./slack-notify
|
||||
# command:
|
||||
# - sh
|
||||
# - -c
|
||||
# image: technosophos/slack-notify
|
||||
# inputs:
|
||||
# artifacts:
|
||||
# - name: metrics
|
||||
# optional: true
|
||||
# path: /tmp/metrics.json
|
||||
# parameters:
|
||||
# - name: status
|
||||
# name: slack-notify-success
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
creationTimestamp: null
|
||||
name: data
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 200Gi
|
||||
- metadata:
|
||||
creationTimestamp: null
|
||||
name: output
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 200Gi
|
@@ -0,0 +1,222 @@
|
||||
metadata:
|
||||
name: "TF Object Detection Training"
|
||||
kind: Workflow
|
||||
version: 20200824101019
|
||||
action: update
|
||||
source: "https://github.com/onepanelio/templates/blob/master/workflows/tf-object-detection-training/"
|
||||
labels:
|
||||
"created-by": "system"
|
||||
"used-by": "cvat"
|
||||
spec:
|
||||
arguments:
|
||||
parameters:
|
||||
- name: source
|
||||
value: https://github.com/tensorflow/models.git
|
||||
displayName: Model source code
|
||||
type: hidden
|
||||
visibility: private
|
||||
|
||||
- name: trainingsource
|
||||
value: https://github.com/onepanelio/cvat-training.git
|
||||
type: hidden
|
||||
visibility: private
|
||||
|
||||
- name: revision
|
||||
value: v1.13.0
|
||||
type: hidden
|
||||
visibility: private
|
||||
|
||||
- name: cvat-annotation-path
|
||||
value: annotation-dump/sample_dataset
|
||||
displayName: Dataset path
|
||||
hint: Path to annotated data in default object storage (i.e S3). In CVAT, this parameter will be pre-populated.
|
||||
visibility: private
|
||||
|
||||
- name: cvat-output-path
|
||||
value: workflow-data/output/sample_output
|
||||
hint: Path to store output artifacts in default object storage (i.e s3). In CVAT, this parameter will be pre-populated.
|
||||
displayName: Workflow output path
|
||||
visibility: private
|
||||
|
||||
- name: cvat-model
|
||||
value: frcnn-res50-coco
|
||||
displayName: Model
|
||||
hint: TF Detection API's model to use for training.
|
||||
type: select.select
|
||||
visibility: public
|
||||
options:
|
||||
- name: 'Faster RCNN-ResNet 101-COCO'
|
||||
value: frcnn-res101-coco
|
||||
- name: 'Faster RCNN-ResNet 101-Low Proposal-COCO'
|
||||
value: frcnn-res101-low
|
||||
- name: 'Faster RCNN-ResNet 50-COCO'
|
||||
value: frcnn-res50-coco
|
||||
- name: 'Faster RCNN-NAS-COCO'
|
||||
value: frcnn-nas-coco
|
||||
- name: 'SSD MobileNet V1-COCO'
|
||||
value: ssd-mobilenet-v1-coco2
|
||||
- name: 'SSD MobileNet V2-COCO'
|
||||
value: ssd-mobilenet-v2-coco
|
||||
- name: 'SSDLite MobileNet-COCO'
|
||||
value: ssdlite-mobilenet-coco
|
||||
|
||||
- name: hyperparameters
|
||||
value: |-
|
||||
num-steps=10000
|
||||
displayName: Hyperparameters
|
||||
visibility: public
|
||||
type: textarea.textarea
|
||||
hint: "Please refer to our <a href='https://docs.onepanel.ai/docs/getting-started/use-cases/computervision/annotation/cvat/cvat_annotation_model#arguments-optional' target='_blank'>documentation</a> for more information on parameters. Number of classes will be automatically populated if you had 'sys-num-classes' parameter in a workflow."
|
||||
|
||||
- name: cvat-finetune-checkpoint
|
||||
value: ''
|
||||
hint: Select the last fine-tune checkpoint for this model. It may take up to 5 minutes for a recent checkpoint show here. Leave empty if this is the first time you're training this model.
|
||||
displayName: Checkpoint path
|
||||
visibility: public
|
||||
|
||||
- name: cvat-num-classes
|
||||
value: '81'
|
||||
hint: Number of classes
|
||||
displayName: Number of classes
|
||||
visibility: private
|
||||
|
||||
- name: tf-image
|
||||
value: tensorflow/tensorflow:1.13.1-py3
|
||||
type: select.select
|
||||
displayName: Select TensorFlow image
|
||||
visibility: public
|
||||
hint: Select the GPU image if you are running on a GPU node pool
|
||||
options:
|
||||
- name: 'TensorFlow 1.13.1 CPU Image'
|
||||
value: 'tensorflow/tensorflow:1.13.1-py3'
|
||||
- name: 'TensorFlow 1.13.1 GPU Image'
|
||||
value: 'tensorflow/tensorflow:1.13.1-gpu-py3'
|
||||
|
||||
- displayName: Node pool
|
||||
hint: Name of node pool or group to run this workflow task
|
||||
type: select.select
|
||||
name: sys-node-pool
|
||||
value: Standard_D4s_v3
|
||||
visibility: public
|
||||
required: true
|
||||
options:
|
||||
- name: 'CPU: 2, RAM: 8GB'
|
||||
value: Standard_D2s_v3
|
||||
- name: 'CPU: 4, RAM: 16GB'
|
||||
value: Standard_D4s_v3
|
||||
- name: 'GPU: 1xK80, CPU: 6, RAM: 56GB'
|
||||
value: Standard_NC6
|
||||
- name: dump-format
|
||||
value: cvat_tfrecord
|
||||
visibility: public
|
||||
entrypoint: main
|
||||
templates:
|
||||
- dag:
|
||||
tasks:
|
||||
- name: train-model
|
||||
template: tensorflow
|
||||
# Uncomment the lines below if you want to send Slack notifications
|
||||
# - arguments:
|
||||
# artifacts:
|
||||
# - from: '{{tasks.train-model.outputs.artifacts.sys-metrics}}'
|
||||
# name: metrics
|
||||
# parameters:
|
||||
# - name: status
|
||||
# value: '{{tasks.train-model.status}}'
|
||||
# dependencies:
|
||||
# - train-model
|
||||
# name: notify-in-slack
|
||||
# template: slack-notify-success
|
||||
name: main
|
||||
- container:
|
||||
args:
|
||||
- |
|
||||
apt-get update && \
|
||||
apt-get install -y python3-pip git wget unzip libglib2.0-0 libsm6 libxext6 libxrender-dev && \
|
||||
pip install pillow lxml Cython contextlib2 jupyter matplotlib numpy scipy boto3 pycocotools pyyaml google-cloud-storage && \
|
||||
cd /mnt/src/tf/research && \
|
||||
export PYTHONPATH=$PYTHONPATH:` + "`pwd`:`pwd`" + `/slim && \
|
||||
cd /mnt/src/train && \
|
||||
python convert_workflow.py \
|
||||
--extras="{{workflow.parameters.hyperparameters}}" \
|
||||
--model="{{workflow.parameters.cvat-model}}" \
|
||||
--num_classes="{{workflow.parameters.cvat-num-classes}}" \
|
||||
--sys_finetune_checkpoint={{workflow.parameters.cvat-finetune-checkpoint}}
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
image: '{{workflow.parameters.tf-image}}'
|
||||
volumeMounts:
|
||||
- mountPath: /mnt/data
|
||||
name: data
|
||||
- mountPath: /mnt/output
|
||||
name: output
|
||||
workingDir: /mnt/src
|
||||
nodeSelector:
|
||||
beta.kubernetes.io/instance-type: '{{workflow.parameters.sys-node-pool}}'
|
||||
inputs:
|
||||
artifacts:
|
||||
- name: data
|
||||
path: /mnt/data/datasets/
|
||||
"{{.ArtifactRepositoryType}}":
|
||||
key: '{{workflow.namespace}}/{{workflow.parameters.cvat-annotation-path}}'
|
||||
- name: models
|
||||
path: /mnt/data/models/
|
||||
optional: true
|
||||
"{{.ArtifactRepositoryType}}":
|
||||
key: '{{workflow.namespace}}/{{workflow.parameters.cvat-finetune-checkpoint}}'
|
||||
- git:
|
||||
repo: '{{workflow.parameters.source}}'
|
||||
revision: '{{workflow.parameters.revision}}'
|
||||
name: src
|
||||
path: /mnt/src/tf
|
||||
- git:
|
||||
repo: '{{workflow.parameters.trainingsource}}'
|
||||
revision: 'optional-artifacts'
|
||||
name: tsrc
|
||||
path: /mnt/src/train
|
||||
name: tensorflow
|
||||
outputs:
|
||||
artifacts:
|
||||
- name: model
|
||||
optional: true
|
||||
path: /mnt/output
|
||||
"{{.ArtifactRepositoryType}}":
|
||||
key: '{{workflow.namespace}}/{{workflow.parameters.cvat-output-path}}/{{workflow.name}}'
|
||||
# Uncomment the lines below if you want to send Slack notifications
|
||||
#- container:
|
||||
# args:
|
||||
# - SLACK_USERNAME=Onepanel SLACK_TITLE="{{workflow.name}} {{inputs.parameters.status}}"
|
||||
# SLACK_ICON=https://www.gravatar.com/avatar/5c4478592fe00878f62f0027be59c1bd
|
||||
# SLACK_MESSAGE=$(cat /tmp/metrics.json)} ./slack-notify
|
||||
# command:
|
||||
# - sh
|
||||
# - -c
|
||||
# image: technosophos/slack-notify
|
||||
# inputs:
|
||||
# artifacts:
|
||||
# - name: metrics
|
||||
# optional: true
|
||||
# path: /tmp/metrics.json
|
||||
# parameters:
|
||||
# - name: status
|
||||
# name: slack-notify-success
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
creationTimestamp: null
|
||||
name: data
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 200Gi
|
||||
- metadata:
|
||||
creationTimestamp: null
|
||||
name: output
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 200Gi
|
@@ -1,3 +1,13 @@
|
||||
metadata:
|
||||
name: "TF Object Detection Training"
|
||||
kind: Workflow
|
||||
version: 20201115134934
|
||||
action: update
|
||||
source: "https://github.com/onepanelio/templates/blob/master/workflows/tf-object-detection-training/"
|
||||
labels:
|
||||
"created-by": "system"
|
||||
"used-by": "cvat"
|
||||
spec:
|
||||
entrypoint: main
|
||||
arguments:
|
||||
parameters:
|
||||
@@ -158,12 +168,12 @@ templates:
|
||||
artifacts:
|
||||
- name: data
|
||||
path: /mnt/data/datasets/
|
||||
{{.ArtifactRepositoryType}}:
|
||||
"{{.ArtifactRepositoryType}}":
|
||||
key: '{{workflow.namespace}}/{{workflow.parameters.cvat-annotation-path}}'
|
||||
- name: models
|
||||
path: /mnt/data/models/
|
||||
optional: true
|
||||
{{.ArtifactRepositoryType}}:
|
||||
"{{.ArtifactRepositoryType}}":
|
||||
key: '{{workflow.namespace}}/{{workflow.parameters.cvat-finetune-checkpoint}}'
|
||||
- git:
|
||||
repo: '{{workflow.parameters.source}}'
|
||||
@@ -180,7 +190,7 @@ templates:
|
||||
- name: model
|
||||
optional: true
|
||||
path: /mnt/output
|
||||
{{.ArtifactRepositoryType}}:
|
||||
"{{.ArtifactRepositoryType}}":
|
||||
key: '{{workflow.namespace}}/{{workflow.parameters.cvat-output-path}}/{{workflow.name}}'
|
||||
# Uncomment the lines below if you want to send Slack notifications
|
||||
#- container:
|
||||
|
@@ -1,3 +1,13 @@
|
||||
metadata:
|
||||
name: "TF Object Detection Training"
|
||||
kind: Workflow
|
||||
version: 20201130130433
|
||||
action: update
|
||||
source: "https://github.com/onepanelio/templates/blob/master/workflows/tf-object-detection-training/"
|
||||
labels:
|
||||
"created-by": "system"
|
||||
"used-by": "cvat"
|
||||
spec:
|
||||
entrypoint: main
|
||||
arguments:
|
||||
parameters:
|
||||
@@ -158,12 +168,12 @@ templates:
|
||||
artifacts:
|
||||
- name: data
|
||||
path: /mnt/data/datasets/
|
||||
{{.ArtifactRepositoryType}}:
|
||||
"{{.ArtifactRepositoryType}}":
|
||||
key: '{{workflow.namespace}}/{{workflow.parameters.cvat-annotation-path}}'
|
||||
- name: models
|
||||
path: /mnt/data/models/
|
||||
optional: true
|
||||
{{.ArtifactRepositoryType}}:
|
||||
"{{.ArtifactRepositoryType}}":
|
||||
key: '{{workflow.parameters.cvat-finetune-checkpoint}}'
|
||||
- git:
|
||||
repo: '{{workflow.parameters.source}}'
|
||||
@@ -180,7 +190,7 @@ templates:
|
||||
- name: model
|
||||
optional: true
|
||||
path: /mnt/output
|
||||
{{.ArtifactRepositoryType}}:
|
||||
"{{.ArtifactRepositoryType}}":
|
||||
key: '{{workflow.namespace}}/{{workflow.parameters.cvat-output-path}}/{{workflow.name}}'
|
||||
# Uncomment the lines below if you want to send Slack notifications
|
||||
#- container:
|
||||
|
@@ -1,3 +1,13 @@
|
||||
metadata:
|
||||
name: "TF Object Detection Training"
|
||||
kind: Workflow
|
||||
version: 20201208155115
|
||||
action: update
|
||||
source: "https://github.com/onepanelio/templates/blob/master/workflows/tf-object-detection-training/"
|
||||
labels:
|
||||
"created-by": "system"
|
||||
"used-by": "cvat"
|
||||
spec:
|
||||
entrypoint: main
|
||||
arguments:
|
||||
parameters:
|
||||
@@ -160,12 +170,12 @@ templates:
|
||||
artifacts:
|
||||
- name: data
|
||||
path: /mnt/data/datasets/
|
||||
{{.ArtifactRepositoryType}}:
|
||||
"{{.ArtifactRepositoryType}}":
|
||||
key: '{{workflow.namespace}}/{{workflow.parameters.cvat-annotation-path}}'
|
||||
- name: models
|
||||
path: /mnt/data/models/
|
||||
optional: true
|
||||
{{.ArtifactRepositoryType}}:
|
||||
"{{.ArtifactRepositoryType}}":
|
||||
key: '{{workflow.parameters.cvat-finetune-checkpoint}}'
|
||||
- git:
|
||||
repo: '{{workflow.parameters.source}}'
|
||||
@@ -182,7 +192,7 @@ templates:
|
||||
- name: model
|
||||
optional: true
|
||||
path: /mnt/output
|
||||
{{.ArtifactRepositoryType}}:
|
||||
"{{.ArtifactRepositoryType}}":
|
||||
key: '{{workflow.namespace}}/{{workflow.parameters.cvat-output-path}}/{{workflow.name}}'
|
||||
# Uncomment the lines below if you want to send Slack notifications
|
||||
#- container:
|
||||
|
@@ -1,4 +1,13 @@
|
||||
# source: https://github.com/onepanelio/templates/blob/master/workflows/tf-object-detection-training/
|
||||
metadata:
|
||||
name: "TF Object Detection Training"
|
||||
kind: Workflow
|
||||
version: 20201223202929
|
||||
action: update
|
||||
source: "https://github.com/onepanelio/templates/blob/master/workflows/tf-object-detection-training/"
|
||||
labels:
|
||||
"created-by": "system"
|
||||
"used-by": "cvat"
|
||||
spec:
|
||||
arguments:
|
||||
parameters:
|
||||
- name: cvat-annotation-path
|
||||
@@ -75,7 +84,7 @@ arguments:
|
||||
hint: Name of node pool or group to run this workflow task
|
||||
type: select.nodepool
|
||||
name: sys-node-pool
|
||||
value: {{.DefaultNodePoolOption}}
|
||||
value: "{{.DefaultNodePoolOption}}"
|
||||
visibility: public
|
||||
required: true
|
||||
|
||||
|
@@ -1,4 +1,13 @@
|
||||
# source: https://github.com/onepanelio/templates/blob/master/workflows/tf-object-detection-training/
|
||||
metadata:
|
||||
name: "TF Object Detection Training"
|
||||
kind: Workflow
|
||||
version: 20210118175809
|
||||
action: update
|
||||
source: "https://github.com/onepanelio/templates/blob/master/workflows/tf-object-detection-training/"
|
||||
labels:
|
||||
"created-by": "system"
|
||||
"used-by": "cvat"
|
||||
spec:
|
||||
arguments:
|
||||
parameters:
|
||||
- name: cvat-annotation-path
|
||||
@@ -101,7 +110,7 @@ arguments:
|
||||
hint: Name of node pool or group to run this workflow task
|
||||
type: select.nodepool
|
||||
name: sys-node-pool
|
||||
value: {{.DefaultNodePoolOption}}
|
||||
value: "{{.DefaultNodePoolOption}}"
|
||||
visibility: public
|
||||
required: true
|
||||
|
||||
@@ -152,7 +161,7 @@ templates:
|
||||
name: output
|
||||
workingDir: /mnt/src
|
||||
nodeSelector:
|
||||
{{.NodePoolLabel}}: '{{workflow.parameters.sys-node-pool}}'
|
||||
"{{.NodePoolLabel}}": '{{workflow.parameters.sys-node-pool}}'
|
||||
inputs:
|
||||
artifacts:
|
||||
- name: data
|
||||
@@ -215,7 +224,7 @@ templates:
|
||||
name: processed-data
|
||||
workingDir: /mnt/src
|
||||
nodeSelector:
|
||||
{{.NodePoolLabel}}: '{{workflow.parameters.sys-node-pool}}'
|
||||
"{{.NodePoolLabel}}": '{{workflow.parameters.sys-node-pool}}'
|
||||
inputs:
|
||||
artifacts:
|
||||
- name: data
|
||||
|
105
db/yaml/workspaces/cvat/20200528140124.yaml
Normal file
105
db/yaml/workspaces/cvat/20200528140124.yaml
Normal file
@@ -0,0 +1,105 @@
|
||||
metadata:
|
||||
name: CVAT
|
||||
kind: Workspace
|
||||
version: 20200528140124
|
||||
action: create
|
||||
description: "Powerful and efficient Computer Vision Annotation Tool (CVAT)"
|
||||
spec:
|
||||
# Docker containers that are part of the Workspace
|
||||
containers:
|
||||
- name: cvat-db
|
||||
image: postgres:10-alpine
|
||||
env:
|
||||
- name: POSTGRES_USER
|
||||
value: root
|
||||
- name: POSTGRES_DB
|
||||
value: cvat
|
||||
- name: POSTGRES_HOST_AUTH_METHOD
|
||||
value: trust
|
||||
- name: PGDATA
|
||||
value: /var/lib/psql/data
|
||||
ports:
|
||||
- containerPort: 5432
|
||||
name: tcp
|
||||
volumeMounts:
|
||||
- name: db
|
||||
mountPath: /var/lib/psql
|
||||
- name: cvat-redis
|
||||
image: redis:4.0-alpine
|
||||
ports:
|
||||
- containerPort: 6379
|
||||
name: tcp
|
||||
- name: cvat
|
||||
image: onepanel/cvat:v0.7.0
|
||||
env:
|
||||
- name: DJANGO_MODWSGI_EXTRA_ARGS
|
||||
value: ""
|
||||
- name: ALLOWED_HOSTS
|
||||
value: '*'
|
||||
- name: CVAT_REDIS_HOST
|
||||
value: localhost
|
||||
- name: CVAT_POSTGRES_HOST
|
||||
value: localhost
|
||||
- name: CVAT_SHARE_URL
|
||||
value: /home/django/data
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
name: http
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /home/django/data
|
||||
- name: keys
|
||||
mountPath: /home/django/keys
|
||||
- name: logs
|
||||
mountPath: /home/django/logs
|
||||
- name: models
|
||||
mountPath: /home/django/models
|
||||
- name: cvat-ui
|
||||
image: onepanel/cvat-ui:v0.7.0
|
||||
ports:
|
||||
- containerPort: 80
|
||||
name: http
|
||||
ports:
|
||||
- name: cvat-ui
|
||||
port: 80
|
||||
protocol: TCP
|
||||
targetPort: 80
|
||||
- name: cvat
|
||||
port: 8080
|
||||
protocol: TCP
|
||||
targetPort: 8080
|
||||
routes:
|
||||
- match:
|
||||
- uri:
|
||||
regex: /api/.*|/git/.*|/tensorflow/.*|/auto_annotation/.*|/analytics/.*|/static/.*|/admin/.*|/documentation/.*|/dextr/.*|/reid/.*
|
||||
- queryParams:
|
||||
id:
|
||||
regex: \d+.*
|
||||
route:
|
||||
- destination:
|
||||
port:
|
||||
number: 8080
|
||||
- match:
|
||||
- uri:
|
||||
prefix: /
|
||||
route:
|
||||
- destination:
|
||||
port:
|
||||
number: 80
|
||||
# DAG Workflow to be executed once a Workspace action completes
|
||||
# postExecutionWorkflow:
|
||||
# entrypoint: main
|
||||
# templates:
|
||||
# - name: main
|
||||
# dag:
|
||||
# tasks:
|
||||
# - name: slack-notify
|
||||
# template: slack-notify
|
||||
# - name: slack-notify
|
||||
# container:
|
||||
# image: technosophos/slack-notify
|
||||
# args:
|
||||
# - SLACK_USERNAME=onepanel SLACK_TITLE="Your workspace is ready" SLACK_ICON=https://www.gravatar.com/avatar/5c4478592fe00878f62f0027be59c1bd SLACK_MESSAGE="Your workspace is now running" ./slack-notify
|
||||
# command:
|
||||
# - sh
|
||||
# - -c
|
116
db/yaml/workspaces/cvat/20200626113635.yaml
Normal file
116
db/yaml/workspaces/cvat/20200626113635.yaml
Normal file
@@ -0,0 +1,116 @@
|
||||
metadata:
|
||||
name: CVAT
|
||||
kind: Workspace
|
||||
version: 20200626113635
|
||||
action: update
|
||||
description: "Powerful and efficient Computer Vision Annotation Tool (CVAT)"
|
||||
spec:
|
||||
# Docker containers that are part of the Workspace
|
||||
containers:
|
||||
- name: cvat-db
|
||||
image: postgres:10-alpine
|
||||
env:
|
||||
- name: POSTGRES_USER
|
||||
value: root
|
||||
- name: POSTGRES_DB
|
||||
value: cvat
|
||||
- name: POSTGRES_HOST_AUTH_METHOD
|
||||
value: trust
|
||||
- name: PGDATA
|
||||
value: /var/lib/psql/data
|
||||
ports:
|
||||
- containerPort: 5432
|
||||
name: tcp
|
||||
volumeMounts:
|
||||
- name: db
|
||||
mountPath: /var/lib/psql
|
||||
- name: cvat-redis
|
||||
image: redis:4.0-alpine
|
||||
ports:
|
||||
- containerPort: 6379
|
||||
name: tcp
|
||||
- name: cvat
|
||||
image: onepanel/cvat:v0.7.6
|
||||
env:
|
||||
- name: DJANGO_MODWSGI_EXTRA_ARGS
|
||||
value: ""
|
||||
- name: ALLOWED_HOSTS
|
||||
value: '*'
|
||||
- name: CVAT_REDIS_HOST
|
||||
value: localhost
|
||||
- name: CVAT_POSTGRES_HOST
|
||||
value: localhost
|
||||
- name: CVAT_SHARE_URL
|
||||
value: /home/django/data
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
name: http
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /home/django/data
|
||||
- name: keys
|
||||
mountPath: /home/django/keys
|
||||
- name: logs
|
||||
mountPath: /home/django/logs
|
||||
- name: models
|
||||
mountPath: /home/django/models
|
||||
- name: share
|
||||
mountPath: /home/django/share
|
||||
- name: cvat-ui
|
||||
image: onepanel/cvat-ui:v0.7.5
|
||||
ports:
|
||||
- containerPort: 80
|
||||
name: http
|
||||
- name: filesyncer
|
||||
image: onepanel/filesyncer:v0.0.4
|
||||
command: ['python3', 'main.py']
|
||||
volumeMounts:
|
||||
- name: share
|
||||
mountPath: /mnt/share
|
||||
ports:
|
||||
- name: cvat-ui
|
||||
port: 80
|
||||
protocol: TCP
|
||||
targetPort: 80
|
||||
- name: cvat
|
||||
port: 8080
|
||||
protocol: TCP
|
||||
targetPort: 8080
|
||||
routes:
|
||||
- match:
|
||||
- uri:
|
||||
regex: /api/.*|/git/.*|/tensorflow/.*|/auto_annotation/.*|/analytics/.*|/static/.*|/admin/.*|/documentation/.*|/dextr/.*|/reid/.*
|
||||
- queryParams:
|
||||
id:
|
||||
regex: \d+.*
|
||||
route:
|
||||
- destination:
|
||||
port:
|
||||
number: 8080
|
||||
timeout: 600s
|
||||
- match:
|
||||
- uri:
|
||||
prefix: /
|
||||
route:
|
||||
- destination:
|
||||
port:
|
||||
number: 80
|
||||
timeout: 600s
|
||||
# DAG Workflow to be executed once a Workspace action completes (optional)
|
||||
# Uncomment the lines below if you want to send Slack notifications
|
||||
#postExecutionWorkflow:
|
||||
# entrypoint: main
|
||||
# templates:
|
||||
# - name: main
|
||||
# dag:
|
||||
# tasks:
|
||||
# - name: slack-notify
|
||||
# template: slack-notify
|
||||
# - name: slack-notify
|
||||
# container:
|
||||
# image: technosophos/slack-notify
|
||||
# args:
|
||||
# - SLACK_USERNAME=onepanel SLACK_TITLE="Your workspace is ready" SLACK_ICON=https://www.gravatar.com/avatar/5c4478592fe00878f62f0027be59c1bd SLACK_MESSAGE="Your workspace is now running" ./slack-notify
|
||||
# command:
|
||||
# - sh
|
||||
# - -c
|
118
db/yaml/workspaces/cvat/20200704151301.yaml
Normal file
118
db/yaml/workspaces/cvat/20200704151301.yaml
Normal file
@@ -0,0 +1,118 @@
|
||||
metadata:
|
||||
name: CVAT
|
||||
kind: Workspace
|
||||
version: 20200704151301
|
||||
action: update
|
||||
description: "Powerful and efficient Computer Vision Annotation Tool (CVAT)"
|
||||
spec:
|
||||
# Docker containers that are part of the Workspace
|
||||
containers:
|
||||
- name: cvat-db
|
||||
image: postgres:10-alpine
|
||||
env:
|
||||
- name: POSTGRES_USER
|
||||
value: root
|
||||
- name: POSTGRES_DB
|
||||
value: cvat
|
||||
- name: POSTGRES_HOST_AUTH_METHOD
|
||||
value: trust
|
||||
- name: PGDATA
|
||||
value: /var/lib/psql/data
|
||||
ports:
|
||||
- containerPort: 5432
|
||||
name: tcp
|
||||
volumeMounts:
|
||||
- name: db
|
||||
mountPath: /var/lib/psql
|
||||
- name: cvat-redis
|
||||
image: redis:4.0-alpine
|
||||
ports:
|
||||
- containerPort: 6379
|
||||
name: tcp
|
||||
- name: cvat
|
||||
image: onepanel/cvat:v0.7.10-stable
|
||||
env:
|
||||
- name: DJANGO_MODWSGI_EXTRA_ARGS
|
||||
value: ""
|
||||
- name: ALLOWED_HOSTS
|
||||
value: '*'
|
||||
- name: CVAT_REDIS_HOST
|
||||
value: localhost
|
||||
- name: CVAT_POSTGRES_HOST
|
||||
value: localhost
|
||||
- name: CVAT_SHARE_URL
|
||||
value: /home/django/data
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
name: http
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /home/django/data
|
||||
- name: keys
|
||||
mountPath: /home/django/keys
|
||||
- name: logs
|
||||
mountPath: /home/django/logs
|
||||
- name: models
|
||||
mountPath: /home/django/models
|
||||
- name: share
|
||||
mountPath: /home/django/share
|
||||
- name: cvat-ui
|
||||
image: onepanel/cvat-ui:v0.7.10-stable
|
||||
ports:
|
||||
- containerPort: 80
|
||||
name: http
|
||||
# Uncomment following lines to enable S3 FileSyncer
|
||||
# Refer to https://docs.onepanel.ai/docs/getting-started/use-cases/computervision/annotation/cvat/cvat_quick_guide#setting-up-environment-variables
|
||||
#- name: filesyncer
|
||||
# image: onepanel/filesyncer:v0.0.4
|
||||
# command: ['python3', 'main.py']
|
||||
# volumeMounts:
|
||||
# - name: share
|
||||
# mountPath: /mnt/share
|
||||
ports:
|
||||
- name: cvat-ui
|
||||
port: 80
|
||||
protocol: TCP
|
||||
targetPort: 80
|
||||
- name: cvat
|
||||
port: 8080
|
||||
protocol: TCP
|
||||
targetPort: 8080
|
||||
routes:
|
||||
- match:
|
||||
- uri:
|
||||
regex: /api/.*|/git/.*|/tensorflow/.*|/auto_annotation/.*|/analytics/.*|/static/.*|/admin/.*|/documentation/.*|/dextr/.*|/reid/.*
|
||||
- queryParams:
|
||||
id:
|
||||
regex: \d+.*
|
||||
route:
|
||||
- destination:
|
||||
port:
|
||||
number: 8080
|
||||
timeout: 600s
|
||||
- match:
|
||||
- uri:
|
||||
prefix: /
|
||||
route:
|
||||
- destination:
|
||||
port:
|
||||
number: 80
|
||||
timeout: 600s
|
||||
# DAG Workflow to be executed once a Workspace action completes (optional)
|
||||
# Uncomment the lines below if you want to send Slack notifications
|
||||
#postExecutionWorkflow:
|
||||
# entrypoint: main
|
||||
# templates:
|
||||
# - name: main
|
||||
# dag:
|
||||
# tasks:
|
||||
# - name: slack-notify
|
||||
# template: slack-notify
|
||||
# - name: slack-notify
|
||||
# container:
|
||||
# image: technosophos/slack-notify
|
||||
# args:
|
||||
# - SLACK_USERNAME=onepanel SLACK_TITLE="Your workspace is ready" SLACK_ICON=https://www.gravatar.com/avatar/5c4478592fe00878f62f0027be59c1bd SLACK_MESSAGE="Your workspace is now running" ./slack-notify
|
||||
# command:
|
||||
# - sh
|
||||
# - -c
|
135
db/yaml/workspaces/cvat/20200724220450.yaml
Normal file
135
db/yaml/workspaces/cvat/20200724220450.yaml
Normal file
@@ -0,0 +1,135 @@
|
||||
metadata:
|
||||
name: CVAT
|
||||
kind: Workspace
|
||||
version: 20200724220450
|
||||
action: update
|
||||
description: "Powerful and efficient Computer Vision Annotation Tool (CVAT)"
|
||||
spec:
|
||||
# Workspace arguments
|
||||
arguments:
|
||||
parameters:
|
||||
- name: storage-prefix
|
||||
displayName: Directory in default object storage
|
||||
value: data
|
||||
hint: Location of data and models in default object storage, will continuously sync to '/mnt/share'
|
||||
containers:
|
||||
- name: cvat-db
|
||||
image: postgres:10-alpine
|
||||
env:
|
||||
- name: POSTGRES_USER
|
||||
value: root
|
||||
- name: POSTGRES_DB
|
||||
value: cvat
|
||||
- name: POSTGRES_HOST_AUTH_METHOD
|
||||
value: trust
|
||||
- name: PGDATA
|
||||
value: /var/lib/psql/data
|
||||
ports:
|
||||
- containerPort: 5432
|
||||
name: tcp
|
||||
volumeMounts:
|
||||
- name: db
|
||||
mountPath: /var/lib/psql
|
||||
- name: cvat-redis
|
||||
image: redis:4.0-alpine
|
||||
ports:
|
||||
- containerPort: 6379
|
||||
name: tcp
|
||||
- name: cvat
|
||||
image: onepanel/cvat:v0.7.10-stable
|
||||
env:
|
||||
- name: DJANGO_MODWSGI_EXTRA_ARGS
|
||||
value: ""
|
||||
- name: ALLOWED_HOSTS
|
||||
value: '*'
|
||||
- name: CVAT_REDIS_HOST
|
||||
value: localhost
|
||||
- name: CVAT_POSTGRES_HOST
|
||||
value: localhost
|
||||
- name: CVAT_SHARE_URL
|
||||
value: /home/django/data
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
name: http
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /home/django/data
|
||||
- name: keys
|
||||
mountPath: /home/django/keys
|
||||
- name: logs
|
||||
mountPath: /home/django/logs
|
||||
- name: models
|
||||
mountPath: /home/django/models
|
||||
- name: share
|
||||
mountPath: /home/django/share
|
||||
- name: sys-namespace-config
|
||||
mountPath: /etc/onepanel
|
||||
readOnly: true
|
||||
- name: cvat-ui
|
||||
image: onepanel/cvat-ui:v0.7.10-stable
|
||||
ports:
|
||||
- containerPort: 80
|
||||
name: http
|
||||
# You can add multiple FileSyncer sidecar containers if needed
|
||||
- name: filesyncer
|
||||
image: "onepanel/filesyncer:{{.ArtifactRepositoryType}}"
|
||||
args:
|
||||
- download
|
||||
env:
|
||||
- name: FS_PATH
|
||||
value: /mnt/share
|
||||
- name: FS_PREFIX
|
||||
value: '{{workspace.parameters.storage-prefix}}'
|
||||
volumeMounts:
|
||||
- name: share
|
||||
mountPath: /mnt/share
|
||||
- name: sys-namespace-config
|
||||
mountPath: /etc/onepanel
|
||||
readOnly: true
|
||||
ports:
|
||||
- name: cvat-ui
|
||||
port: 80
|
||||
protocol: TCP
|
||||
targetPort: 80
|
||||
- name: cvat
|
||||
port: 8080
|
||||
protocol: TCP
|
||||
targetPort: 8080
|
||||
routes:
|
||||
- match:
|
||||
- uri:
|
||||
regex: /api/.*|/git/.*|/tensorflow/.*|/auto_annotation/.*|/analytics/.*|/static/.*|/admin/.*|/documentation/.*|/dextr/.*|/reid/.*
|
||||
- queryParams:
|
||||
id:
|
||||
regex: \d+.*
|
||||
route:
|
||||
- destination:
|
||||
port:
|
||||
number: 8080
|
||||
timeout: 600s
|
||||
- match:
|
||||
- uri:
|
||||
prefix: /
|
||||
route:
|
||||
- destination:
|
||||
port:
|
||||
number: 80
|
||||
timeout: 600s
|
||||
# DAG Workflow to be executed once a Workspace action completes (optional)
|
||||
# Uncomment the lines below if you want to send Slack notifications
|
||||
#postExecutionWorkflow:
|
||||
# entrypoint: main
|
||||
# templates:
|
||||
# - name: main
|
||||
# dag:
|
||||
# tasks:
|
||||
# - name: slack-notify
|
||||
# template: slack-notify
|
||||
# - name: slack-notify
|
||||
# container:
|
||||
# image: technosophos/slack-notify
|
||||
# args:
|
||||
# - SLACK_USERNAME=onepanel SLACK_TITLE="Your workspace is ready" SLACK_ICON=https://www.gravatar.com/avatar/5c4478592fe00878f62f0027be59c1bd SLACK_MESSAGE="Your workspace is now running" ./slack-notify
|
||||
# command:
|
||||
# - sh
|
||||
# - -c
|
144
db/yaml/workspaces/cvat/20200812113316.yaml
Normal file
144
db/yaml/workspaces/cvat/20200812113316.yaml
Normal file
@@ -0,0 +1,144 @@
|
||||
metadata:
|
||||
name: CVAT
|
||||
kind: Workspace
|
||||
version: 20200812113316
|
||||
action: update
|
||||
description: "Powerful and efficient Computer Vision Annotation Tool (CVAT)"
|
||||
spec:
|
||||
# Workspace arguments
|
||||
arguments:
|
||||
parameters:
|
||||
- name: sync-directory
|
||||
displayName: Directory to sync raw input and training output
|
||||
value: workflow-data
|
||||
hint: Location to sync raw input, models and checkpoints from default object storage. Note that this will be relative to the current namespace.
|
||||
containers:
|
||||
- name: cvat-db
|
||||
image: postgres:10-alpine
|
||||
env:
|
||||
- name: POSTGRES_USER
|
||||
value: root
|
||||
- name: POSTGRES_DB
|
||||
value: cvat
|
||||
- name: POSTGRES_HOST_AUTH_METHOD
|
||||
value: trust
|
||||
- name: PGDATA
|
||||
value: /var/lib/psql/data
|
||||
ports:
|
||||
- containerPort: 5432
|
||||
name: tcp
|
||||
volumeMounts:
|
||||
- name: db
|
||||
mountPath: /var/lib/psql
|
||||
- name: cvat-redis
|
||||
image: redis:4.0-alpine
|
||||
ports:
|
||||
- containerPort: 6379
|
||||
name: tcp
|
||||
- name: cvat
|
||||
image: onepanel/cvat:0.12.0_cvat.1.0.0-beta.2-cuda
|
||||
env:
|
||||
- name: DJANGO_MODWSGI_EXTRA_ARGS
|
||||
value: ""
|
||||
- name: ALLOWED_HOSTS
|
||||
value: '*'
|
||||
- name: CVAT_REDIS_HOST
|
||||
value: localhost
|
||||
- name: CVAT_POSTGRES_HOST
|
||||
value: localhost
|
||||
- name: CVAT_SHARE_URL
|
||||
value: /home/django/data
|
||||
- name: ONEPANEL_SYNC_DIRECTORY
|
||||
value: '{{workspace.parameters.sync-directory}}'
|
||||
- name: NVIDIA_VISIBLE_DEVICES
|
||||
value: all
|
||||
- name: NVIDIA_DRIVER_CAPABILITIES
|
||||
value: compute,utility
|
||||
- name: NVIDIA_REQUIRE_CUDA
|
||||
value: "cuda>=10.0 brand=tesla,driver>=384,driver<385 brand=tesla,driver>=410,driver<411"
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
name: http
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /home/django/data
|
||||
- name: keys
|
||||
mountPath: /home/django/keys
|
||||
- name: logs
|
||||
mountPath: /home/django/logs
|
||||
- name: models
|
||||
mountPath: /home/django/models
|
||||
- name: share
|
||||
mountPath: /home/django/share
|
||||
- name: sys-namespace-config
|
||||
mountPath: /etc/onepanel
|
||||
readOnly: true
|
||||
- name: cvat-ui
|
||||
image: onepanel/cvat-ui:0.12.0_cvat.1.0.0-beta.2
|
||||
ports:
|
||||
- containerPort: 80
|
||||
name: http
|
||||
# You can add multiple FileSyncer sidecar containers if needed
|
||||
- name: filesyncer
|
||||
image: "onepanel/filesyncer:{{.ArtifactRepositoryType}}"
|
||||
imagePullPolicy: Always
|
||||
args:
|
||||
- download
|
||||
env:
|
||||
- name: FS_PATH
|
||||
value: /mnt/share
|
||||
- name: FS_PREFIX
|
||||
value: '{{workflow.namespace}}/{{workspace.parameters.sync-directory}}'
|
||||
volumeMounts:
|
||||
- name: share
|
||||
mountPath: /mnt/share
|
||||
- name: sys-namespace-config
|
||||
mountPath: /etc/onepanel
|
||||
readOnly: true
|
||||
ports:
|
||||
- name: cvat-ui
|
||||
port: 80
|
||||
protocol: TCP
|
||||
targetPort: 80
|
||||
- name: cvat
|
||||
port: 8080
|
||||
protocol: TCP
|
||||
targetPort: 8080
|
||||
routes:
|
||||
- match:
|
||||
- uri:
|
||||
regex: /api/.*|/git/.*|/tensorflow/.*|/onepanelio/.*|/tracking/.*|/auto_annotation/.*|/analytics/.*|/static/.*|/admin/.*|/documentation/.*|/dextr/.*|/reid/.*
|
||||
- queryParams:
|
||||
id:
|
||||
regex: \d+.*
|
||||
route:
|
||||
- destination:
|
||||
port:
|
||||
number: 8080
|
||||
timeout: 600s
|
||||
- match:
|
||||
- uri:
|
||||
prefix: /
|
||||
route:
|
||||
- destination:
|
||||
port:
|
||||
number: 80
|
||||
timeout: 600s
|
||||
# DAG Workflow to be executed once a Workspace action completes (optional)
|
||||
# Uncomment the lines below if you want to send Slack notifications
|
||||
#postExecutionWorkflow:
|
||||
# entrypoint: main
|
||||
# templates:
|
||||
# - name: main
|
||||
# dag:
|
||||
# tasks:
|
||||
# - name: slack-notify
|
||||
# template: slack-notify
|
||||
# - name: slack-notify
|
||||
# container:
|
||||
# image: technosophos/slack-notify
|
||||
# args:
|
||||
# - SLACK_USERNAME=onepanel SLACK_TITLE="Your workspace is ready" SLACK_ICON=https://www.gravatar.com/avatar/5c4478592fe00878f62f0027be59c1bd SLACK_MESSAGE="Your workspace is now running" ./slack-notify
|
||||
# command:
|
||||
# - sh
|
||||
# - -c
|
144
db/yaml/workspaces/cvat/20200824101905.yaml
Normal file
144
db/yaml/workspaces/cvat/20200824101905.yaml
Normal file
@@ -0,0 +1,144 @@
|
||||
metadata:
|
||||
name: CVAT
|
||||
kind: Workspace
|
||||
version: 20200824101905
|
||||
action: update
|
||||
description: "Powerful and efficient Computer Vision Annotation Tool (CVAT)"
|
||||
spec:
|
||||
# Workspace arguments
|
||||
arguments:
|
||||
parameters:
|
||||
- name: sync-directory
|
||||
displayName: Directory to sync raw input and training output
|
||||
value: workflow-data
|
||||
hint: Location to sync raw input, models and checkpoints from default object storage. Note that this will be relative to the current namespace.
|
||||
containers:
|
||||
- name: cvat-db
|
||||
image: postgres:10-alpine
|
||||
env:
|
||||
- name: POSTGRES_USER
|
||||
value: root
|
||||
- name: POSTGRES_DB
|
||||
value: cvat
|
||||
- name: POSTGRES_HOST_AUTH_METHOD
|
||||
value: trust
|
||||
- name: PGDATA
|
||||
value: /var/lib/psql/data
|
||||
ports:
|
||||
- containerPort: 5432
|
||||
name: tcp
|
||||
volumeMounts:
|
||||
- name: db
|
||||
mountPath: /var/lib/psql
|
||||
- name: cvat-redis
|
||||
image: redis:4.0-alpine
|
||||
ports:
|
||||
- containerPort: 6379
|
||||
name: tcp
|
||||
- name: cvat
|
||||
image: onepanel/cvat:0.12.0-rc.6_cvat.1.0.0
|
||||
env:
|
||||
- name: DJANGO_MODWSGI_EXTRA_ARGS
|
||||
value: ""
|
||||
- name: ALLOWED_HOSTS
|
||||
value: '*'
|
||||
- name: CVAT_REDIS_HOST
|
||||
value: localhost
|
||||
- name: CVAT_POSTGRES_HOST
|
||||
value: localhost
|
||||
- name: CVAT_SHARE_URL
|
||||
value: /home/django/data
|
||||
- name: ONEPANEL_SYNC_DIRECTORY
|
||||
value: '{{workspace.parameters.sync-directory}}'
|
||||
- name: NVIDIA_VISIBLE_DEVICES
|
||||
value: all
|
||||
- name: NVIDIA_DRIVER_CAPABILITIES
|
||||
value: compute,utility
|
||||
- name: NVIDIA_REQUIRE_CUDA
|
||||
value: "cuda>=10.0 brand=tesla,driver>=384,driver<385 brand=tesla,driver>=410,driver<411"
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
name: http
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /home/django/data
|
||||
- name: keys
|
||||
mountPath: /home/django/keys
|
||||
- name: logs
|
||||
mountPath: /home/django/logs
|
||||
- name: models
|
||||
mountPath: /home/django/models
|
||||
- name: share
|
||||
mountPath: /home/django/share
|
||||
- name: sys-namespace-config
|
||||
mountPath: /etc/onepanel
|
||||
readOnly: true
|
||||
- name: cvat-ui
|
||||
image: onepanel/cvat-ui:0.12.0-rc.1_cvat.1.0.0
|
||||
ports:
|
||||
- containerPort: 80
|
||||
name: http
|
||||
# You can add multiple FileSyncer sidecar containers if needed
|
||||
- name: filesyncer
|
||||
image: "onepanel/filesyncer:{{.ArtifactRepositoryType}}"
|
||||
imagePullPolicy: Always
|
||||
args:
|
||||
- download
|
||||
env:
|
||||
- name: FS_PATH
|
||||
value: /mnt/share
|
||||
- name: FS_PREFIX
|
||||
value: '{{workflow.namespace}}/{{workspace.parameters.sync-directory}}'
|
||||
volumeMounts:
|
||||
- name: share
|
||||
mountPath: /mnt/share
|
||||
- name: sys-namespace-config
|
||||
mountPath: /etc/onepanel
|
||||
readOnly: true
|
||||
ports:
|
||||
- name: cvat-ui
|
||||
port: 80
|
||||
protocol: TCP
|
||||
targetPort: 80
|
||||
- name: cvat
|
||||
port: 8080
|
||||
protocol: TCP
|
||||
targetPort: 8080
|
||||
routes:
|
||||
- match:
|
||||
- uri:
|
||||
regex: /api/.*|/git/.*|/tensorflow/.*|/onepanelio/.*|/tracking/.*|/auto_annotation/.*|/analytics/.*|/static/.*|/admin/.*|/documentation/.*|/dextr/.*|/reid/.*
|
||||
- queryParams:
|
||||
id:
|
||||
regex: \d+.*
|
||||
route:
|
||||
- destination:
|
||||
port:
|
||||
number: 8080
|
||||
timeout: 600s
|
||||
- match:
|
||||
- uri:
|
||||
prefix: /
|
||||
route:
|
||||
- destination:
|
||||
port:
|
||||
number: 80
|
||||
timeout: 600s
|
||||
# DAG Workflow to be executed once a Workspace action completes (optional)
|
||||
# Uncomment the lines below if you want to send Slack notifications
|
||||
#postExecutionWorkflow:
|
||||
# entrypoint: main
|
||||
# templates:
|
||||
# - name: main
|
||||
# dag:
|
||||
# tasks:
|
||||
# - name: slack-notify
|
||||
# template: slack-notify
|
||||
# - name: slack-notify
|
||||
# container:
|
||||
# image: technosophos/slack-notify
|
||||
# args:
|
||||
# - SLACK_USERNAME=onepanel SLACK_TITLE="Your workspace is ready" SLACK_ICON=https://www.gravatar.com/avatar/5c4478592fe00878f62f0027be59c1bd SLACK_MESSAGE="Your workspace is now running" ./slack-notify
|
||||
# command:
|
||||
# - sh
|
||||
# - -c
|
144
db/yaml/workspaces/cvat/20200825154403.yaml
Normal file
144
db/yaml/workspaces/cvat/20200825154403.yaml
Normal file
@@ -0,0 +1,144 @@
|
||||
metadata:
|
||||
name: CVAT
|
||||
kind: Workspace
|
||||
version: 20200825154403
|
||||
action: update
|
||||
description: "Powerful and efficient Computer Vision Annotation Tool (CVAT)"
|
||||
spec:
|
||||
# Workspace arguments
|
||||
arguments:
|
||||
parameters:
|
||||
- name: sync-directory
|
||||
displayName: Directory to sync raw input and training output
|
||||
value: workflow-data
|
||||
hint: Location to sync raw input, models and checkpoints from default object storage. Note that this will be relative to the current namespace.
|
||||
containers:
|
||||
- name: cvat-db
|
||||
image: postgres:10-alpine
|
||||
env:
|
||||
- name: POSTGRES_USER
|
||||
value: root
|
||||
- name: POSTGRES_DB
|
||||
value: cvat
|
||||
- name: POSTGRES_HOST_AUTH_METHOD
|
||||
value: trust
|
||||
- name: PGDATA
|
||||
value: /var/lib/psql/data
|
||||
ports:
|
||||
- containerPort: 5432
|
||||
name: tcp
|
||||
volumeMounts:
|
||||
- name: db
|
||||
mountPath: /var/lib/psql
|
||||
- name: cvat-redis
|
||||
image: redis:4.0-alpine
|
||||
ports:
|
||||
- containerPort: 6379
|
||||
name: tcp
|
||||
- name: cvat
|
||||
image: onepanel/cvat:0.12.0_cvat.1.0.0
|
||||
env:
|
||||
- name: DJANGO_MODWSGI_EXTRA_ARGS
|
||||
value: ""
|
||||
- name: ALLOWED_HOSTS
|
||||
value: '*'
|
||||
- name: CVAT_REDIS_HOST
|
||||
value: localhost
|
||||
- name: CVAT_POSTGRES_HOST
|
||||
value: localhost
|
||||
- name: CVAT_SHARE_URL
|
||||
value: /home/django/data
|
||||
- name: ONEPANEL_SYNC_DIRECTORY
|
||||
value: '{{workspace.parameters.sync-directory}}'
|
||||
- name: NVIDIA_VISIBLE_DEVICES
|
||||
value: all
|
||||
- name: NVIDIA_DRIVER_CAPABILITIES
|
||||
value: compute,utility
|
||||
- name: NVIDIA_REQUIRE_CUDA
|
||||
value: "cuda>=10.0 brand=tesla,driver>=384,driver<385 brand=tesla,driver>=410,driver<411"
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
name: http
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /home/django/data
|
||||
- name: keys
|
||||
mountPath: /home/django/keys
|
||||
- name: logs
|
||||
mountPath: /home/django/logs
|
||||
- name: models
|
||||
mountPath: /home/django/models
|
||||
- name: share
|
||||
mountPath: /home/django/share
|
||||
- name: sys-namespace-config
|
||||
mountPath: /etc/onepanel
|
||||
readOnly: true
|
||||
- name: cvat-ui
|
||||
image: onepanel/cvat-ui:0.12.0_cvat.1.0.0
|
||||
ports:
|
||||
- containerPort: 80
|
||||
name: http
|
||||
# You can add multiple FileSyncer sidecar containers if needed
|
||||
- name: filesyncer
|
||||
image: "onepanel/filesyncer:{{.ArtifactRepositoryType}}"
|
||||
imagePullPolicy: Always
|
||||
args:
|
||||
- download
|
||||
env:
|
||||
- name: FS_PATH
|
||||
value: /mnt/share
|
||||
- name: FS_PREFIX
|
||||
value: '{{workflow.namespace}}/{{workspace.parameters.sync-directory}}'
|
||||
volumeMounts:
|
||||
- name: share
|
||||
mountPath: /mnt/share
|
||||
- name: sys-namespace-config
|
||||
mountPath: /etc/onepanel
|
||||
readOnly: true
|
||||
ports:
|
||||
- name: cvat-ui
|
||||
port: 80
|
||||
protocol: TCP
|
||||
targetPort: 80
|
||||
- name: cvat
|
||||
port: 8080
|
||||
protocol: TCP
|
||||
targetPort: 8080
|
||||
routes:
|
||||
- match:
|
||||
- uri:
|
||||
regex: /api/.*|/git/.*|/tensorflow/.*|/onepanelio/.*|/tracking/.*|/auto_annotation/.*|/analytics/.*|/static/.*|/admin/.*|/documentation/.*|/dextr/.*|/reid/.*
|
||||
- queryParams:
|
||||
id:
|
||||
regex: \d+.*
|
||||
route:
|
||||
- destination:
|
||||
port:
|
||||
number: 8080
|
||||
timeout: 600s
|
||||
- match:
|
||||
- uri:
|
||||
prefix: /
|
||||
route:
|
||||
- destination:
|
||||
port:
|
||||
number: 80
|
||||
timeout: 600s
|
||||
# DAG Workflow to be executed once a Workspace action completes (optional)
|
||||
# Uncomment the lines below if you want to send Slack notifications
|
||||
#postExecutionWorkflow:
|
||||
# entrypoint: main
|
||||
# templates:
|
||||
# - name: main
|
||||
# dag:
|
||||
# tasks:
|
||||
# - name: slack-notify
|
||||
# template: slack-notify
|
||||
# - name: slack-notify
|
||||
# container:
|
||||
# image: technosophos/slack-notify
|
||||
# args:
|
||||
# - SLACK_USERNAME=onepanel SLACK_TITLE="Your workspace is ready" SLACK_ICON=https://www.gravatar.com/avatar/5c4478592fe00878f62f0027be59c1bd SLACK_MESSAGE="Your workspace is now running" ./slack-notify
|
||||
# command:
|
||||
# - sh
|
||||
# - -c
|
156
db/yaml/workspaces/cvat/20200826185926.yaml
Normal file
156
db/yaml/workspaces/cvat/20200826185926.yaml
Normal file
@@ -0,0 +1,156 @@
|
||||
metadata:
|
||||
name: CVAT
|
||||
kind: Workspace
|
||||
version: 20200826185926
|
||||
action: update
|
||||
description: "Powerful and efficient Computer Vision Annotation Tool (CVAT)"
|
||||
spec:
|
||||
# Workspace arguments
|
||||
arguments:
|
||||
parameters:
|
||||
- name: sync-directory
|
||||
displayName: Directory to sync raw input and training output
|
||||
value: workflow-data
|
||||
hint: Location to sync raw input, models and checkpoints from default object storage. Note that this will be relative to the current namespace.
|
||||
containers:
|
||||
- name: cvat-db
|
||||
image: postgres:10-alpine
|
||||
env:
|
||||
- name: POSTGRES_USER
|
||||
value: root
|
||||
- name: POSTGRES_DB
|
||||
value: cvat
|
||||
- name: POSTGRES_HOST_AUTH_METHOD
|
||||
value: trust
|
||||
- name: PGDATA
|
||||
value: /var/lib/psql/data
|
||||
ports:
|
||||
- containerPort: 5432
|
||||
name: tcp
|
||||
volumeMounts:
|
||||
- name: db
|
||||
mountPath: /var/lib/psql
|
||||
- name: cvat-redis
|
||||
image: redis:4.0-alpine
|
||||
ports:
|
||||
- containerPort: 6379
|
||||
name: tcp
|
||||
- name: cvat
|
||||
image: onepanel/cvat:0.12.0_cvat.1.0.0
|
||||
env:
|
||||
- name: DJANGO_MODWSGI_EXTRA_ARGS
|
||||
value: ""
|
||||
- name: ALLOWED_HOSTS
|
||||
value: '*'
|
||||
- name: CVAT_REDIS_HOST
|
||||
value: localhost
|
||||
- name: CVAT_POSTGRES_HOST
|
||||
value: localhost
|
||||
- name: CVAT_SHARE_URL
|
||||
value: /home/django/data
|
||||
- name: ONEPANEL_SYNC_DIRECTORY
|
||||
value: '{{workspace.parameters.sync-directory}}'
|
||||
- name: NVIDIA_VISIBLE_DEVICES
|
||||
value: all
|
||||
- name: NVIDIA_DRIVER_CAPABILITIES
|
||||
value: compute,utility
|
||||
- name: NVIDIA_REQUIRE_CUDA
|
||||
value: "cuda>=10.0 brand=tesla,driver>=384,driver<385 brand=tesla,driver>=410,driver<411"
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
name: http
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /home/django/data
|
||||
- name: keys
|
||||
mountPath: /home/django/keys
|
||||
- name: logs
|
||||
mountPath: /home/django/logs
|
||||
- name: models
|
||||
mountPath: /home/django/models
|
||||
- name: share
|
||||
mountPath: /home/django/share
|
||||
- name: sys-namespace-config
|
||||
mountPath: /etc/onepanel
|
||||
readOnly: true
|
||||
- name: cvat-ui
|
||||
image: onepanel/cvat-ui:0.12.0_cvat.1.0.0
|
||||
ports:
|
||||
- containerPort: 80
|
||||
name: http
|
||||
# You can add multiple FileSyncer sidecar containers if needed
|
||||
- name: filesyncer
|
||||
image: "onepanel/filesyncer:{{.ArtifactRepositoryType}}"
|
||||
imagePullPolicy: Always
|
||||
args:
|
||||
- download
|
||||
- -server-prefix=/sys/filesyncer
|
||||
env:
|
||||
- name: FS_PATH
|
||||
value: /mnt/share
|
||||
- name: FS_PREFIX
|
||||
value: '{{workflow.namespace}}/{{workspace.parameters.sync-directory}}'
|
||||
volumeMounts:
|
||||
- name: share
|
||||
mountPath: /mnt/share
|
||||
- name: sys-namespace-config
|
||||
mountPath: /etc/onepanel
|
||||
readOnly: true
|
||||
ports:
|
||||
- name: cvat-ui
|
||||
port: 80
|
||||
protocol: TCP
|
||||
targetPort: 80
|
||||
- name: cvat
|
||||
port: 8080
|
||||
protocol: TCP
|
||||
targetPort: 8080
|
||||
- name: fs
|
||||
port: 8888
|
||||
protocol: TCP
|
||||
targetPort: 8888
|
||||
routes:
|
||||
- match:
|
||||
- uri:
|
||||
prefix: /sys/filesyncer
|
||||
route:
|
||||
- destination:
|
||||
port:
|
||||
number: 8888
|
||||
- match:
|
||||
- uri:
|
||||
regex: /api/.*|/git/.*|/tensorflow/.*|/onepanelio/.*|/tracking/.*|/auto_annotation/.*|/analytics/.*|/static/.*|/admin/.*|/documentation/.*|/dextr/.*|/reid/.*
|
||||
- queryParams:
|
||||
id:
|
||||
regex: \d+.*
|
||||
route:
|
||||
- destination:
|
||||
port:
|
||||
number: 8080
|
||||
timeout: 600s
|
||||
- match:
|
||||
- uri:
|
||||
prefix: /
|
||||
route:
|
||||
- destination:
|
||||
port:
|
||||
number: 80
|
||||
timeout: 600s
|
||||
# DAG Workflow to be executed once a Workspace action completes (optional)
|
||||
# Uncomment the lines below if you want to send Slack notifications
|
||||
#postExecutionWorkflow:
|
||||
# entrypoint: main
|
||||
# templates:
|
||||
# - name: main
|
||||
# dag:
|
||||
# tasks:
|
||||
# - name: slack-notify
|
||||
# template: slack-notify
|
||||
# - name: slack-notify
|
||||
# container:
|
||||
# image: technosophos/slack-notify
|
||||
# args:
|
||||
# - SLACK_USERNAME=onepanel SLACK_TITLE="Your workspace is ready" SLACK_ICON=https://www.gravatar.com/avatar/5c4478592fe00878f62f0027be59c1bd SLACK_MESSAGE="Your workspace is now running" ./slack-notify
|
||||
# command:
|
||||
# - sh
|
||||
# - -c
|
154
db/yaml/workspaces/cvat/20201001070806.yaml
Normal file
154
db/yaml/workspaces/cvat/20201001070806.yaml
Normal file
@@ -0,0 +1,154 @@
|
||||
metadata:
|
||||
name: CVAT
|
||||
kind: Workspace
|
||||
version: 20201001070806
|
||||
action: update
|
||||
description: "Powerful and efficient Computer Vision Annotation Tool (CVAT)"
|
||||
spec:
|
||||
# Workspace arguments
|
||||
arguments:
|
||||
parameters:
|
||||
- name: sync-directory
|
||||
displayName: Directory to sync raw input and training output
|
||||
value: workflow-data
|
||||
hint: Location to sync raw input, models and checkpoints from default object storage. Note that this will be relative to the current namespace.
|
||||
containers:
|
||||
- name: cvat-db
|
||||
image: postgres:10-alpine
|
||||
env:
|
||||
- name: POSTGRES_USER
|
||||
value: root
|
||||
- name: POSTGRES_DB
|
||||
value: cvat
|
||||
- name: POSTGRES_HOST_AUTH_METHOD
|
||||
value: trust
|
||||
- name: PGDATA
|
||||
value: /var/lib/psql/data
|
||||
ports:
|
||||
- containerPort: 5432
|
||||
name: tcp
|
||||
volumeMounts:
|
||||
- name: db
|
||||
mountPath: /var/lib/psql
|
||||
- name: cvat-redis
|
||||
image: redis:4.0-alpine
|
||||
ports:
|
||||
- containerPort: 6379
|
||||
name: tcp
|
||||
- name: cvat
|
||||
image: onepanel/cvat:0.12.1_cvat.1.0.0
|
||||
env:
|
||||
- name: DJANGO_MODWSGI_EXTRA_ARGS
|
||||
value: ""
|
||||
- name: ALLOWED_HOSTS
|
||||
value: '*'
|
||||
- name: CVAT_REDIS_HOST
|
||||
value: localhost
|
||||
- name: CVAT_POSTGRES_HOST
|
||||
value: localhost
|
||||
- name: CVAT_SHARE_URL
|
||||
value: /home/django/data
|
||||
- name: ONEPANEL_SYNC_DIRECTORY
|
||||
value: '{{workspace.parameters.sync-directory}}'
|
||||
- name: NVIDIA_VISIBLE_DEVICES
|
||||
value: all
|
||||
- name: NVIDIA_DRIVER_CAPABILITIES
|
||||
value: compute,utility
|
||||
- name: NVIDIA_REQUIRE_CUDA
|
||||
value: "cuda>=10.0 brand=tesla,driver>=384,driver<385 brand=tesla,driver>=410,driver<411"
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
name: http
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /home/django/data
|
||||
- name: keys
|
||||
mountPath: /home/django/keys
|
||||
- name: logs
|
||||
mountPath: /home/django/logs
|
||||
- name: models
|
||||
mountPath: /home/django/models
|
||||
- name: share
|
||||
mountPath: /home/django/share
|
||||
- name: sys-namespace-config
|
||||
mountPath: /etc/onepanel
|
||||
readOnly: true
|
||||
- name: cvat-ui
|
||||
image: onepanel/cvat-ui:0.12.1_cvat.1.0.0
|
||||
ports:
|
||||
- containerPort: 80
|
||||
name: http
|
||||
# You can add multiple FileSyncer sidecar containers if needed
|
||||
- name: filesyncer
|
||||
image: "onepanel/filesyncer:{{.ArtifactRepositoryType}}"
|
||||
imagePullPolicy: Always
|
||||
args:
|
||||
- download
|
||||
- -server-prefix=/sys/filesyncer
|
||||
env:
|
||||
- name: FS_PATH
|
||||
value: /mnt/share
|
||||
- name: FS_PREFIX
|
||||
value: '{{workflow.namespace}}/{{workspace.parameters.sync-directory}}'
|
||||
volumeMounts:
|
||||
- name: share
|
||||
mountPath: /mnt/share
|
||||
- name: sys-namespace-config
|
||||
mountPath: /etc/onepanel
|
||||
readOnly: true
|
||||
ports:
|
||||
- name: cvat-ui
|
||||
port: 80
|
||||
protocol: TCP
|
||||
targetPort: 80
|
||||
- name: cvat
|
||||
port: 8080
|
||||
protocol: TCP
|
||||
targetPort: 8080
|
||||
- name: fs
|
||||
port: 8888
|
||||
protocol: TCP
|
||||
targetPort: 8888
|
||||
routes:
|
||||
- match:
|
||||
- uri:
|
||||
prefix: /sys/filesyncer
|
||||
route:
|
||||
- destination:
|
||||
port:
|
||||
number: 8888
|
||||
- match:
|
||||
- uri:
|
||||
regex: /api/.*|/git/.*|/tensorflow/.*|/onepanelio/.*|/tracking/.*|/auto_annotation/.*|/analytics/.*|/static/.*|/admin/.*|/documentation/.*|/dextr/.*|/reid/.*
|
||||
- queryParams:
|
||||
id:
|
||||
regex: \d+.*
|
||||
route:
|
||||
- destination:
|
||||
port:
|
||||
number: 8080
|
||||
- match:
|
||||
- uri:
|
||||
prefix: /
|
||||
route:
|
||||
- destination:
|
||||
port:
|
||||
number: 80
|
||||
# DAG Workflow to be executed once a Workspace action completes (optional)
|
||||
# Uncomment the lines below if you want to send Slack notifications
|
||||
#postExecutionWorkflow:
|
||||
# entrypoint: main
|
||||
# templates:
|
||||
# - name: main
|
||||
# dag:
|
||||
# tasks:
|
||||
# - name: slack-notify
|
||||
# template: slack-notify
|
||||
# - name: slack-notify
|
||||
# container:
|
||||
# image: technosophos/slack-notify
|
||||
# args:
|
||||
# - SLACK_USERNAME=onepanel SLACK_TITLE="Your workspace is ready" SLACK_ICON=https://www.gravatar.com/avatar/5c4478592fe00878f62f0027be59c1bd SLACK_MESSAGE="Your workspace is now running" ./slack-notify
|
||||
# command:
|
||||
# - sh
|
||||
# - -c
|
@@ -1,3 +1,10 @@
|
||||
metadata:
|
||||
name: CVAT
|
||||
kind: Workspace
|
||||
version: 20201016170415
|
||||
action: update
|
||||
description: "Powerful and efficient Computer Vision Annotation Tool (CVAT)"
|
||||
spec:
|
||||
# Workspace arguments
|
||||
arguments:
|
||||
parameters:
|
||||
@@ -73,7 +80,7 @@ containers:
|
||||
name: http
|
||||
# You can add multiple FileSyncer sidecar containers if needed
|
||||
- name: filesyncer
|
||||
image: onepanel/filesyncer:{{.ArtifactRepositoryType}}
|
||||
image: "onepanel/filesyncer:{{.ArtifactRepositoryType}}"
|
||||
imagePullPolicy: Always
|
||||
args:
|
||||
- download
|
||||
|
@@ -1,3 +1,10 @@
|
||||
metadata:
|
||||
name: CVAT
|
||||
kind: Workspace
|
||||
version: 20201102104048
|
||||
action: update
|
||||
description: "Powerful and efficient Computer Vision Annotation Tool (CVAT)"
|
||||
spec:
|
||||
# Workspace arguments
|
||||
arguments:
|
||||
parameters:
|
||||
|
@@ -1,3 +1,10 @@
|
||||
metadata:
|
||||
name: CVAT
|
||||
kind: Workspace
|
||||
version: 20201113094916
|
||||
action: update
|
||||
description: "Powerful and efficient Computer Vision Annotation Tool (CVAT)"
|
||||
spec:
|
||||
# Workspace arguments
|
||||
arguments:
|
||||
parameters:
|
||||
|
@@ -1,3 +1,10 @@
|
||||
metadata:
|
||||
name: CVAT
|
||||
kind: Workspace
|
||||
version: 20201115133046
|
||||
action: update
|
||||
description: "Powerful and efficient Computer Vision Annotation Tool (CVAT)"
|
||||
spec:
|
||||
# Workspace arguments
|
||||
arguments:
|
||||
parameters:
|
||||
|
@@ -1,3 +1,10 @@
|
||||
metadata:
|
||||
name: CVAT
|
||||
kind: Workspace
|
||||
version: 20201211161117
|
||||
action: update
|
||||
description: "Powerful and efficient Computer Vision Annotation Tool (CVAT)"
|
||||
spec:
|
||||
# Workspace arguments
|
||||
arguments:
|
||||
parameters:
|
||||
|
@@ -1,3 +1,10 @@
|
||||
metadata:
|
||||
name: CVAT
|
||||
kind: Workspace
|
||||
version: 20210107094725
|
||||
action: update
|
||||
description: "Powerful and efficient Computer Vision Annotation Tool (CVAT)"
|
||||
spec:
|
||||
# Workspace arguments
|
||||
arguments:
|
||||
parameters:
|
||||
|
@@ -1,3 +1,10 @@
|
||||
metadata:
|
||||
name: CVAT
|
||||
kind: Workspace
|
||||
version: 20210129134326
|
||||
action: update
|
||||
description: "Powerful and efficient Computer Vision Annotation Tool (CVAT)"
|
||||
spec:
|
||||
containers:
|
||||
- name: cvat-db
|
||||
image: postgres:10-alpine
|
||||
|
@@ -1,3 +1,10 @@
|
||||
metadata:
|
||||
name: CVAT
|
||||
kind: Workspace
|
||||
version: 20210224180017
|
||||
action: update
|
||||
description: "Powerful and efficient Computer Vision Annotation Tool (CVAT)"
|
||||
spec:
|
||||
containers:
|
||||
- name: cvat-db
|
||||
image: postgres:10-alpine
|
||||
|
@@ -1,3 +1,10 @@
|
||||
metadata:
|
||||
name: CVAT
|
||||
kind: Workspace
|
||||
version: 20210323175655
|
||||
action: update
|
||||
description: "Powerful and efficient Computer Vision Annotation Tool (CVAT)"
|
||||
spec:
|
||||
containers:
|
||||
- name: cvat-db
|
||||
image: postgres:10-alpine
|
||||
|
@@ -1,3 +1,10 @@
|
||||
metadata:
|
||||
name: CVAT
|
||||
kind: Workspace
|
||||
version: 20210719190719
|
||||
action: update
|
||||
description: "Powerful and efficient Computer Vision Annotation Tool (CVAT)"
|
||||
spec:
|
||||
containers:
|
||||
- name: cvat-db
|
||||
image: postgres:10-alpine
|
||||
|
143
db/yaml/workspaces/cvat_1_6_0/20211028205201.yaml
Normal file
143
db/yaml/workspaces/cvat_1_6_0/20211028205201.yaml
Normal file
@@ -0,0 +1,143 @@
|
||||
metadata:
|
||||
name: CVAT_1.6.0
|
||||
kind: Workspace
|
||||
version: 20211028205201
|
||||
action: create
|
||||
description: "Powerful and efficient Computer Vision Annotation Tool (CVAT 1.6.0)"
|
||||
spec:
|
||||
containers:
|
||||
- name: cvat-db
|
||||
image: postgres:10-alpine
|
||||
env:
|
||||
- name: POSTGRES_USER
|
||||
value: root
|
||||
- name: POSTGRES_DB
|
||||
value: cvat
|
||||
- name: POSTGRES_HOST_AUTH_METHOD
|
||||
value: trust
|
||||
- name: PGDATA
|
||||
value: /var/lib/psql/data
|
||||
ports:
|
||||
- containerPort: 5432
|
||||
name: tcp
|
||||
volumeMounts:
|
||||
- name: db
|
||||
mountPath: /var/lib/psql
|
||||
- name: cvat-redis
|
||||
image: redis:4.0-alpine
|
||||
ports:
|
||||
- containerPort: 6379
|
||||
name: tcp
|
||||
- name: cvat
|
||||
image: onepanel/cvat:v1.0.2_cvat.1.6.0
|
||||
env:
|
||||
- name: DJANGO_MODWSGI_EXTRA_ARGS
|
||||
value: ""
|
||||
- name: ALLOWED_HOSTS
|
||||
value: '*'
|
||||
- name: CVAT_REDIS_HOST
|
||||
value: localhost
|
||||
- name: CVAT_POSTGRES_HOST
|
||||
value: localhost
|
||||
- name: CVAT_SHARE_URL
|
||||
value: /cvat/data
|
||||
- name: CVAT_SHARE_DIR
|
||||
value: /share
|
||||
- name: CVAT_DATA_DIR
|
||||
value: /cvat/data
|
||||
- name: CVAT_MEDIA_DATA_DIR
|
||||
value: /cvat/data/data
|
||||
- name: CVAT_KEYS_DIR
|
||||
value: /cvat/data/keys
|
||||
- name: CVAT_MODELS_DIR
|
||||
value: /cvat/data/models
|
||||
- name: CVAT_LOGS_DIR
|
||||
value: /cvat/logs
|
||||
- name: CVAT_ANNOTATIONS_OBJECT_STORAGE_PREFIX
|
||||
value: 'artifacts/$(ONEPANEL_RESOURCE_NAMESPACE)/annotations/'
|
||||
- name: CVAT_ONEPANEL_WORKFLOWS_LABEL
|
||||
value: 'key=used-by,value=cvat'
|
||||
- name: NVIDIA_VISIBLE_DEVICES
|
||||
value: all
|
||||
- name: NVIDIA_DRIVER_CAPABILITIES
|
||||
value: compute,utility
|
||||
- name: NVIDIA_REQUIRE_CUDA
|
||||
value: "cuda>=10.0 brand=tesla,driver>=384,driver<385 brand=tesla,driver>=410,driver<411"
|
||||
- name: ONEPANEL_MAIN_CONTAINER
|
||||
value: 'true'
|
||||
- name: CVAT_SERVERLESS
|
||||
value: True
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
name: http
|
||||
volumeMounts:
|
||||
- name: cvat-data
|
||||
mountPath: /cvat
|
||||
- name: share
|
||||
mountPath: /share
|
||||
- name: sys-namespace-config
|
||||
mountPath: /etc/onepanel
|
||||
readOnly: true
|
||||
- name: cvat-ui
|
||||
image: onepanel/cvat-ui:v1.0.2_cvat.1.6.0
|
||||
ports:
|
||||
- containerPort: 80
|
||||
name: http
|
||||
- name: sys-filesyncer
|
||||
image: onepanel/filesyncer:v1.0.0
|
||||
imagePullPolicy: Always
|
||||
args:
|
||||
- server
|
||||
- -server-prefix=/sys/filesyncer
|
||||
volumeMounts:
|
||||
- name: share
|
||||
mountPath: /share
|
||||
- name: sys-namespace-config
|
||||
mountPath: /etc/onepanel
|
||||
readOnly: true
|
||||
ports:
|
||||
- name: cvat-ui
|
||||
port: 80
|
||||
protocol: TCP
|
||||
targetPort: 80
|
||||
- name: cvat
|
||||
port: 8080
|
||||
protocol: TCP
|
||||
targetPort: 8080
|
||||
- name: fs
|
||||
port: 8888
|
||||
protocol: TCP
|
||||
targetPort: 8888
|
||||
routes:
|
||||
- match:
|
||||
- uri:
|
||||
prefix: /sys/filesyncer
|
||||
route:
|
||||
- destination:
|
||||
port:
|
||||
number: 8888
|
||||
- match:
|
||||
- uri:
|
||||
regex: \/?api.*|\/?git.*|\/?tensorflow.*|\/?onepanelio.*|\/?tracking.*|\/?auto_annotation.*|\/?analytics.*|\/?static.*|\/?admin.*|\/?documentation.*|\/?dextr.*|\/?reid.*|\/?django-rq.*
|
||||
- queryParams:
|
||||
id:
|
||||
regex: \d+.*
|
||||
route:
|
||||
- destination:
|
||||
port:
|
||||
number: 8080
|
||||
- match:
|
||||
- uri:
|
||||
prefix: /
|
||||
route:
|
||||
- destination:
|
||||
port:
|
||||
number: 80
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: db
|
||||
spec:
|
||||
accessModes: [ "ReadWriteOnce" ]
|
||||
resources:
|
||||
requests:
|
||||
storage: 20Gi
|
64
db/yaml/workspaces/jupyterlab/20200525160514.yaml
Normal file
64
db/yaml/workspaces/jupyterlab/20200525160514.yaml
Normal file
@@ -0,0 +1,64 @@
|
||||
metadata:
|
||||
name: JupyterLab
|
||||
kind: Workspace
|
||||
version: 20200525160514
|
||||
action: create
|
||||
description: "Interactive development environment for notebooks"
|
||||
spec:
|
||||
# Docker containers that are part of the Workspace
|
||||
containers:
|
||||
- name: jupyterlab-tensorflow
|
||||
image: jupyter/tensorflow-notebook
|
||||
command: [start.sh, jupyter]
|
||||
env:
|
||||
- name: tornado
|
||||
value: "{ 'headers': { 'Content-Security-Policy': \"frame-ancestors * 'self'\" } }"
|
||||
args:
|
||||
- lab
|
||||
- --LabApp.token=''
|
||||
- --LabApp.allow_remote_access=True
|
||||
- --LabApp.allow_origin="*"
|
||||
- --LabApp.disable_check_xsrf=True
|
||||
- --LabApp.trust_xheaders=True
|
||||
- --LabApp.tornado_settings=$(tornado)
|
||||
- --notebook-dir='/data'
|
||||
ports:
|
||||
- containerPort: 8888
|
||||
name: jupyterlab
|
||||
# Volumes to be mounted in this container
|
||||
# Onepanel will automatically create these volumes and mount them to the container
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /data
|
||||
# Ports that need to be exposed
|
||||
ports:
|
||||
- name: jupyterlab
|
||||
port: 80
|
||||
protocol: TCP
|
||||
targetPort: 8888
|
||||
# Routes that will map to ports
|
||||
routes:
|
||||
- match:
|
||||
- uri:
|
||||
prefix: /
|
||||
route:
|
||||
- destination:
|
||||
port:
|
||||
number: 80
|
||||
# DAG Workflow to be executed once a Workspace action completes
|
||||
# postExecutionWorkflow:
|
||||
# entrypoint: main
|
||||
# templates:
|
||||
# - name: main
|
||||
# dag:
|
||||
# tasks:
|
||||
# - name: slack-notify
|
||||
# template: slack-notify
|
||||
# - name: slack-notify
|
||||
# container:
|
||||
# image: technosophos/slack-notify
|
||||
# args:
|
||||
# - SLACK_USERNAME=onepanel SLACK_TITLE="Your workspace is ready" SLACK_ICON=https://www.gravatar.com/avatar/5c4478592fe00878f62f0027be59c1bd SLACK_MESSAGE="Your workspace is now running" ./slack-notify
|
||||
# command:
|
||||
# - sh
|
||||
# - -c
|
65
db/yaml/workspaces/jupyterlab/20200821162630.yaml
Normal file
65
db/yaml/workspaces/jupyterlab/20200821162630.yaml
Normal file
@@ -0,0 +1,65 @@
|
||||
metadata:
|
||||
name: JupyterLab
|
||||
kind: Workspace
|
||||
version: 20200821162630
|
||||
action: update
|
||||
description: "Interactive development environment for notebooks"
|
||||
spec:
|
||||
# Docker containers that are part of the Workspace
|
||||
containers:
|
||||
- name: jupyterlab-tensorflow
|
||||
image: onepanel/jupyterlab:1.0.1
|
||||
command: ["/bin/bash", "-c", "start.sh jupyter lab --LabApp.token='' --LabApp.allow_remote_access=True --LabApp.allow_origin=\"*\" --LabApp.disable_check_xsrf=True --LabApp.trust_xheaders=True --LabApp.base_url=/ --LabApp.tornado_settings='{\"headers\":{\"Content-Security-Policy\":\"frame-ancestors * \'self\'\"}}' --notebook-dir='/data' --allow-root"]
|
||||
env:
|
||||
- name: tornado
|
||||
value: "'{'headers':{'Content-Security-Policy':\"frame-ancestors\ *\ \'self'\"}}'"
|
||||
args:
|
||||
ports:
|
||||
- containerPort: 8888
|
||||
name: jupyterlab
|
||||
- containerPort: 6006
|
||||
name: tensorboard
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /data
|
||||
ports:
|
||||
- name: jupyterlab
|
||||
port: 80
|
||||
protocol: TCP
|
||||
targetPort: 8888
|
||||
- name: tensorboard
|
||||
port: 6006
|
||||
protocol: TCP
|
||||
targetPort: 6006
|
||||
routes:
|
||||
- match:
|
||||
- uri:
|
||||
prefix: /tensorboard
|
||||
route:
|
||||
- destination:
|
||||
port:
|
||||
number: 6006
|
||||
- match:
|
||||
- uri:
|
||||
prefix: / #jupyter runs at the default route
|
||||
route:
|
||||
- destination:
|
||||
port:
|
||||
number: 80
|
||||
# DAG Workflow to be executed once a Workspace action completes (optional)
|
||||
#postExecutionWorkflow:
|
||||
# entrypoint: main
|
||||
# templates:
|
||||
# - name: main
|
||||
# dag:
|
||||
# tasks:
|
||||
# - name: slack-notify
|
||||
# template: slack-notify
|
||||
# - name: slack-notify
|
||||
# container:
|
||||
# image: technosophos/slack-notify
|
||||
# args:
|
||||
# - SLACK_USERNAME=onepanel SLACK_TITLE="Your workspace is ready" SLACK_ICON=https://www.gravatar.com/avatar/5c4478592fe00878f62f0027be59c1bd SLACK_MESSAGE="Your workspace is now running" ./slack-notify
|
||||
# command:
|
||||
# - sh
|
||||
# - -c
|
@@ -1,3 +1,10 @@
|
||||
metadata:
|
||||
name: JupyterLab
|
||||
kind: Workspace
|
||||
version: 20200929153931
|
||||
action: update
|
||||
description: "Interactive development environment for notebooks"
|
||||
spec:
|
||||
# Docker containers that are part of the Workspace
|
||||
containers:
|
||||
- name: jupyterlab-tensorflow
|
||||
|
@@ -1,3 +1,10 @@
|
||||
metadata:
|
||||
name: JupyterLab
|
||||
kind: Workspace
|
||||
version: 20201028145442
|
||||
action: update
|
||||
description: "Interactive development environment for notebooks"
|
||||
spec:
|
||||
# Docker containers that are part of the Workspace
|
||||
containers:
|
||||
- name: jupyterlab
|
||||
|
@@ -1,3 +1,10 @@
|
||||
metadata:
|
||||
name: JupyterLab
|
||||
kind: Workspace
|
||||
version: 20201031165106
|
||||
action: update
|
||||
description: "Interactive development environment for notebooks"
|
||||
spec:
|
||||
# Docker containers that are part of the Workspace
|
||||
containers:
|
||||
- name: jupyterlab
|
||||
|
@@ -1,3 +1,10 @@
|
||||
metadata:
|
||||
name: JupyterLab
|
||||
kind: Workspace
|
||||
version: 20201214133458
|
||||
action: update
|
||||
description: "Interactive development environment for notebooks"
|
||||
spec:
|
||||
# Docker containers that are part of the Workspace
|
||||
containers:
|
||||
- name: jupyterlab
|
||||
|
@@ -1,3 +1,10 @@
|
||||
metadata:
|
||||
name: JupyterLab
|
||||
kind: Workspace
|
||||
version: 20201229205644
|
||||
action: update
|
||||
description: "Interactive development environment for notebooks"
|
||||
spec:
|
||||
# Docker containers that are part of the Workspace
|
||||
containers:
|
||||
- name: jupyterlab
|
||||
|
@@ -1,3 +1,10 @@
|
||||
metadata:
|
||||
name: JupyterLab
|
||||
kind: Workspace
|
||||
version: 20210129142057
|
||||
action: update
|
||||
description: "Interactive development environment for notebooks"
|
||||
spec:
|
||||
containers:
|
||||
- name: jupyterlab
|
||||
image: onepanel/dl:0.17.0
|
||||
|
@@ -1,3 +1,10 @@
|
||||
metadata:
|
||||
name: JupyterLab
|
||||
kind: Workspace
|
||||
version: 20210224180017
|
||||
action: update
|
||||
description: "Interactive development environment for notebooks"
|
||||
spec:
|
||||
containers:
|
||||
- name: jupyterlab
|
||||
image: onepanel/dl:0.17.0
|
||||
|
@@ -1,3 +1,10 @@
|
||||
metadata:
|
||||
name: JupyterLab
|
||||
kind: Workspace
|
||||
version: 20210323175655
|
||||
action: update
|
||||
description: "Interactive development environment for notebooks"
|
||||
spec:
|
||||
containers:
|
||||
- name: jupyterlab
|
||||
image: onepanel/dl:v0.20.0
|
||||
|
@@ -1,3 +1,10 @@
|
||||
metadata:
|
||||
name: JupyterLab
|
||||
kind: Workspace
|
||||
version: 20210719190719
|
||||
action: update
|
||||
description: "Interactive development environment for notebooks"
|
||||
spec:
|
||||
containers:
|
||||
- name: jupyterlab
|
||||
image: onepanel/dl:v0.20.0
|
||||
|
@@ -1,3 +1,10 @@
|
||||
metadata:
|
||||
name: "Deep Learning Desktop"
|
||||
kind: Workspace
|
||||
version: 20210414165510
|
||||
action: create
|
||||
description: "Deep learning desktop with VNC"
|
||||
spec:
|
||||
arguments:
|
||||
parameters:
|
||||
# parameter screen-resolution allows users to select screen resolution
|
||||
|
@@ -1,3 +1,10 @@
|
||||
metadata:
|
||||
name: "Deep Learning Desktop"
|
||||
kind: Workspace
|
||||
version: 20210719190719
|
||||
action: update
|
||||
description: "Deep learning desktop with VNC"
|
||||
spec:
|
||||
arguments:
|
||||
parameters:
|
||||
# parameter screen-resolution allows users to select screen resolution
|
||||
|
@@ -1,3 +1,10 @@
|
||||
metadata:
|
||||
name: "Visual Studio Code"
|
||||
kind: Workspace
|
||||
version: 20200929144301
|
||||
action: create
|
||||
description: "Open source code editor"
|
||||
spec:
|
||||
# Docker containers that are part of the Workspace
|
||||
containers:
|
||||
- name: vscode
|
||||
|
@@ -1,3 +1,9 @@
|
||||
metadata:
|
||||
name: "Visual Studio Code"
|
||||
kind: Workspace
|
||||
version: 20201028145443
|
||||
action: update
|
||||
spec:
|
||||
# Docker containers that are part of the Workspace
|
||||
containers:
|
||||
- name: vscode
|
||||
|
@@ -1,3 +1,9 @@
|
||||
metadata:
|
||||
name: "Visual Studio Code"
|
||||
kind: Workspace
|
||||
version: 20210129152427
|
||||
action: update
|
||||
spec:
|
||||
containers:
|
||||
- name: vscode
|
||||
image: onepanel/vscode:1.0.0
|
||||
|
@@ -1,3 +1,9 @@
|
||||
metadata:
|
||||
name: "Visual Studio Code"
|
||||
kind: Workspace
|
||||
version: 20210224180017
|
||||
action: update
|
||||
spec:
|
||||
containers:
|
||||
- name: vscode
|
||||
image: onepanel/vscode:1.0.0
|
||||
|
@@ -1,3 +1,9 @@
|
||||
metadata:
|
||||
name: "Visual Studio Code"
|
||||
kind: Workspace
|
||||
version: 20210323175655
|
||||
action: update
|
||||
spec:
|
||||
containers:
|
||||
- name: vscode
|
||||
image: onepanel/vscode:v0.20.0_code-server.3.9.1
|
||||
|
@@ -1,3 +1,9 @@
|
||||
metadata:
|
||||
name: "Visual Studio Code"
|
||||
kind: Workspace
|
||||
version: 20210719190719
|
||||
action: update
|
||||
spec:
|
||||
containers:
|
||||
- name: vscode
|
||||
image: onepanel/vscode:v0.20.0_code-server.3.9.1
|
||||
|
BIN
img/features.png
BIN
img/features.png
Binary file not shown.
Before Width: | Height: | Size: 129 KiB After Width: | Height: | Size: 302 KiB |
4
main.go
4
main.go
@@ -158,6 +158,7 @@ func startRPCServer(db *v1.DB, kubeConfig *v1.Config, sysConfig v1.SystemConfig,
|
||||
api.RegisterConfigServiceServer(s, server.NewConfigServer())
|
||||
api.RegisterServiceServiceServer(s, server.NewServiceServer())
|
||||
api.RegisterFileServiceServer(s, server.NewFileServer())
|
||||
api.RegisterInferenceServiceServer(s, server.NewInferenceService())
|
||||
|
||||
go func() {
|
||||
if err := s.Serve(lis); err != nil {
|
||||
@@ -194,6 +195,7 @@ func startHTTPProxy() {
|
||||
registerHandler(api.RegisterConfigServiceHandlerFromEndpoint, ctx, mux, endpoint, opts)
|
||||
registerHandler(api.RegisterServiceServiceHandlerFromEndpoint, ctx, mux, endpoint, opts)
|
||||
registerHandler(api.RegisterFileServiceHandlerFromEndpoint, ctx, mux, endpoint, opts)
|
||||
registerHandler(api.RegisterInferenceServiceHandlerFromEndpoint, ctx, mux, endpoint, opts)
|
||||
|
||||
log.Printf("Starting HTTP proxy on port %v", *httpPort)
|
||||
|
||||
@@ -286,6 +288,8 @@ func customHeaderMatcher(key string) (string, bool) {
|
||||
switch lowerCaseKey {
|
||||
case "onepanel-auth-token":
|
||||
return lowerCaseKey, true
|
||||
case "onepanel-access-token":
|
||||
return lowerCaseKey, true
|
||||
case "cookie":
|
||||
return lowerCaseKey, true
|
||||
default:
|
||||
|
0
manifest/.gitignore
vendored
Normal file
0
manifest/.gitignore
vendored
Normal file
63
manifest/abs/deployment.json
Normal file
63
manifest/abs/deployment.json
Normal file
@@ -0,0 +1,63 @@
|
||||
{
|
||||
"apiVersion": "apps/v1",
|
||||
"kind": "Deployment",
|
||||
"metadata": {
|
||||
"name": "minio-gateway",
|
||||
"namespace": "$(applicationDefaultNamespace)"
|
||||
},
|
||||
"spec": {
|
||||
"replicas": 1,
|
||||
"selector": {
|
||||
"matchLabels": {
|
||||
"app": "minio-gateway"
|
||||
}
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"labels": {
|
||||
"app": "minio-gateway"
|
||||
},
|
||||
"annotations": {
|
||||
"sidecar.istio.io/inject": "false"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"containers": [
|
||||
{
|
||||
"name": "minio-gateway",
|
||||
"image": "minio/minio:RELEASE.2021-06-17T00-10-46Z.hotfix.49f6035b1",
|
||||
"args": [
|
||||
"gateway",
|
||||
"azure"
|
||||
],
|
||||
"env": [
|
||||
{
|
||||
"name": "MINIO_ACCESS_KEY",
|
||||
"valueFrom": {
|
||||
"secretKeyRef": {
|
||||
"name": "onepanel",
|
||||
"key": "artifactRepositoryS3AccessKey"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "MINIO_SECRET_KEY",
|
||||
"valueFrom": {
|
||||
"secretKeyRef": {
|
||||
"name": "onepanel",
|
||||
"key": "artifactRepositoryS3SecretKey"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 9000
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
19
manifest/abs/service.json
Normal file
19
manifest/abs/service.json
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"apiVersion": "v1",
|
||||
"kind": "Service",
|
||||
"metadata": {
|
||||
"name": "minio-gateway",
|
||||
"namespace": "$(applicationDefaultNamespace)"
|
||||
},
|
||||
"spec": {
|
||||
"selector": {
|
||||
"app": "minio-gateway"
|
||||
},
|
||||
"ports": [
|
||||
{
|
||||
"port": 9000,
|
||||
"targetPort": 9000
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
19
manifest/clusterrolebinding-models.json
Normal file
19
manifest/clusterrolebinding-models.json
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"apiVersion": "rbac.authorization.k8s.io/v1",
|
||||
"kind": "ClusterRoleBinding",
|
||||
"metadata": {
|
||||
"name": "onepanel-kfserving-$(applicationDefaultNamespace)"
|
||||
},
|
||||
"subjects": [
|
||||
{
|
||||
"kind": "ServiceAccount",
|
||||
"name": "$(applicationDefaultNamespace)",
|
||||
"namespace": "$(applicationDefaultNamespace)"
|
||||
}
|
||||
],
|
||||
"roleRef": {
|
||||
"apiGroup": "rbac.authorization.k8s.io",
|
||||
"kind": "ClusterRole",
|
||||
"name": "onepanel-models"
|
||||
}
|
||||
}
|
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"apiVersion": "rbac.authorization.k8s.io/v1beta1",
|
||||
"kind": "ClusterRoleBinding",
|
||||
"metadata": {
|
||||
"labels": {
|
||||
"app": "onepanel"
|
||||
},
|
||||
"name": "onepanel-namespaces"
|
||||
},
|
||||
"roleRef": {
|
||||
"apiGroup": "rbac.authorization.k8s.io",
|
||||
"kind": "ClusterRole",
|
||||
"name": "onepanel-namespaces"
|
||||
},
|
||||
"subjects": [
|
||||
{
|
||||
"kind": "ServiceAccount",
|
||||
"name": "$(applicationDefaultNamespace)",
|
||||
"namespace": "$(applicationDefaultNamespace)"
|
||||
}
|
||||
]
|
||||
}
|
11
manifest/configmap-onepanel-defaultnamespace.json
Normal file
11
manifest/configmap-onepanel-defaultnamespace.json
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"apiVersion": "v1",
|
||||
"kind": "ConfigMap",
|
||||
"metadata": {
|
||||
"name": "onepanel",
|
||||
"namespace": "$(applicationDefaultNamespace)"
|
||||
},
|
||||
"data": {
|
||||
"artifactRepository": "archiveLogs: true\n$(artifactRepositoryProvider)\n"
|
||||
}
|
||||
}
|
83
manifest/gcs/deployment.json
Normal file
83
manifest/gcs/deployment.json
Normal file
@@ -0,0 +1,83 @@
|
||||
{
|
||||
"apiVersion": "apps/v1",
|
||||
"kind": "Deployment",
|
||||
"metadata": {
|
||||
"name": "minio-gateway",
|
||||
"namespace": "$(applicationDefaultNamespace)"
|
||||
},
|
||||
"spec": {
|
||||
"replicas": 1,
|
||||
"selector": {
|
||||
"matchLabels": {
|
||||
"app": "minio-gateway"
|
||||
}
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"labels": {
|
||||
"app": "minio-gateway"
|
||||
},
|
||||
"annotations": {
|
||||
"sidecar.istio.io/inject": "false"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"containers": [
|
||||
{
|
||||
"name": "minio-gateway",
|
||||
"image": "minio/minio:RELEASE.2021-06-17T00-10-46Z.hotfix.49f6035b1",
|
||||
"volumeMounts": [
|
||||
{
|
||||
"name": "gcs-credentials",
|
||||
"mountPath": "/etc/gcs",
|
||||
"readOnly": true
|
||||
}
|
||||
],
|
||||
"args": [
|
||||
"gateway",
|
||||
"gcs"
|
||||
],
|
||||
"env": [
|
||||
{
|
||||
"name": "MINIO_ACCESS_KEY",
|
||||
"valueFrom": {
|
||||
"secretKeyRef": {
|
||||
"name": "onepanel",
|
||||
"key": "artifactRepositoryS3AccessKey"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "MINIO_SECRET_KEY",
|
||||
"valueFrom": {
|
||||
"secretKeyRef": {
|
||||
"name": "onepanel",
|
||||
"key": "artifactRepositoryS3SecretKey"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "GOOGLE_APPLICATION_CREDENTIALS",
|
||||
"value": "/etc/gcs/credentials.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"volumes": [
|
||||
{
|
||||
"name": "gcs-credentials",
|
||||
"projected": {
|
||||
"sources": [
|
||||
{
|
||||
"secret": {
|
||||
"name": "artifact-repository-gcs-credentials"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
19
manifest/gcs/service.json
Normal file
19
manifest/gcs/service.json
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"apiVersion": "v1",
|
||||
"kind": "Service",
|
||||
"metadata": {
|
||||
"name": "minio-gateway",
|
||||
"namespace": "$(applicationDefaultNamespace)"
|
||||
},
|
||||
"spec": {
|
||||
"selector": {
|
||||
"app": "minio-gateway"
|
||||
},
|
||||
"ports": [
|
||||
{
|
||||
"port": 9000,
|
||||
"targetPort": 9000
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
19
manifest/kfserving/secret.json
Normal file
19
manifest/kfserving/secret.json
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"apiVersion": "v1",
|
||||
"kind": "Secret",
|
||||
"metadata": {
|
||||
"name": "kfserving-storage",
|
||||
"namespace": "$(applicationDefaultNamespace)",
|
||||
"annotations": {
|
||||
"serving.kubeflow.org/s3-endpoint": "$(artifactRepositoryS3Endpoint)",
|
||||
"serving.kubeflow.org/s3-usehttps": "0",
|
||||
"serving.kubeflow.org/s3-region": "$(artifactRepositoryS3Region)",
|
||||
"serving.kubeflow.org/s3-useanoncredential": "false"
|
||||
}
|
||||
},
|
||||
"type": "Opaque",
|
||||
"data": {
|
||||
"AWS_ACCESS_KEY_ID": "$(artifactRepositoryS3AccessKey)",
|
||||
"AWS_SECRET_ACCESS_KEY": "$(artifactRepositoryS3SecretKey)"
|
||||
}
|
||||
}
|
41
manifest/networkpolicy-onepanel-defaultnamespace.json
Normal file
41
manifest/networkpolicy-onepanel-defaultnamespace.json
Normal file
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"apiVersion": "networking.k8s.io/v1",
|
||||
"kind": "NetworkPolicy",
|
||||
"metadata": {
|
||||
"labels": {
|
||||
"app": "onepanel"
|
||||
},
|
||||
"name": "onepanel",
|
||||
"namespace": "$(applicationDefaultNamespace)"
|
||||
},
|
||||
"spec": {
|
||||
"egress": [
|
||||
{
|
||||
"to": [
|
||||
{
|
||||
"ipBlock": {
|
||||
"cidr": "0.0.0.0/0",
|
||||
"except": [
|
||||
"169.254.169.254/32"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"ingress": [
|
||||
{
|
||||
"from": [
|
||||
{
|
||||
"namespaceSelector": {
|
||||
"matchLabels": {
|
||||
"app.kubernetes.io/part-of": "onepanel"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"podSelector": {}
|
||||
}
|
||||
}
|
167
manifest/role-onepanel-defaultnamespace.json
Normal file
167
manifest/role-onepanel-defaultnamespace.json
Normal file
@@ -0,0 +1,167 @@
|
||||
{
|
||||
"apiVersion": "rbac.authorization.k8s.io/v1beta1",
|
||||
"kind": "Role",
|
||||
"metadata": {
|
||||
"labels": {
|
||||
"app": "onepanel"
|
||||
},
|
||||
"name": "onepanel",
|
||||
"namespace": "$(applicationDefaultNamespace)"
|
||||
},
|
||||
"rules": [
|
||||
{
|
||||
"apiGroups": [
|
||||
""
|
||||
],
|
||||
"resources": [
|
||||
"configmaps"
|
||||
],
|
||||
"verbs": [
|
||||
"get"
|
||||
]
|
||||
},
|
||||
{
|
||||
"apiGroups": [
|
||||
""
|
||||
],
|
||||
"resources": [
|
||||
"pods",
|
||||
"pods/log"
|
||||
],
|
||||
"verbs": [
|
||||
"get",
|
||||
"watch",
|
||||
"patch"
|
||||
]
|
||||
},
|
||||
{
|
||||
"apiGroups": [
|
||||
""
|
||||
],
|
||||
"resources": [
|
||||
"persistentvolumeclaims",
|
||||
"services",
|
||||
"secrets"
|
||||
],
|
||||
"verbs": [
|
||||
"get",
|
||||
"watch",
|
||||
"list",
|
||||
"create",
|
||||
"update",
|
||||
"patch",
|
||||
"delete"
|
||||
]
|
||||
},
|
||||
{
|
||||
"apiGroups": [
|
||||
"apps"
|
||||
],
|
||||
"resources": [
|
||||
"statefulsets",
|
||||
"deployments"
|
||||
],
|
||||
"verbs": [
|
||||
"get",
|
||||
"watch",
|
||||
"list",
|
||||
"create",
|
||||
"update",
|
||||
"patch",
|
||||
"delete"
|
||||
]
|
||||
},
|
||||
{
|
||||
"apiGroups": [
|
||||
"networking.istio.io"
|
||||
],
|
||||
"resources": [
|
||||
"virtualservices"
|
||||
],
|
||||
"verbs": [
|
||||
"get",
|
||||
"watch",
|
||||
"list",
|
||||
"create",
|
||||
"update",
|
||||
"patch",
|
||||
"delete"
|
||||
]
|
||||
},
|
||||
{
|
||||
"apiGroups": [
|
||||
"argoproj.io"
|
||||
],
|
||||
"resources": [
|
||||
"workflows",
|
||||
"workflowtemplates",
|
||||
"cronworkflows"
|
||||
],
|
||||
"verbs": [
|
||||
"get",
|
||||
"watch",
|
||||
"list",
|
||||
"create",
|
||||
"update",
|
||||
"patch",
|
||||
"delete"
|
||||
]
|
||||
},
|
||||
{
|
||||
"apiGroups": [
|
||||
"onepanel.io"
|
||||
],
|
||||
"resources": [
|
||||
"workspaces"
|
||||
],
|
||||
"verbs": [
|
||||
"get",
|
||||
"watch",
|
||||
"list",
|
||||
"create",
|
||||
"update",
|
||||
"patch",
|
||||
"delete"
|
||||
]
|
||||
},
|
||||
{
|
||||
"apiGroups": [
|
||||
"onepanel.io"
|
||||
],
|
||||
"resources": [
|
||||
"services"
|
||||
],
|
||||
"verbs": [
|
||||
"get",
|
||||
"watch",
|
||||
"list",
|
||||
"create",
|
||||
"update",
|
||||
"patch",
|
||||
"delete"
|
||||
]
|
||||
},
|
||||
{
|
||||
"apiGroups": [
|
||||
"serving.kubeflow.org"
|
||||
],
|
||||
"resources": [
|
||||
"inferenceservices"
|
||||
],
|
||||
"verbs": [
|
||||
"get",
|
||||
"watch",
|
||||
"list",
|
||||
"create",
|
||||
"update",
|
||||
"patch",
|
||||
"delete"
|
||||
]
|
||||
},
|
||||
{
|
||||
"apiGroups": [""],
|
||||
"resources": ["onepanel-service"],
|
||||
"verbs": ["get", "watch", "list"]
|
||||
}
|
||||
]
|
||||
}
|
28
manifest/rolebinding-onepanel-defaultnamespace.json
Normal file
28
manifest/rolebinding-onepanel-defaultnamespace.json
Normal file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"apiVersion": "rbac.authorization.k8s.io/v1beta1",
|
||||
"kind": "RoleBinding",
|
||||
"metadata": {
|
||||
"labels": {
|
||||
"app": "onepanel"
|
||||
},
|
||||
"name": "onepanel",
|
||||
"namespace": "$(applicationDefaultNamespace)"
|
||||
},
|
||||
"roleRef": {
|
||||
"apiGroup": "rbac.authorization.k8s.io",
|
||||
"kind": "Role",
|
||||
"name": "onepanel"
|
||||
},
|
||||
"subjects": [
|
||||
{
|
||||
"kind": "ServiceAccount",
|
||||
"name": "default",
|
||||
"namespace": "$(applicationDefaultNamespace)"
|
||||
},
|
||||
{
|
||||
"kind": "ServiceAccount",
|
||||
"name": "$(applicationDefaultNamespace)",
|
||||
"namespace": "$(applicationDefaultNamespace)"
|
||||
}
|
||||
]
|
||||
}
|
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"apiVersion": "v1",
|
||||
"kind": "Secret",
|
||||
"metadata": {
|
||||
"name": "onepanel-default-env",
|
||||
"namespace": "$(applicationDefaultNamespace)"
|
||||
},
|
||||
"type": "Opaque"
|
||||
}
|
21
manifest/secret-onepanel-defaultnamespace.json
Normal file
21
manifest/secret-onepanel-defaultnamespace.json
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"apiVersion": "v1",
|
||||
"kind": "Secret",
|
||||
"metadata": {
|
||||
"name": "onepanel",
|
||||
"namespace": "$(applicationDefaultNamespace)",
|
||||
"labels": {
|
||||
"app.kubernetes.io/component": "onepanel",
|
||||
"app.kubernetes.io/instance": "onepanel-v0.5.0",
|
||||
"app.kubernetes.io/managed-by": "onepanel-cli",
|
||||
"app.kubernetes.io/name": "onepanel",
|
||||
"app.kubernetes.io/part-of": "onepanel",
|
||||
"app.kubernetes.io/version": "v0.5.0"
|
||||
}
|
||||
},
|
||||
"data": {
|
||||
"artifactRepositoryS3AccessKey": "$(artifactRepositoryS3AccessKey)",
|
||||
"artifactRepositoryS3SecretKey": "$(artifactRepositoryS3SecretKey)"
|
||||
},
|
||||
"type": "Opaque"
|
||||
}
|
8
manifest/service-account.json
Normal file
8
manifest/service-account.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"kind": "ServiceAccount",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "$(applicationDefaultNamespace)",
|
||||
"namespace": "$(applicationDefaultNamespace)"
|
||||
}
|
||||
}
|
37
manifest/service-minio-onepanel.json
Normal file
37
manifest/service-minio-onepanel.json
Normal file
@@ -0,0 +1,37 @@
|
||||
{
|
||||
"apiVersion": "networking.istio.io/v1alpha3",
|
||||
"kind": "VirtualService",
|
||||
"metadata": {
|
||||
"name": "minio",
|
||||
"namespace": "$(applicationDefaultNamespace)"
|
||||
},
|
||||
"spec": {
|
||||
"hosts": [
|
||||
"sys-storage-$(applicationDefaultNamespace).$(applicationDomain)"
|
||||
],
|
||||
"gateways": [
|
||||
"istio-system/ingressgateway"
|
||||
],
|
||||
"http": [
|
||||
{
|
||||
"match": [
|
||||
{
|
||||
"uri": {
|
||||
"prefix": "/"
|
||||
}
|
||||
}
|
||||
],
|
||||
"route": [
|
||||
{
|
||||
"destination": {
|
||||
"port": {
|
||||
"number": 9000
|
||||
},
|
||||
"host": "minio-gateway.$(applicationDefaultNamespace).svc.cluster.local"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
@@ -5,14 +5,17 @@ import (
|
||||
sq "github.com/Masterminds/squirrel"
|
||||
argoprojv1alpha1 "github.com/argoproj/argo/pkg/client/clientset/versioned/typed/workflow/v1alpha1"
|
||||
"github.com/jmoiron/sqlx"
|
||||
"github.com/onepanelio/core/pkg/util"
|
||||
"github.com/onepanelio/core/pkg/util/env"
|
||||
"github.com/onepanelio/core/pkg/util/gcs"
|
||||
"github.com/onepanelio/core/pkg/util/router"
|
||||
"github.com/onepanelio/core/pkg/util/s3"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"google.golang.org/grpc/codes"
|
||||
"k8s.io/client-go/kubernetes"
|
||||
"k8s.io/client-go/rest"
|
||||
"k8s.io/client-go/tools/clientcmd"
|
||||
"sigs.k8s.io/yaml"
|
||||
"strconv"
|
||||
"time"
|
||||
)
|
||||
@@ -27,6 +30,7 @@ type Client struct {
|
||||
argoprojV1alpha1 argoprojv1alpha1.ArgoprojV1alpha1Interface
|
||||
*DB
|
||||
systemConfig SystemConfig
|
||||
cache map[string]interface{}
|
||||
}
|
||||
|
||||
func (c *Client) ArgoprojV1alpha1() argoprojv1alpha1.ArgoprojV1alpha1Interface {
|
||||
@@ -102,6 +106,7 @@ func NewClient(config *Config, db *DB, systemConfig SystemConfig) (client *Clien
|
||||
argoprojV1alpha1: argoClient,
|
||||
DB: db,
|
||||
systemConfig: systemConfig,
|
||||
cache: make(map[string]interface{}),
|
||||
}, nil
|
||||
}
|
||||
|
||||
@@ -175,7 +180,12 @@ func (c *Client) GetWebRouter() (router.Web, error) {
|
||||
// GetArtifactRepositoryType returns the configured artifact repository type for the given namespace.
|
||||
// possible return values are: "s3", "gcs"
|
||||
func (c *Client) GetArtifactRepositoryType(namespace string) (string, error) {
|
||||
artifactRepositoryType := "s3"
|
||||
artifactRepositoryType, ok := c.cache["artifactRepositoryType"]
|
||||
if ok {
|
||||
return artifactRepositoryType.(string), nil
|
||||
}
|
||||
|
||||
artifactRepositoryType = "s3"
|
||||
nsConfig, err := c.GetNamespaceConfig(namespace)
|
||||
if err != nil {
|
||||
return "", err
|
||||
@@ -184,7 +194,38 @@ func (c *Client) GetArtifactRepositoryType(namespace string) (string, error) {
|
||||
artifactRepositoryType = "gcs"
|
||||
}
|
||||
|
||||
return artifactRepositoryType, nil
|
||||
c.cache["artifactRepositoryType"] = artifactRepositoryType
|
||||
|
||||
return artifactRepositoryType.(string), nil
|
||||
}
|
||||
|
||||
// GetArtifactRepositorySource returns the original source for the artifact repository
|
||||
// This can be s3, abs, gcs, etc. Since everything goes through an S3 compatible API,
|
||||
// it is sometimes useful to know the source.
|
||||
func (c *Client) GetArtifactRepositorySource(namespace string) (string, error) {
|
||||
configMap, err := c.getConfigMap(namespace, "onepanel")
|
||||
if err != nil {
|
||||
log.WithFields(log.Fields{
|
||||
"Namespace": namespace,
|
||||
"Error": err.Error(),
|
||||
}).Error("getArtifactRepositorySource failed getting config map.")
|
||||
return "", err
|
||||
}
|
||||
|
||||
config := &NamespaceConfig{
|
||||
ArtifactRepository: ArtifactRepositoryProvider{},
|
||||
}
|
||||
|
||||
err = yaml.Unmarshal([]byte(configMap.Data["artifactRepository"]), &config.ArtifactRepository)
|
||||
if err != nil || (config.ArtifactRepository.S3 == nil && config.ArtifactRepository.GCS == nil) {
|
||||
return "", util.NewUserError(codes.NotFound, "Artifact repository config not found.")
|
||||
}
|
||||
|
||||
if config.ArtifactRepository.S3 != nil {
|
||||
return config.ArtifactRepository.S3.Source, nil
|
||||
}
|
||||
|
||||
return config.ArtifactRepository.GCS.Source, nil
|
||||
}
|
||||
|
||||
// getKubernetesTimeout returns the timeout for kubernetes requests.
|
||||
|
@@ -26,6 +26,7 @@ func (c *Client) getConfigMap(namespace, name string) (configMap *ConfigMap, err
|
||||
// GetSystemConfig will pull it from the resources
|
||||
func (c *Client) ClearSystemConfigCache() {
|
||||
c.systemConfig = nil
|
||||
c.cache = make(map[string]interface{})
|
||||
}
|
||||
|
||||
// GetSystemConfig loads various system configurations and bundles them into a map.
|
||||
@@ -90,17 +91,14 @@ func (c *Client) GetNamespaceConfig(namespace string) (config *NamespaceConfig,
|
||||
return
|
||||
}
|
||||
|
||||
switch {
|
||||
case config.ArtifactRepository.S3 != nil:
|
||||
{
|
||||
if config.ArtifactRepository.S3 == nil {
|
||||
return nil, util.NewUserError(codes.NotFound, "Artifact repository config not found.")
|
||||
}
|
||||
|
||||
accessKey, _ := base64.StdEncoding.DecodeString(secret.Data[config.ArtifactRepository.S3.AccessKeySecret.Key])
|
||||
config.ArtifactRepository.S3.AccessKey = string(accessKey)
|
||||
secretKey, _ := base64.StdEncoding.DecodeString(secret.Data[config.ArtifactRepository.S3.SecretKeySecret.Key])
|
||||
config.ArtifactRepository.S3.Secretkey = string(secretKey)
|
||||
}
|
||||
default:
|
||||
return nil, util.NewUserError(codes.NotFound, "Artifact repository config not found.")
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
@@ -174,6 +174,11 @@ func (s SystemConfig) DatabaseDriverName() *string {
|
||||
return s.GetValue("databaseDriverName")
|
||||
}
|
||||
|
||||
// Provider gets the ONEPANEL_PROVIDER value, or nil.
|
||||
func (s SystemConfig) Provider() *string {
|
||||
return s.GetValue("ONEPANEL_PROVIDER")
|
||||
}
|
||||
|
||||
// DatabaseConnection returns system config information to connect to a database
|
||||
func (s SystemConfig) DatabaseConnection() (driverName, dataSourceName string) {
|
||||
dataSourceName = fmt.Sprintf("host=%v user=%v password=%v dbname=%v sslmode=disable",
|
||||
@@ -243,6 +248,7 @@ func (s SystemConfig) HMACKey() []byte {
|
||||
// by the CLI. CLI will marshal this struct into the correct
|
||||
// YAML structure for k8s configmap / secret.
|
||||
type ArtifactRepositoryS3Provider struct {
|
||||
Source string
|
||||
KeyFormat string `yaml:"keyFormat"`
|
||||
Bucket string
|
||||
Endpoint string
|
||||
@@ -260,6 +266,7 @@ type ArtifactRepositoryS3Provider struct {
|
||||
// by the CLI. CLI will marshal this struct into the correct
|
||||
// YAML structure for k8s configmap / secret.
|
||||
type ArtifactRepositoryGCSProvider struct {
|
||||
Source string
|
||||
KeyFormat string `yaml:"keyFormat"`
|
||||
Bucket string
|
||||
Endpoint string
|
||||
|
135
pkg/data.go
Normal file
135
pkg/data.go
Normal file
@@ -0,0 +1,135 @@
|
||||
package v1
|
||||
|
||||
import (
|
||||
"github.com/onepanelio/core/pkg/util/data"
|
||||
"github.com/onepanelio/core/pkg/util/extensions"
|
||||
)
|
||||
|
||||
// createWorkspaceTemplateFromGenericFile will create the workspace template given by {{templateName}} with the contents
|
||||
// given by {{filename}} for the input {{namespace}}
|
||||
func (c *Client) createWorkspaceTemplateFromGenericManifest(namespace string, manifestFile *data.ManifestFile) (err error) {
|
||||
manifest, err := manifestFile.SpecString()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
templateName := manifestFile.Metadata.Name
|
||||
description := manifestFile.Metadata.Description
|
||||
|
||||
artifactRepositoryType, err := c.GetArtifactRepositoryType(namespace)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
replaceMap := map[string]string{
|
||||
"{{.ArtifactRepositoryType}}": artifactRepositoryType,
|
||||
}
|
||||
manifest = extensions.ReplaceMapValues(manifest, replaceMap)
|
||||
|
||||
workspaceTemplate, err := CreateWorkspaceTemplate(templateName)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
workspaceTemplate.Manifest = manifest
|
||||
|
||||
if description != nil {
|
||||
workspaceTemplate.Description = *description
|
||||
}
|
||||
|
||||
_, err = c.CreateWorkspaceTemplate(namespace, workspaceTemplate)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// updateWorkspaceTemplateManifest will update the workspace template given by {{templateName}} with the contents
|
||||
// given by {{filename}}
|
||||
func (c *Client) updateWorkspaceTemplateManifest(namespace string, manifestFile *data.ManifestFile) (err error) {
|
||||
manifest, err := manifestFile.SpecString()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
templateName := manifestFile.Metadata.Name
|
||||
|
||||
artifactRepositoryType, err := c.GetArtifactRepositoryType(namespace)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
replaceMap := map[string]string{
|
||||
"{{.ArtifactRepositoryType}}": artifactRepositoryType,
|
||||
}
|
||||
manifest = extensions.ReplaceMapValues(manifest, replaceMap)
|
||||
|
||||
workspaceTemplate, err := CreateWorkspaceTemplate(templateName)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
workspaceTemplate.Manifest = manifest
|
||||
|
||||
_, err = c.UpdateWorkspaceTemplateManifest(namespace, workspaceTemplate.UID, workspaceTemplate.Manifest)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// createWorkflowTemplate will create the workflow template given by {{templateName}} with the contents
|
||||
// given by {{filename}}
|
||||
func (c *Client) createWorkflowTemplateFromGenericManifest(namespace string, manifestFile *data.ManifestFile) (err error) {
|
||||
manifest, err := manifestFile.SpecString()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
templateName := manifestFile.Metadata.Name
|
||||
labels := manifestFile.Metadata.Labels
|
||||
|
||||
artifactRepositoryType, err := c.GetArtifactRepositoryType(namespace)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
replaceMap := map[string]string{
|
||||
"{{.ArtifactRepositoryType}}": artifactRepositoryType,
|
||||
}
|
||||
manifest = extensions.ReplaceMapValues(manifest, replaceMap)
|
||||
|
||||
workflowTemplate, err := CreateWorkflowTemplate(templateName)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
workflowTemplate.Manifest = manifest
|
||||
workflowTemplate.Labels = labels
|
||||
|
||||
_, err = c.CreateWorkflowTemplate(namespace, workflowTemplate)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// updateWorkflowTemplateManifest will update the workflow template given by {{templateName}} with the contents
|
||||
// given by {{filename}}
|
||||
func (c *Client) updateWorkflowTemplateManifest(namespace string, manifestFile *data.ManifestFile) (err error) {
|
||||
manifest, err := manifestFile.SpecString()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
templateName := manifestFile.Metadata.Name
|
||||
labels := manifestFile.Metadata.Labels
|
||||
|
||||
artifactRepositoryType, err := c.GetArtifactRepositoryType(namespace)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
replaceMap := map[string]string{
|
||||
"{{.ArtifactRepositoryType}}": artifactRepositoryType,
|
||||
}
|
||||
manifest = extensions.ReplaceMapValues(manifest, replaceMap)
|
||||
|
||||
workflowTemplate, err := CreateWorkflowTemplate(templateName)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
workflowTemplate.Manifest = manifest
|
||||
workflowTemplate.Labels = labels
|
||||
|
||||
_, err = c.CreateWorkflowTemplateVersion(namespace, workflowTemplate)
|
||||
|
||||
return
|
||||
}
|
100
pkg/inference_service.go
Normal file
100
pkg/inference_service.go
Normal file
@@ -0,0 +1,100 @@
|
||||
package v1
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/onepanelio/core/pkg/util"
|
||||
"google.golang.org/grpc/codes"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
"k8s.io/apimachinery/pkg/util/json"
|
||||
"k8s.io/client-go/kubernetes/scheme"
|
||||
"k8s.io/client-go/rest"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func modelRestClient() (*rest.RESTClient, error) {
|
||||
config := *NewConfig()
|
||||
config.GroupVersion = &schema.GroupVersion{Group: "serving.kubeflow.org", Version: "v1beta1"}
|
||||
config.APIPath = "/apis"
|
||||
config.NegotiatedSerializer = scheme.Codecs.WithoutConversion()
|
||||
|
||||
return rest.RESTClientFor(&config)
|
||||
}
|
||||
|
||||
// CreateInferenceService creates an InferenceService with KFServing
|
||||
func (c *Client) CreateInferenceService(deployment *InferenceService) error {
|
||||
resource := deployment.ToResource()
|
||||
|
||||
data, err := json.Marshal(resource)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
restClient, err := modelRestClient()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
err = restClient.Post().
|
||||
Namespace(deployment.Namespace).
|
||||
Name(deployment.Name).
|
||||
Resource(inferenceServiceResource).
|
||||
Body(data).
|
||||
Do().
|
||||
Error()
|
||||
|
||||
if err != nil && strings.Contains(err.Error(), "already exists") {
|
||||
return util.NewUserError(codes.AlreadyExists, fmt.Sprintf("InferenceService with name '%v' already exists", deployment.Name))
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// GetModelStatus returns the model's status
|
||||
func (c *Client) GetModelStatus(namespace, name string) (*InferenceServiceStatus, error) {
|
||||
restClient, err := modelRestClient()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
result := &k8sModel{}
|
||||
|
||||
err = restClient.Get().
|
||||
Namespace(namespace).
|
||||
Name(name).
|
||||
Resource(inferenceServiceResource).
|
||||
Do().
|
||||
Into(result)
|
||||
|
||||
if err != nil && strings.Contains(err.Error(), "not found") {
|
||||
return nil, util.NewUserError(codes.NotFound, "not found")
|
||||
}
|
||||
|
||||
predictURL := result.Status.URL
|
||||
suffixIndex := strings.LastIndex(result.Status.Address.URL, "cluster.local")
|
||||
if suffixIndex >= 0 {
|
||||
predictURL += result.Status.Address.URL[suffixIndex+13:]
|
||||
}
|
||||
|
||||
status := &InferenceServiceStatus{
|
||||
Conditions: result.Status.Conditions,
|
||||
Ready: result.Status.Ready(),
|
||||
PredictURL: predictURL,
|
||||
}
|
||||
|
||||
return status, err
|
||||
}
|
||||
|
||||
// DeleteModel deletes the model
|
||||
func (c *Client) DeleteModel(namespace, name string) error {
|
||||
restClient, err := modelRestClient()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return restClient.Delete().
|
||||
Namespace(namespace).
|
||||
Name(name).
|
||||
Resource(inferenceServiceResource).
|
||||
Do().
|
||||
Error()
|
||||
}
|
157
pkg/inference_service_types.go
Normal file
157
pkg/inference_service_types.go
Normal file
@@ -0,0 +1,157 @@
|
||||
package v1
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"time"
|
||||
)
|
||||
|
||||
const inferenceServiceResource = "InferenceServices"
|
||||
|
||||
// MachineResources are the cpu/memory limits
|
||||
type MachineResources struct {
|
||||
CPU string `json:"cpu,omitempty"`
|
||||
Memory string `json:"memory,omitempty"`
|
||||
}
|
||||
|
||||
// Resources represent the machine resource requests/limits
|
||||
type Resources struct {
|
||||
Limits *MachineResources `json:"limits,omitempty"`
|
||||
Requests *MachineResources `json:"requests,omitempty"`
|
||||
}
|
||||
|
||||
// Predictor contains information on what type of predictor we are using, and what resources it has available
|
||||
type Predictor struct {
|
||||
Name string `json:"-"`
|
||||
RuntimeVersion string `json:"runtimeVersion,omitempty"`
|
||||
StorageURI string `json:"storageUri"`
|
||||
Resources *Resources `json:"resources,omitempty"`
|
||||
NodeSelector map[string]string `json:"nodeSelector,omitempty"`
|
||||
}
|
||||
|
||||
// SetResources will set the cpu/memory requests/limits for the predictor. Empty strings are ignored
|
||||
func (p *Predictor) SetResources(minCPU, maxCPU, minMemory, maxMemory string) {
|
||||
if minCPU == "" && maxCPU == "" && minMemory == "" && maxMemory == "" {
|
||||
return
|
||||
}
|
||||
|
||||
p.Resources = &Resources{}
|
||||
if minCPU != "" || minMemory != "" {
|
||||
p.Resources.Requests = &MachineResources{
|
||||
CPU: minCPU,
|
||||
Memory: minMemory,
|
||||
}
|
||||
}
|
||||
|
||||
if maxCPU != "" || maxMemory != "" {
|
||||
p.Resources.Limits = &MachineResources{
|
||||
CPU: maxCPU,
|
||||
Memory: maxMemory,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// SetNodeSelector will set the node selector to the input label: selector value
|
||||
func (p *Predictor) SetNodeSelector(label, selector string) {
|
||||
p.NodeSelector = map[string]string{
|
||||
label: selector,
|
||||
}
|
||||
}
|
||||
|
||||
// Env is a name/value environment variable
|
||||
type Env struct {
|
||||
Name string `json:"name"`
|
||||
Value string `json:"value"`
|
||||
}
|
||||
|
||||
// TransformerContainer is a container specific to a Transformer
|
||||
type TransformerContainer struct {
|
||||
Image string `json:"image"`
|
||||
Name string `json:"name"`
|
||||
Env []Env `json:"env"`
|
||||
Resources *Resources `json:"resources,omitempty"`
|
||||
}
|
||||
|
||||
// Transformer is a unit that can convert model input and output to different formats in json
|
||||
type Transformer struct {
|
||||
Containers []TransformerContainer `json:"containers"`
|
||||
}
|
||||
|
||||
// InferenceService represents the information necessary to deploy an inference service
|
||||
type InferenceService struct {
|
||||
Name string
|
||||
Namespace string
|
||||
|
||||
Transformer *Transformer
|
||||
Predictor *Predictor
|
||||
}
|
||||
|
||||
// InferenceServiceStatus represents information about an InferenceService
|
||||
type InferenceServiceStatus struct {
|
||||
Ready bool
|
||||
Conditions []inferenceServiceCondition
|
||||
PredictURL string
|
||||
}
|
||||
|
||||
type inferenceServiceCondition struct {
|
||||
LastTransitionTime time.Time `json:"lastTransitionTime"`
|
||||
Status string `json:"status"`
|
||||
Type string `json:"type"`
|
||||
}
|
||||
|
||||
type inferenceServiceAddress struct {
|
||||
URL string `json:"url"`
|
||||
}
|
||||
|
||||
type inferenceServiceStatus struct {
|
||||
Conditions []inferenceServiceCondition `json:"conditions"`
|
||||
Address inferenceServiceAddress `json:"address"`
|
||||
URL string `json:"url"`
|
||||
}
|
||||
|
||||
// Ready returns true if there is a condition called Ready: true.
|
||||
func (m *inferenceServiceStatus) Ready() bool {
|
||||
for _, condition := range m.Conditions {
|
||||
if condition.Type == "Ready" && condition.Status == "True" {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
type k8sModel struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata" protobuf:"bytes,1,opt,name=metadata"`
|
||||
Status inferenceServiceStatus `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
// DeepCopyObject is a stub to support the interface
|
||||
func (k k8sModel) DeepCopyObject() runtime.Object {
|
||||
panic("implement me")
|
||||
}
|
||||
|
||||
// ToResource converts the InferenceService into a KFServing spec
|
||||
func (m *InferenceService) ToResource() interface{} {
|
||||
spec := map[string]interface{}{
|
||||
"predictor": map[string]interface{}{
|
||||
m.Predictor.Name: m.Predictor,
|
||||
},
|
||||
}
|
||||
|
||||
if m.Transformer != nil {
|
||||
spec["transformer"] = m.Transformer
|
||||
}
|
||||
|
||||
resource := map[string]interface{}{
|
||||
"apiVersion": "serving.kubeflow.org/v1beta1",
|
||||
"kind": "InferenceService",
|
||||
"metadata": map[string]string{
|
||||
"namespace": m.Namespace,
|
||||
"name": m.Name,
|
||||
},
|
||||
"spec": spec,
|
||||
}
|
||||
|
||||
return resource
|
||||
}
|
43
pkg/istio.go
Normal file
43
pkg/istio.go
Normal file
@@ -0,0 +1,43 @@
|
||||
package v1
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/onepanelio/core/pkg/util"
|
||||
"google.golang.org/grpc/codes"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
"k8s.io/client-go/kubernetes/scheme"
|
||||
"k8s.io/client-go/rest"
|
||||
"strings"
|
||||
)
|
||||
|
||||
const istioVirtualServiceResource = "VirtualServices"
|
||||
|
||||
func istioModelRestClient() (*rest.RESTClient, error) {
|
||||
config := *NewConfig()
|
||||
config.GroupVersion = &schema.GroupVersion{Group: "networking.istio.io", Version: "v1alpha3"}
|
||||
config.APIPath = "/apis"
|
||||
config.NegotiatedSerializer = scheme.Codecs.WithoutConversion()
|
||||
|
||||
return rest.RESTClientFor(&config)
|
||||
}
|
||||
|
||||
// CreateVirtualService creates an istio virtual service
|
||||
func (c *Client) CreateVirtualService(namespace string, data interface{}) error {
|
||||
restClient, err := istioModelRestClient()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
err = restClient.Post().
|
||||
Namespace(namespace).
|
||||
Resource(istioVirtualServiceResource).
|
||||
Body(data).
|
||||
Do().
|
||||
Error()
|
||||
|
||||
if err != nil && strings.Contains(err.Error(), "already exists") {
|
||||
return util.NewUserError(codes.AlreadyExists, fmt.Sprintf("VirtualService already exists"))
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user