Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: ai-example-trustyai-demo
1 change: 1 addition & 0 deletions tenants/ai-example/namespaces/base/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ resources:
- ai-example-single-model-serving-namespace.yaml
- ai-example-training-namespace.yaml
- ai-example-lmeval-lab-namespace.yaml
- ai-example-trustyai-demo-namespace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
apiVersion: serving.kserve.io/v1beta1
kind: InferenceService
metadata:
annotations:
openshift.io/display-name: demo-loan-nn-onnx-alpha
# security.opendatahub.io/enable-auth: "true"
serving.knative.openshift.io/enablePassthrough: "true"
sidecar.istio.io/inject: "true"
sidecar.istio.io/rewriteAppHTTPProbers: "true"
labels:
opendatahub.io/dashboard: "true"
name: demo-loan-nn-onnx-alpha
spec:
predictor:
maxReplicas: 1
minReplicas: 1
model:
modelFormat:
name: onnx
version: '1'
resources:
limits:
cpu: '2'
memory: 8Gi
requests:
cpu: '2'
memory: 8Gi
runtime: ovms-1.x
storage:
key: aws-connection-trustyai-demo
path: ovms/loan_model_alpha
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
apiVersion: serving.kserve.io/v1beta1
kind: InferenceService
metadata:
annotations:
openshift.io/display-name: demo-loan-nn-onnx-beta
# security.opendatahub.io/enable-auth: "true"
serving.knative.openshift.io/enablePassthrough: "true"
sidecar.istio.io/inject: "true"
sidecar.istio.io/rewriteAppHTTPProbers: "true"
labels:
opendatahub.io/dashboard: "true"
name: demo-loan-nn-onnx-beta
spec:
predictor:
maxReplicas: 1
minReplicas: 1
model:
modelFormat:
name: onnx
version: '1'
resources:
limits:
cpu: '2'
memory: 8Gi
requests:
cpu: '2'
memory: 8Gi
runtime: ovms-1.x
storage:
key: aws-connection-trustyai-demo
path: ovms/loan_model_beta
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

namespace: ai-example-trustyai-demo

resources:
- inference-service-alpha.yaml
- inference-service-beta.yaml
- serving-runtime.yaml
68 changes: 68 additions & 0 deletions tenants/ai-example/trustyai-demo-bias/base/serving-runtime.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
apiVersion: serving.kserve.io/v1alpha1
kind: ServingRuntime
metadata:
annotations:
opendatahub.io/accelerator-name: ""
opendatahub.io/apiProtocol: REST
opendatahub.io/recommended-accelerators: '["nvidia.com/gpu"]'
opendatahub.io/template-display-name: OpenVINO Model Server
opendatahub.io/template-name: kserve-ovms
openshift.io/display-name: ovms-1.x
prometheus.io/path: /metrics
prometheus.io/port: "8888"
labels:
opendatahub.io/dashboard: "true"
name: ovms-1.x
spec:
annotations:
prometheus.io/path: /metrics
prometheus.io/port: "8080"
openshift.io/display-name: ovms-1.x
labels:
opendatahub.io/dashboard: "true"
containers:
- name: kserve-container
image: quay.io/opendatahub/openvino_model_server:stable-nightly-2024-08-04
args:
- --model_name={{.Name}}
- --port=8001
- --rest_port=8888
- --model_path=/mnt/models
- --file_system_poll_wait_seconds=0
- --grpc_bind_address=0.0.0.0
- --rest_bind_address=0.0.0.0
- --target_device=AUTO
- --metrics_enable
ports:
- containerPort: 8888
protocol: TCP
volumeMounts:
- mountPath: /dev/shm
name: shm
multiModel: false
protocolVersions:
- v2
- grpc-v2
supportedModelFormats:
- autoSelect: true
name: openvino_ir
version: opset13
- name: onnx
version: "1"
- autoSelect: true
name: tensorflow
version: "1"
- autoSelect: true
name: tensorflow
version: "2"
- autoSelect: true
name: paddle
version: "2"
- autoSelect: true
name: pytorch
version: "2"
volumes:
- emptyDir:
medium: Memory
sizeLimit: 2Gi
name: shm
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- ../../base
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
apiVersion: serving.kserve.io/v1beta1
kind: InferenceService
metadata:
annotations:
openshift.io/display-name: gaussian-credit-model
# security.opendatahub.io/enable-auth: "true"
serving.knative.openshift.io/enablePassthrough: "true"
sidecar.istio.io/inject: "true"
sidecar.istio.io/rewriteAppHTTPProbers: "true"
labels:
opendatahub.io/dashboard: "true"
modelClass: xgboost
name: gaussian-credit-model
spec:
predictor:
model:
modelFormat:
name: xgboost
runtime: kserve-mlserver
storage:
key: aws-connection-trustyai-demo
path: sklearn/gaussian_credit_model/1/
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

namespace: ai-example-trustyai-demo

resources:
- inference-service.yaml
- serving-runtime.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
apiVersion: serving.kserve.io/v1alpha1
kind: ServingRuntime
metadata:
annotations:
opendatahub.io/accelerator-name: ""
opendatahub.io/recommended-accelerators: '["nvidia.com/gpu"]'
opendatahub.io/template-display-name: KServe MLServer
opendatahub.io/template-name: kserve-mlservers
openshift.io/display-name: mlserver-1.x
prometheus.io/path: /metrics
prometheus.io/port: "8888"
labels:
opendatahub.io/dashboard: "true"
name: kserve-mlserver
spec:
annotations:
prometheus.io/path: /metrics
prometheus.io/port: "8080"
openshift.io/display-name: ovms-1.x
labels:
opendatahub.io/dashboard: "true"
containers:
- name: kserve-container
image: quay.io/trustyai_testing/mlserver:1.6.1
env:
- name: "MLSERVER_MODEL_IMPLEMENTATION"
value: "{{.Labels.modelClass}}"
- name: "MLSERVER_HTTP_PORT"
value: "8080"
- name: "MLSERVER_GRPC_PORT"
value: "9000"
- name: "MODELS_DIR"
value: "/mnt/models/"
resources:
requests:
cpu: "1"
memory: 2Gi
limits:
cpu: "1"
memory: 2Gi
supportedModelFormats:
- name: sklearn
version: "0"
autoSelect: true
priority: 2
- name: sklearn
version: "1"
autoSelect: true
priority: 2
- name: xgboost
version: "1"
autoSelect: true
priority: 2
- name: xgboost
version: "2"
autoSelect: true
priority: 2
- name: lightgbm
version: "3"
autoSelect: true
priority: 2
- name: lightgbm
version: "4"
autoSelect: true
priority: 2
- name: mlflow
version: "1"
autoSelect: true
priority: 1
- name: mlflow
version: "2"
autoSelect: true
priority: 1
protocolVersions:
- v2
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- ../../base
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
kind: Secret
apiVersion: v1
metadata:
name: aws-connection-trustyai-demo
labels:
opendatahub.io/dashboard: 'true'
opendatahub.io/managed: 'true'
annotations:
opendatahub.io/connection-type: s3
openshift.io/display-name: Data Connection for trustyai demos
argocd.argoproj.io/sync-wave: "-100"
stringData:
AWS_ACCESS_KEY_ID: minio
AWS_S3_BUCKET: modelmesh-example-models
AWS_S3_ENDPOINT: http://minio.ai-example-trustyai-demo.svc.cluster.local:9000
AWS_SECRET_ACCESS_KEY: minio123
type: Opaque
73 changes: 73 additions & 0 deletions tenants/ai-example/trustyai-demo-minio/base/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
kind: Deployment
apiVersion: apps/v1
metadata:
name: minio
spec:
replicas: 1
selector:
matchLabels:
app: minio
template:
metadata:
creationTimestamp: null
labels:
app: minio
spec:
containers:
- resources:
limits:
cpu: 250m
memory: 1Gi
requests:
cpu: 20m
memory: 100Mi
readinessProbe:
tcpSocket:
port: 9000
initialDelaySeconds: 5
timeoutSeconds: 1
periodSeconds: 5
successThreshold: 1
failureThreshold: 3
terminationMessagePath: /dev/termination-log
name: minio
livenessProbe:
tcpSocket:
port: 9000
initialDelaySeconds: 30
timeoutSeconds: 1
periodSeconds: 5
successThreshold: 1
failureThreshold: 3
env:
- name: MINIO_ROOT_USER
valueFrom:
secretKeyRef:
name: minio
key: minio_root_user
- name: MINIO_ROOT_PASSWORD
valueFrom:
secretKeyRef:
name: minio
key: minio_root_password
ports:
- containerPort: 9000
protocol: TCP
- containerPort: 9090
protocol: TCP
imagePullPolicy: IfNotPresent
terminationMessagePolicy: File
image: >-
quay.io/trustyai_testing/modelmesh-minio-examples:latest
args:
- server
- /data1
restartPolicy: Always
terminationGracePeriodSeconds: 30
dnsPolicy: ClusterFirst
securityContext: {}
schedulerName: default-scheduler
strategy:
type: Recreate
revisionHistoryLimit: 10
progressDeadlineSeconds: 600
22 changes: 22 additions & 0 deletions tenants/ai-example/trustyai-demo-minio/base/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

namespace: ai-example-trustyai-demo

labels:
- includeSelectors: true
pairs:
app: minio
- includeSelectors: false
pairs:
app.kubernetes.io/component: minio

resources:
- deployment.yaml
- routes.yaml
- secret.yaml
- service.yaml
- trustyai_service.yaml
- service_account.yaml
- role_binding.yaml
- data-connection.yaml
11 changes: 11 additions & 0 deletions tenants/ai-example/trustyai-demo-minio/base/role_binding.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: user-one-view
subjects:
- kind: ServiceAccount
name: user-one
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: view
Loading