From 4b6533cb14b933913454f1fd3c5db75adaa99353 Mon Sep 17 00:00:00 2001 From: tylertitsworth Date: Wed, 29 May 2024 08:50:25 -0700 Subject: [PATCH] add helm docs to pre-commit --- .pre-commit-config.yaml | 6 +- pytorch/charts/inference/.helmignore | 23 ------ pytorch/charts/inference/Chart.yaml | 38 --------- pytorch/charts/inference/README.md | 26 ------- .../charts/inference/templates/deploy.yaml | 74 ------------------ .../charts/inference/templates/service.yaml | 59 -------------- pytorch/charts/inference/values.yaml | 35 --------- pytorch/charts/training/.helmignore | 23 ------ pytorch/charts/training/Chart.yaml | 38 --------- pytorch/charts/training/README.md | 22 ------ pytorch/charts/training/templates/pvc.yaml | 26 ------- .../charts/training/templates/pytorchjob.yaml | 74 ------------------ pytorch/charts/training/values.yaml | 31 -------- tensorflow/charts/inference/.helmignore | 23 ------ tensorflow/charts/inference/Chart.yaml | 38 --------- tensorflow/charts/inference/README.md | 28 ------- .../charts/inference/templates/deploy.yaml | 58 -------------- .../charts/inference/templates/hpa.yaml | 26 ------- .../charts/inference/templates/service.yaml | 38 --------- tensorflow/charts/inference/values.yaml | 39 ---------- tensorflow/charts/training/.helmignore | 23 ------ tensorflow/charts/training/Chart.yaml | 38 --------- tensorflow/charts/training/README.md | 23 ------ .../charts/training/templates/mpijob.yaml | 77 ------------------- tensorflow/charts/training/templates/pvc.yaml | 26 ------- tensorflow/charts/training/values.yaml | 34 -------- 26 files changed, 5 insertions(+), 941 deletions(-) delete mode 100644 pytorch/charts/inference/.helmignore delete mode 100644 pytorch/charts/inference/Chart.yaml delete mode 100644 pytorch/charts/inference/README.md delete mode 100644 pytorch/charts/inference/templates/deploy.yaml delete mode 100644 pytorch/charts/inference/templates/service.yaml delete mode 100644 pytorch/charts/inference/values.yaml delete mode 100644 pytorch/charts/training/.helmignore delete mode 100644 pytorch/charts/training/Chart.yaml delete mode 100644 pytorch/charts/training/README.md delete mode 100644 pytorch/charts/training/templates/pvc.yaml delete mode 100644 pytorch/charts/training/templates/pytorchjob.yaml delete mode 100644 pytorch/charts/training/values.yaml delete mode 100644 tensorflow/charts/inference/.helmignore delete mode 100644 tensorflow/charts/inference/Chart.yaml delete mode 100644 tensorflow/charts/inference/README.md delete mode 100644 tensorflow/charts/inference/templates/deploy.yaml delete mode 100644 tensorflow/charts/inference/templates/hpa.yaml delete mode 100644 tensorflow/charts/inference/templates/service.yaml delete mode 100644 tensorflow/charts/inference/values.yaml delete mode 100644 tensorflow/charts/training/.helmignore delete mode 100644 tensorflow/charts/training/Chart.yaml delete mode 100644 tensorflow/charts/training/README.md delete mode 100644 tensorflow/charts/training/templates/mpijob.yaml delete mode 100644 tensorflow/charts/training/templates/pvc.yaml delete mode 100644 tensorflow/charts/training/values.yaml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b08c6ba1e..5b5b82f90 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -47,7 +47,11 @@ repos: - args: ["--config-file", ".github/linters/actionlint.yml"] id: actionlint repo: https://github.com/rhysd/actionlint - rev: v1.6.27 + rev: v1.7.0 +- hooks: + - id: helm-docs-container + repo: https://github.com/norwoodj/helm-docs + rev: v1.13.1 - hooks: - id: shfmt repo: https://github.com/cisagov/pre-commit-shfmt diff --git a/pytorch/charts/inference/.helmignore b/pytorch/charts/inference/.helmignore deleted file mode 100644 index 0e8a0eb36..000000000 --- a/pytorch/charts/inference/.helmignore +++ /dev/null @@ -1,23 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*.orig -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ diff --git a/pytorch/charts/inference/Chart.yaml b/pytorch/charts/inference/Chart.yaml deleted file mode 100644 index 014660114..000000000 --- a/pytorch/charts/inference/Chart.yaml +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright (c) 2024 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -apiVersion: v2 -name: torchserve -description: A Helm chart for Kubernetes - -# A chart can be either an 'application' or a 'library' chart. -# -# Application charts are a collection of templates that can be packaged into versioned archives -# to be deployed. -# -# Library charts provide useful utilities or functions for the chart developer. They're included as -# a dependency of application charts to inject those utilities and functions into the rendering -# pipeline. Library charts do not define any templates and therefore cannot be deployed. -type: application - -# This is the chart version. This version number should be incremented each time you make changes -# to the chart and its templates, including the app version. -# Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.0 - -# This is the version number of the application being deployed. This version number should be -# incremented each time you make changes to the application. Versions are not expected to -# follow Semantic Versioning. They should reflect the version the application is using. -# It is recommended to use it with quotes. -appVersion: "1.16.0" diff --git a/pytorch/charts/inference/README.md b/pytorch/charts/inference/README.md deleted file mode 100644 index 6a9822a63..000000000 --- a/pytorch/charts/inference/README.md +++ /dev/null @@ -1,26 +0,0 @@ -# TorchServe - -![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.16.0](https://img.shields.io/badge/AppVersion-1.16.0-informational?style=flat-square) - -A Helm chart for Kubernetes - -## Values - -| Key | Type | Default | Description | -|-----|------|---------|-------------| -| deploy.image | string | `"pytorch/torchserve:latest-cpu"` | | -| deploy.models | string | `"all"` | `=` space separated list of models to register on startup | -| deploy.modelConfig | string | `"/home/model-server/config.properties"` | Path to model server config file | -| deploy.replicas | string | `1` | | -| deploy.resources.limits.cpu | string | `32` | | -| deploy.resources.limits.memory | string | `"16Gi"` | | -| deploy.resources.requests.cpu | string | `"1000m"` | | -| deploy.resources.requests.memory | string | `"512Mi"` | | -| deploy.storage.nfs.path | string | `"nil"` | | -| deploy.storage.nfs.readOnly | bool | `true` | | -| deploy.storage.nfs.server | string | `"nil"` | | -| deploy.storage.nfs.subPath | string | `"nil"` | | -| name | string | `"ipex-serving"` | | -| service.type | string | `"NodePort"` | Service Type (NodePort or LoadBalancer) | - ->**Note:** AKS/EKS/GKS will distribute external IPs such that only a `LoadBalancer` is required, but on-prem clusters will by default require an ingress to distribute an external ip, so by default the service is created as a `NodePort` type so that any Node IP can be used to access the TorchServe API diff --git a/pytorch/charts/inference/templates/deploy.yaml b/pytorch/charts/inference/templates/deploy.yaml deleted file mode 100644 index 28225c09c..000000000 --- a/pytorch/charts/inference/templates/deploy.yaml +++ /dev/null @@ -1,74 +0,0 @@ -# Copyright (c) 2024 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ .Values.name }} -spec: - replicas: {{ .Values.deploy.replicas }} - selector: - matchLabels: - app: {{ .Values.name }} - template: - metadata: - labels: - app: {{ .Values.name }} - spec: - containers: - - name: torchserve - image: {{ .Values.deploy.image }} - args: - - 'torchserve' - - '--start' - - '--ts-config' - - {{ .Values.deploy.modelConfig }} - - '--model-store' - - 'store' - - '--workflow-store' - - 'store' - - '--models' - - {{ .Values.deploy.models }} - ports: - - name: rest-1 - containerPort: 8080 - - name: rest-2 - containerPort: 8081 - - name: rest-3 - containerPort: 8082 - - name: grpc-1 - containerPort: 7070 - - name: grpc-2 - containerPort: 7071 - volumeMounts: - - name: model - mountPath: /home/model-server/store - subPath: {{ .Values.deploy.storage.nfs.subPath }} - resources: - requests: - cpu: {{ .Values.deploy.resources.requests.cpu }} - memory: {{ .Values.deploy.resources.requests.memory }} - limits: - cpu: {{ .Values.deploy.resources.limits.cpu }} - memory: {{ .Values.deploy.resources.limits.memory }} - securityContext: - fsGroup: 1000 - runAsUser: 1000 - volumes: - - name: model - nfs: - server: {{ .Values.deploy.storage.nfs.server }} - path: {{ .Values.deploy.storage.nfs.path }} - readOnly: {{ .Values.deploy.storage.nfs.readOnly }} - emptyDir: {} diff --git a/pytorch/charts/inference/templates/service.yaml b/pytorch/charts/inference/templates/service.yaml deleted file mode 100644 index cff88f089..000000000 --- a/pytorch/charts/inference/templates/service.yaml +++ /dev/null @@ -1,59 +0,0 @@ -# Copyright (c) 2024 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - ---- -apiVersion: v1 -kind: Service -metadata: - name: {{ .Values.name }} -spec: - ports: - - name: rest-1 - {{- if eq .Values.service.type "NodePort" }} - nodePort: 30000 - {{- else }} - targetPort: 30000 - {{- end }} - port: 8080 - - name: rest-2 - {{- if eq .Values.service.type "NodePort" }} - nodePort: 30001 - {{- else }} - targetPort: 30001 - {{- end }} - port: 8081 - - name: rest-3 - {{- if eq .Values.service.type "NodePort" }} - nodePort: 30002 - {{- else }} - targetPort: 30002 - {{- end }} - port: 8082 - - name: grpc-1 - {{- if eq .Values.service.type "NodePort" }} - nodePort: 30003 - {{- else }} - targetPort: 30003 - {{- end }} - port: 7070 - - name: grpc-2 - {{- if eq .Values.service.type "NodePort" }} - nodePort: 30004 - {{- else }} - targetPort: 30004 - {{- end }} - port: 7071 - selector: - app: {{ .Values.name }} - type: {{ .Values.service.type }} diff --git a/pytorch/charts/inference/values.yaml b/pytorch/charts/inference/values.yaml deleted file mode 100644 index 215a83186..000000000 --- a/pytorch/charts/inference/values.yaml +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (c) 2024 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: ipex-serving -deploy: - image: pytorch/torchserve:latest-cpu - models: all - modelConfig: /home/model-server/config.properties - replicas: 1 - resources: - limits: - cpu: 24 - memory: 16Gi - requests: - cpu: 1000m - memory: 512Mi - storage: - nfs: - server: nil - path: nil - readOnly: true - subPath: nil -service: - type: NodePort diff --git a/pytorch/charts/training/.helmignore b/pytorch/charts/training/.helmignore deleted file mode 100644 index 0e8a0eb36..000000000 --- a/pytorch/charts/training/.helmignore +++ /dev/null @@ -1,23 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*.orig -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ diff --git a/pytorch/charts/training/Chart.yaml b/pytorch/charts/training/Chart.yaml deleted file mode 100644 index 3124d5027..000000000 --- a/pytorch/charts/training/Chart.yaml +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright (c) 2024 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -apiVersion: v2 -name: IPEX Distributed -description: A Helm chart for Kubernetes - -# A chart can be either an 'application' or a 'library' chart. -# -# Application charts are a collection of templates that can be packaged into versioned archives -# to be deployed. -# -# Library charts provide useful utilities or functions for the chart developer. They're included as -# a dependency of application charts to inject those utilities and functions into the rendering -# pipeline. Library charts do not define any templates and therefore cannot be deployed. -type: application - -# This is the chart version. This version number should be incremented each time you make changes -# to the chart and its templates, including the app version. -# Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.0 - -# This is the version number of the application being deployed. This version number should be -# incremented each time you make changes to the application. Versions are not expected to -# follow Semantic Versioning. They should reflect the version the application is using. -# It is recommended to use it with quotes. -appVersion: "1.16.0" diff --git a/pytorch/charts/training/README.md b/pytorch/charts/training/README.md deleted file mode 100644 index 8819e0787..000000000 --- a/pytorch/charts/training/README.md +++ /dev/null @@ -1,22 +0,0 @@ -# IPEX Distributed - -![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.16.0](https://img.shields.io/badge/AppVersion-1.16.0-informational?style=flat-square) - -A Helm chart for Kubernetes - -## Values - -| Key | Type | Default | Description | -|-----|------|---------|-------------| -| imageName | string | `"intel/intel-optimized-pytorch"` | | -| imageTag | string | `"2.0.0-pip-multinode"` | | -| masterResources.cpu | int | `32` | Number of Compute for Master | -| masterResources.memory | string | `"16Gi"` | Amount of Memory for Master | -| metadata.name | string | `"ipex-distributed"` | | -| metadata.namespace | string | `"kubeflow"` | | -| pvcName | string | `"ipex"` | | -| pvcResources | string | `"2Gi"` | Amount of shared storage for workers and launcher | -| pvcScn | string | `"nil"` | PVC `StorageClassName` | -| workerResources.cpu | int | `32` | Number of Compute per Worker | -| workerResources.memory | string | `"16Gi"` | Amount of Memory per Worker | -| workers | int | `4` | Number of Workers | diff --git a/pytorch/charts/training/templates/pvc.yaml b/pytorch/charts/training/templates/pvc.yaml deleted file mode 100644 index d2a76641d..000000000 --- a/pytorch/charts/training/templates/pvc.yaml +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright (c) 2024 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: {{ .Values.pvcName }} - namespace: {{ .Values.metadata.namespace }} -spec: - storageClassName: {{ .Values.pvcScn }} - accessModes: - - "ReadWriteOnce" - resources: - requests: - storage: {{ .Values.pvcResources }} diff --git a/pytorch/charts/training/templates/pytorchjob.yaml b/pytorch/charts/training/templates/pytorchjob.yaml deleted file mode 100644 index 2e160a481..000000000 --- a/pytorch/charts/training/templates/pytorchjob.yaml +++ /dev/null @@ -1,74 +0,0 @@ -# Copyright (c) 2024 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -apiVersion: "kubeflow.org/v1" -kind: PyTorchJob -metadata: - name: {{ .Values.metadata.name }} - namespace: {{ .Values.metadata.namespace }} -spec: - pytorchReplicaSpecs: - Master: - replicas: 1 - template: - spec: - containers: - - name: pytorch - image: "{{ .Values.imageName }}:{{ .Values.imageTag }}" - imagePullPolicy: Always - command: - - torchrun - - myscript.py - resources: - limits: - cpu: {{ .Values.masterResources.cpu }} - memory: {{ .Values.masterResources.memory }} - volumeMounts: - - name: dataset-dir - mountPath: /tmp/output - volumes: - - name: dshm - emptyDir: - medium: Memory - - name: dataset-dir - persistentVolumeClaim: - claimName: {{ .Values.pvcName }} - Worker: - replicas: {{ .Values.workers }} - template: - spec: - containers: - - name: pytorch - image: "{{ .Values.imageName }}:{{ .Values.imageTag }}" - imagePullPolicy: Always - envFrom: - - configMapRef: - name: intel-proxy-config - command: - - torchrun - - myscript.py - resources: - limits: - cpu: {{ .Values.workerResources.cpu }} - memory: {{ .Values.workerResources.memory }} - volumeMounts: - - name: dataset-dir - mountPath: /tmp/output - volumes: - - name: dshm - emptyDir: - medium: Memory - - name: dataset-dir - persistentVolumeClaim: - claimName: {{ .Values.pvcName }} diff --git a/pytorch/charts/training/values.yaml b/pytorch/charts/training/values.yaml deleted file mode 100644 index 37dbb782c..000000000 --- a/pytorch/charts/training/values.yaml +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright (c) 2024 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -metadata: - name: ipex-distributed - namespace: kubeflow - -imageName: intel/intel-optimized-pytorch -imageTag: 2.0.0-pip-multinode -masterResources: - cpu: 32 - memory: 16Gi -workerResources: - cpu: 32 - memory: 16Gi -workers: 4 - -pvcName: ipex -pvcScn: nil -pvcResources: 2Gi diff --git a/tensorflow/charts/inference/.helmignore b/tensorflow/charts/inference/.helmignore deleted file mode 100644 index 0e8a0eb36..000000000 --- a/tensorflow/charts/inference/.helmignore +++ /dev/null @@ -1,23 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*.orig -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ diff --git a/tensorflow/charts/inference/Chart.yaml b/tensorflow/charts/inference/Chart.yaml deleted file mode 100644 index a3f0b4dd0..000000000 --- a/tensorflow/charts/inference/Chart.yaml +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright (c) 2024 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -apiVersion: v2 -name: tfserving -description: A Helm chart for Kubernetes - -# A chart can be either an 'application' or a 'library' chart. -# -# Application charts are a collection of templates that can be packaged into versioned archives -# to be deployed. -# -# Library charts provide useful utilities or functions for the chart developer. They're included as -# a dependency of application charts to inject those utilities and functions into the rendering -# pipeline. Library charts do not define any templates and therefore cannot be deployed. -type: application - -# This is the chart version. This version number should be incremented each time you make changes -# to the chart and its templates, including the app version. -# Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.0 - -# This is the version number of the application being deployed. This version number should be -# incremented each time you make changes to the application. Versions are not expected to -# follow Semantic Versioning. They should reflect the version the application is using. -# It is recommended to use it with quotes. -appVersion: "1.16.0" diff --git a/tensorflow/charts/inference/README.md b/tensorflow/charts/inference/README.md deleted file mode 100644 index 71f7c0075..000000000 --- a/tensorflow/charts/inference/README.md +++ /dev/null @@ -1,28 +0,0 @@ -# TensorFlow Serving - -![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.16.0](https://img.shields.io/badge/AppVersion-1.16.0-informational?style=flat-square) - -A Helm chart for Kubernetes - -## Values - -| Key | Type | Default | Description | -|-----|------|---------|-------------| -| deploy.image | string | `"intel/intel-extension-for-tensorflow:serving-cpu"` | | -| deploy.modelConfig | string | `nil` | Path to model server config file | -| deploy.resources.limits.cpu | string | `"4000m"` | | -| deploy.resources.limits.memory | string | `"2Gi"` | | -| deploy.resources.requests.cpu | string | `"1000m"` | | -| deploy.resources.requests.memory | string | `"512Mi"` | | -| deploy.storage.nfs.path | string | `"nil"` | | -| deploy.storage.nfs.readOnly | bool | `true` | | -| deploy.storage.nfs.server | string | `"nil"` | | -| deploy.storage.nfs.subPath | string | `"nil"` | | -| hpa.enable | bool | `false` | Use HorizontalPodAutoscaler for Distributed Inference | -| hpa.maxReplicas | int | `10` | | -| hpa.minReplicas | int | `1` | | -| hpa.targetCPUUtilizationPercentage | int | `80` | | -| name | string | `"itex-serving"` | | -| service.type | string | `"NodePort"` | Service Type (NodePort or LoadBalancer) | - ->**Note:** AKS/EKS/GKS will distribute external IPs such that only a `LoadBalancer` is required, but on-prem clusters will by default require an ingress to distribute an external ip, so by default the service is created as a `NodePort` type so that any Node IP can be used to access the TorchServe API diff --git a/tensorflow/charts/inference/templates/deploy.yaml b/tensorflow/charts/inference/templates/deploy.yaml deleted file mode 100644 index 93bb6a0a0..000000000 --- a/tensorflow/charts/inference/templates/deploy.yaml +++ /dev/null @@ -1,58 +0,0 @@ -# Copyright (c) 2024 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ .Values.name }} -spec: - replicas: 4 - selector: - matchLabels: - app: {{ .Values.name }} - template: - metadata: - labels: - app: {{ .Values.name }} - spec: - hostNetwork: true - containers: - - name: tf-serving - image: {{ .Values.deploy.image }} - {{- if ne .Values.deploy.modelConfig "nil" }} - args: - - '--model_config_file={{ .Values.deploy.modelConfig }}' - {{- end }} - ports: - - containerPort: 8501 - name: rest - - containerPort: 8500 - name: grpc - volumeMounts: - - name: model - mountPath: /models - subPath: {{ .Values.deploy.storage.nfs.subPath }} - resources: - requests: - cpu: {{ .Values.deploy.resources.requests.cpu }} - memory: {{ .Values.deploy.resources.requests.memory }} - limits: - cpu: {{ .Values.deploy.resources.limits.cpu }} - memory: {{ .Values.deploy.resources.limits.memory }} - volumes: - - name: model - nfs: - server: {{ .Values.deploy.storage.nfs.server }} - path: {{ .Values.deploy.storage.nfs.path }} - readOnly: {{ .Values.deploy.storage.nfs.readOnly }} diff --git a/tensorflow/charts/inference/templates/hpa.yaml b/tensorflow/charts/inference/templates/hpa.yaml deleted file mode 100644 index b44d6073c..000000000 --- a/tensorflow/charts/inference/templates/hpa.yaml +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright (c) 2024 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -apiVersion: autoscaling/v1 -kind: HorizontalPodAutoscaler -metadata: - name: {{ .Values.name }} -spec: - maxReplicas: {{ .Values.hpa.maxReplicas }} - minReplicas: {{ .Values.hpa.minReplicas }} - scaleTargetRef: - apiVersion: apps/v1 - kind: Deployment - name: {{ .Values.name }} - targetCPUUtilizationPercentage: {{ .Values.hpa.targetCPUUtilizationPercentage }} diff --git a/tensorflow/charts/inference/templates/service.yaml b/tensorflow/charts/inference/templates/service.yaml deleted file mode 100644 index 080936e91..000000000 --- a/tensorflow/charts/inference/templates/service.yaml +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright (c) 2024 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - ---- -apiVersion: v1 -kind: Service -metadata: - name: {{ .Values.name }} -spec: - ports: - - name: rest - {{- if eq .Values.service.type "NodePort" }} - nodePort: 30111 - {{- else }} - targetPort: 30111 - {{- end }} - port: 8501 - - name: grpc - {{- if eq .Values.service.type "NodePort" }} - nodePort: 30110 - {{- else }} - targetPort: 30110 - {{- end }} - port: 8500 - selector: - app: {{ .Values.name }} - type: {{ .Values.service.type }} diff --git a/tensorflow/charts/inference/values.yaml b/tensorflow/charts/inference/values.yaml deleted file mode 100644 index e98827b18..000000000 --- a/tensorflow/charts/inference/values.yaml +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (c) 2024 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: itex-serving -deploy: - image: intel/intel-extension-for-tensorflow:serving-cpu - modelConfig: nil - resources: - limits: - cpu: 4000m - memory: 4Gi - requests: - cpu: 1000m - memory: 512Mi - storage: - nfs: - server: nil - path: nil - readOnly: true - subPath: nil -service: - type: NodePort - -hpa: - enable: false - maxReplicas: 10 - minReplicas: 1 - targetCPUUtilizationPercentage: 80 diff --git a/tensorflow/charts/training/.helmignore b/tensorflow/charts/training/.helmignore deleted file mode 100644 index 0e8a0eb36..000000000 --- a/tensorflow/charts/training/.helmignore +++ /dev/null @@ -1,23 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*.orig -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ diff --git a/tensorflow/charts/training/Chart.yaml b/tensorflow/charts/training/Chart.yaml deleted file mode 100644 index b6b761604..000000000 --- a/tensorflow/charts/training/Chart.yaml +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright (c) 2024 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -apiVersion: v2 -name: ITEX Distributed -description: A Helm chart for Kubernetes - -# A chart can be either an 'application' or a 'library' chart. -# -# Application charts are a collection of templates that can be packaged into versioned archives -# to be deployed. -# -# Library charts provide useful utilities or functions for the chart developer. They're included as -# a dependency of application charts to inject those utilities and functions into the rendering -# pipeline. Library charts do not define any templates and therefore cannot be deployed. -type: application - -# This is the chart version. This version number should be incremented each time you make changes -# to the chart and its templates, including the app version. -# Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.0 - -# This is the version number of the application being deployed. This version number should be -# incremented each time you make changes to the application. Versions are not expected to -# follow Semantic Versioning. They should reflect the version the application is using. -# It is recommended to use it with quotes. -appVersion: "1.16.0" diff --git a/tensorflow/charts/training/README.md b/tensorflow/charts/training/README.md deleted file mode 100644 index ca009176c..000000000 --- a/tensorflow/charts/training/README.md +++ /dev/null @@ -1,23 +0,0 @@ -# ITEX Distributed - -![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.16.0](https://img.shields.io/badge/AppVersion-1.16.0-informational?style=flat-square) - -A Helm chart for Kubernetes - -## Values - -| Key | Type | Default | Description | -|-----|------|---------|-------------| -| imageName | string | `"intel/intel-optimized-tensorflow"` | | -| imageTag | string | `"2.12.0-pip-openmpi-multinode"` | | -| metadata.name | string | `"itex-distributed"` | | -| metadata.namespace | string | `"kubeflow"` | | -| pvcName | string | `"itex"` | | -| pvcResources | string | `"2Gi"` | Amount of shared storage for workers and launcher | -| pvcScn | string | `"nil"` | PVC `StorageClassName` | -| resources.cpu | int | `2` | Number of Compute for Launcher | -| resources.memory | string | `"4Gi"` | Amount of Memory for Launcher | -| slotsPerWorker | int | `1` | Number of Processes per Worker | -| workerResources.cpu | int | `4` | Number of Compute per Worker | -| workerResources.memory | string | `"8Gi"` | Amount of Memory per Worker | -| workers | int | `4` | Number of Workers | diff --git a/tensorflow/charts/training/templates/mpijob.yaml b/tensorflow/charts/training/templates/mpijob.yaml deleted file mode 100644 index 8d17cb92a..000000000 --- a/tensorflow/charts/training/templates/mpijob.yaml +++ /dev/null @@ -1,77 +0,0 @@ -# Copyright (c) 2024 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -apiVersion: kubeflow.org/v1 -kind: MPIJob -metadata: - name: {{ .Values.metadata.name }} - namespace: {{ .Values.metadata.namespace }} -spec: - slotsPerWorker: {{ .Values.slotsPerWorker }} - runPolicy: - cleanPodPolicy: None - mpiReplicaSpecs: - Launcher: - replicas: 1 - template: - spec: - hostIPC: true - containers: - - image: "{{ .Values.imageName }}:{{ .Values.imageTag }}" - name: mpi - command: - - horovodrun - args: - - --verbose - - -np - - {{ .Values.workers }} - - --hostfile - - /etc/mpi/hostfile - - python - - myscript.py - resources: - limits: - cpu: {{ .Values.resources.cpu }} - memory: {{ .Values.resources.memory }} - volumeMounts: - - name: dataset-dir - mountPath: /tmp/data - volumes: - - name: dshm - emptyDir: - medium: Memory - - name: dataset-dir - persistentVolumeClaim: - claimName: {{ .Values.pvcName }} - Worker: - replicas: {{ .Values.workers }} - template: - spec: - containers: - - image: "{{ .Values.imageName }}:{{ .Values.imageTag }}" - name: mpi - resources: - limits: - cpu: {{ .Values.workerResources.cpu }} - memory: {{ .Values.workerResources.memory }} - volumeMounts: - - name: dataset-dir - mountPath: /tmp/data - volumes: - - name: dshm - emptyDir: - medium: Memory - - name: dataset-dir - persistentVolumeClaim: - claimName: {{ .Values.pvcName }} diff --git a/tensorflow/charts/training/templates/pvc.yaml b/tensorflow/charts/training/templates/pvc.yaml deleted file mode 100644 index d2a76641d..000000000 --- a/tensorflow/charts/training/templates/pvc.yaml +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright (c) 2024 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: {{ .Values.pvcName }} - namespace: {{ .Values.metadata.namespace }} -spec: - storageClassName: {{ .Values.pvcScn }} - accessModes: - - "ReadWriteOnce" - resources: - requests: - storage: {{ .Values.pvcResources }} diff --git a/tensorflow/charts/training/values.yaml b/tensorflow/charts/training/values.yaml deleted file mode 100644 index d25fbb6d5..000000000 --- a/tensorflow/charts/training/values.yaml +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright (c) 2024 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -metadata: - name: itex-distributed - namespace: kubeflow - -imageName: intel/intel-optimized-tensorflow -imageTag: 2.12.0-pip-openmpi-multinode - -slotsPerWorker: 1 -workers: 4 - -pvcName: itex -pvcScn: nil -pvcResources: 2Gi - -resources: - cpu: 2 - memory: 4Gi -workerResources: - cpu: 4 - memory: 8Gi