Skip to content

Commit

Permalink
adding chart ai-structuring-0.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
softwarerecipes committed Nov 22, 2022
1 parent ac638b8 commit a35c5a1
Show file tree
Hide file tree
Showing 9 changed files with 487 additions and 0 deletions.
6 changes: 6 additions & 0 deletions charts/ai-structuring-0.8.0/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: v2
appVersion: 1.16.0
description: A Helm chart for Kubernetes
name: ai-structuring
type: application
version: 0.8.0
76 changes: 76 additions & 0 deletions charts/ai-structuring-0.8.0/configs/queryPipeline.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
{
"Nodes": [
{
"Node Class Name": "RawImageInputNode",
"Node Name": "Input",
"Thread Number": "1",
"Is Source Node": "true"
},
{
"Node Class Name": "CPUJpegDecoderNode",
"Node Name": "Decoder",
"Thread Number": "1",
"Is Source Node": "false"
},
{
"Node Class Name": "DetectionNode_CPU",
"Node Name": "Detection",
"Thread Number": "1",
"Is Source Node": "false",
"Configure String": "InferReqNumber=(INT)6;InferStreams=(INT)6;ModelPath=(STRING)vehicle-detection-evi-0.0.1/FP16-INT8/vehicle-detection-evi-001.xml;Threshold=(FLOAT)0.8;MaxROI=(INT)0;Converter=(STRING)SSD;Labels=(STRING_ARRAY)[vehicle]"
},
{
"Node Class Name": "AttributeNode_CPU",
"Node Name": "Attribute",
"Thread Number": "1",
"Is Source Node": "false",
"Configure String": "InferReqNumber=(INT)6;InferStreams=(INT)6;ModelPath=(STRING)vehicle-attributes-recognition-barrier-0039/FP16-INT8/vehicle-attributes-recognition-barrier-0039.xml;Categories=(STRING_ARRAY)[color,type];color=(STRING_ARRAY)[white,gray,yellow,red,green,blue,black];type=(STRING_ARRAY)[car,bus,truck,van]"
},
{
"Node Class Name": "FeatureExtractionNode_CPU",
"Node Name": "FeatureExtraction",
"Thread Number": "1",
"Is Source Node": "false",
"Configure String": "InferReqNumber=(INT)6;InferStreams=(INT)6;ModelPath=(STRING)fe-pytorch-0.0.1.xml;Threshold=(FLOAT)0.1;Quantization_Scale=(FLOAT)411.317"
},
{
"Node Class Name": "LLOutputNode",
"Node Name": "Output",
"Thread Number": "1",
"Is Source Node": "false",
"Configure String": "BufferType=(STRING)String"
}
],
"Links": [
{
"Previous Node": "Input",
"Previous Node Port": "0",
"Next Node": "Decoder",
"Next Node Port": "0"
},
{
"Previous Node": "Decoder",
"Previous Node Port": "0",
"Next Node": "Detection",
"Next Node Port": "0"
},
{
"Previous Node": "Detection",
"Previous Node Port": "0",
"Next Node": "Attribute",
"Next Node Port": "0"
},
{
"Previous Node": "Attribute",
"Previous Node Port": "0",
"Next Node": "FeatureExtraction",
"Next Node Port": "0"
},
{
"Previous Node": "FeatureExtraction",
"Previous Node Port": "0",
"Next Node": "Output",
"Next Node Port": "0"
}
]
}
76 changes: 76 additions & 0 deletions charts/ai-structuring-0.8.0/configs/strucPipeline.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
{
"Nodes": [
{
"Node Class Name": "StorageImageInputNode",
"Node Name": "Input",
"Thread Number": "1",
"Is Source Node": "true"
},
{
"Node Class Name": "CPUJpegDecoderNode",
"Node Name": "Decoder",
"Thread Number": "1",
"Is Source Node": "false"
},
{
"Node Class Name": "DetectionNode_CPU",
"Node Name": "Detection",
"Thread Number": "1",
"Is Source Node": "false",
"Configure String": "InferReqNumber=(INT)6;InferStreams=(INT)6;ModelPath=(STRING)vehicle-detection-evi-0.0.1/FP16-INT8/vehicle-detection-evi-001.xml;Threshold=(FLOAT)0.8;MaxROI=(INT)0;Converter=(STRING)SSD;Labels=(STRING_ARRAY)[vehicle]"
},
{
"Node Class Name": "AttributeNode_CPU",
"Node Name": "Attribute",
"Thread Number": "1",
"Is Source Node": "false",
"Configure String": "InferReqNumber=(INT)6;InferStreams=(INT)6;ModelPath=(STRING)vehicle-attributes-recognition-barrier-0039/FP16-INT8/vehicle-attributes-recognition-barrier-0039.xml;Categories=(STRING_ARRAY)[color,type];color=(STRING_ARRAY)[white,gray,yellow,red,green,blue,black];type=(STRING_ARRAY)[car,bus,truck,van]"
},
{
"Node Class Name": "FeatureExtractionNode_CPU",
"Node Name": "FeatureExtraction",
"Thread Number": "1",
"Is Source Node": "false",
"Configure String": "InferReqNumber=(INT)6;InferStreams=(INT)6;ModelPath=(STRING)fe-pytorch-0.0.1.xml;Threshold=(FLOAT)0.1;Quantization_Scale=(FLOAT)411.317"
},
{
"Node Class Name": "LLResultSinkNode",
"Node Name": "Output",
"Thread Number": "1",
"Is Source Node": "false",
"Configure String": "BufferType=(STRING)String"
}
],
"Links": [
{
"Previous Node": "Input",
"Previous Node Port": "0",
"Next Node": "Decoder",
"Next Node Port": "0"
},
{
"Previous Node": "Decoder",
"Previous Node Port": "0",
"Next Node": "Detection",
"Next Node Port": "0"
},
{
"Previous Node": "Detection",
"Previous Node Port": "0",
"Next Node": "Attribute",
"Next Node Port": "0"
},
{
"Previous Node": "Attribute",
"Previous Node Port": "0",
"Next Node": "FeatureExtraction",
"Next Node Port": "0"
},
{
"Previous Node": "FeatureExtraction",
"Previous Node Port": "0",
"Next Node": "Output",
"Next Node Port": "0"
}
]
}
128 changes: 128 additions & 0 deletions charts/ai-structuring-0.8.0/configs/videoStrucPipeline.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
{
"Nodes": [
{
"Node Class Name": "StorageVideoInputNode",
"Node Name": "Input",
"Thread Number": "1",
"Is Source Node": "true"
},
{
"Node Class Name": "VideoDecoderNode",
"Node Name": "Decoder",
"Thread Number": "1",
"Is Source Node": "false"
},
{
"Node Class Name": "DetectionNode_CPU",
"Node Name": "Detection",
"Thread Number": "1",
"Is Source Node": "false",
"Configure String": "InferReqNumber=(INT)6;InferStreams=(INT)6;ModelPath=(STRING)vehicle-detection-evi-0.0.1/FP16-INT8/vehicle-detection-evi-001.xml;Threshold=(FLOAT)0.8;MaxROI=(INT)0;Converter=(STRING)SSD;Labels=(STRING_ARRAY)[vehicle]"
},
{
"Node Class Name": "TrackerNode_CPU",
"Node Name": "Tracker",
"Thread Number": "1",
"Is Source Node": "false",
"Configure String": "DropLen=(INT)5;ConfDecay=(FLOAT)0.85;DetectionFrameSkip=(INT)1"
},
{
"Node Class Name": "QualityAssessNode",
"Node Name": "QualityAssess",
"Thread Number": "1",
"Is Source Node": "false",
"Configure String": "InferReqNumber=(INT)6;InferStreams=(INT)6;QualityMode=(INT)1;ImageSize=(INT)320;ModelPath=(STRING)vehicle-qnet-0.0.1/FP16/quality-assess-001.xml;InferStreams=(INT)0"
},
{
"Node Class Name": "ObjectSelectNode",
"Node Name": "Select",
"Thread Number": "1",
"Is Source Node": "false",
"Configure String": "FrameInterval=(INT)30;TopK=(INT)1"
},
{
"Node Class Name": "StorageImageUploadNode",
"Node Name": "UploadImage",
"Thread Number": "1",
"Is Source Node": "false",
"Configure String": "MediaType=(STRING)video;DataSource=(STRING)vehicle"
},
{
"Node Class Name": "AttributeNode_CPU",
"Node Name": "Attribute",
"Thread Number": "1",
"Is Source Node": "false",
"Configure String": "InferReqNumber=(INT)6;InferStreams=(INT)6;ModelPath=(STRING)vehicle-attributes-recognition-barrier-0039/FP16-INT8/vehicle-attributes-recognition-barrier-0039.xml;Categories=(STRING_ARRAY)[color,type];color=(STRING_ARRAY)[white,gray,yellow,red,green,blue,black];type=(STRING_ARRAY)[car,bus,truck,van]"
},
{
"Node Class Name": "FeatureExtractionNode_CPU",
"Node Name": "FeatureExtraction",
"Thread Number": "1",
"Is Source Node": "false",
"Configure String": "InferReqNumber=(INT)6;InferStreams=(INT)6;ModelPath=(STRING)fe-pytorch-0.0.1.xml;Threshold=(FLOAT)0.1;Quantization_Scale=(FLOAT)411.317"
},
{
"Node Class Name": "LLResultSinkNode",
"Node Name": "Output",
"Thread Number": "1",
"Is Source Node": "false",
"Configure String": "BufferType=(STRING)String"
}
],
"Links": [
{
"Previous Node": "Input",
"Previous Node Port": "0",
"Next Node": "Decoder",
"Next Node Port": "0"
},
{
"Previous Node": "Decoder",
"Previous Node Port": "0",
"Next Node": "Detection",
"Next Node Port": "0"
},
{
"Previous Node": "Detection",
"Previous Node Port": "0",
"Next Node": "Tracker",
"Next Node Port": "0"
},
{
"Previous Node": "Tracker",
"Previous Node Port": "0",
"Next Node": "QualityAssess",
"Next Node Port": "0"
},
{
"Previous Node": "QualityAssess",
"Previous Node Port": "0",
"Next Node": "Select",
"Next Node Port": "0"
},
{
"Previous Node": "Select",
"Previous Node Port": "0",
"Next Node": "UploadImage",
"Next Node Port": "0"
},
{
"Previous Node": "UploadImage",
"Previous Node Port": "0",
"Next Node": "Attribute",
"Next Node Port": "0"
},
{
"Previous Node": "Attribute",
"Previous Node Port": "0",
"Next Node": "FeatureExtraction",
"Next Node Port": "0"
},
{
"Previous Node": "FeatureExtraction",
"Previous Node Port": "0",
"Next Node": "Output",
"Next Node Port": "0"
}
]
}
20 changes: 20 additions & 0 deletions charts/ai-structuring-0.8.0/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# INTEL CONFIDENTIAL
#
# Copyright (C) 2022 Intel Corporation.
#
# This software and the related documents are Intel copyrighted materials, and your use of
# them is governed by the express license under which they were provided to you (License).
# Unless the License provides otherwise, you may not use, modify, copy, publish, distribute,
# disclose or transmit this software or the related documents without Intel's prior written permission.
#
# This software and the related documents are provided as is, with no express or implied warranties,
# other than those that are expressly stated in the License.

---
apiVersion: v1
kind: ConfigMap
metadata:
namespace: {{ .Values.global.namespace.value }}
name: {{ .Values.configMap.name }}
data:
{{ (.Files.Glob "configs/**.json").AsConfig | indent 2 }}
88 changes: 88 additions & 0 deletions charts/ai-structuring-0.8.0/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# INTEL CONFIDENTIAL
#
# Copyright (C) 2022 Intel Corporation.
#
# This software and the related documents are Intel copyrighted materials, and your use of
# them is governed by the express license under which they were provided to you (License).
# Unless the License provides otherwise, you may not use, modify, copy, publish, distribute,
# disclose or transmit this software or the related documents without Intel's prior written permission.
#
# This software and the related documents are provided as is, with no express or implied warranties,
# other than those that are expressly stated in the License.

---
{{- if .Values.global.namespace.create -}}
apiVersion: v1
kind: Namespace
metadata:
name: {{ .Values.global.namespace.value }}
{{ if .Values.global.namespace.istioInjection.create }}
labels:
istio-injection: enabled
{{ end }}
{{- end -}}

---
apiVersion: apps/v1
kind: Deployment
metadata:
name: evi-ai-structuring
namespace: {{ .Values.global.namespace.value }}
annotations:
container.apparmor.security.beta.kubernetes.io/ai-structuring: runtime/default
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app: ai-structuring
version: v1
template:
metadata:
labels:
app: ai-structuring
version: v1
spec:
nodeSelector:
feature.node.kubernetes.io/cpu-cpuid.AVX512VNNI: 'true'
feature.node.kubernetes.io/cpu-cpuid.AVX2: 'true'
securityContext:
seccompProfile:
type: RuntimeDefault
serviceAccountName: ai-structuring
{{ if .Values.global.nodeAffinity.create }}
affinity:
nodeAffinity:
required:
nodeSelectorTerms:
- matchExpressions:
- key: {{ .Values.global.nodeAffinity.key }}
operator: In
values:
- {{ .Values.global.nodeAffinity.value }}
{{ end }}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.Version }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
workingDir: /opt/ai_structuring/build
command: ["./ai_structuring"]
args: ["0.0.0.0", "{{ .Values.image.containerPort }}", "8", "{{ .Values.aiInference.addr }}", "{{ .Values.aiInference.port }}"]
ports:
- containerPort: {{ .Values.image.containerPort }}
volumeMounts:
- name: config-volume
mountPath: /opt/ai_structuring/config
securityContext:
# readOnlyRootFilesystem: true
allowPrivilegeEscalation: false
resources:
limits:
cpu: "8"
memory: 10Gi
requests:
cpu: 500m
memory: 200Mi
volumes:
- name: config-volume
configMap:
name: {{ .Values.configMap.name }}
Loading

0 comments on commit a35c5a1

Please sign in to comment.