diff --git a/charts/incubator/whisper-asr-webservice/.helmignore b/charts/incubator/whisper-asr-webservice/.helmignore new file mode 100644 index 00000000000..77ca5567b26 --- /dev/null +++ b/charts/incubator/whisper-asr-webservice/.helmignore @@ -0,0 +1,30 @@ +# 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 +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ +# OWNERS file for Kubernetes +OWNERS +# helm-docs templates +*.gotmpl +# docs folder +/docs +# icon +icon.png diff --git a/charts/incubator/whisper-asr-webservice/CHANGELOG.md b/charts/incubator/whisper-asr-webservice/CHANGELOG.md new file mode 100644 index 00000000000..825c32f0d03 --- /dev/null +++ b/charts/incubator/whisper-asr-webservice/CHANGELOG.md @@ -0,0 +1 @@ +# Changelog diff --git a/charts/incubator/whisper-asr-webservice/Chart.yaml b/charts/incubator/whisper-asr-webservice/Chart.yaml new file mode 100644 index 00000000000..628542d11c9 --- /dev/null +++ b/charts/incubator/whisper-asr-webservice/Chart.yaml @@ -0,0 +1,28 @@ +apiVersion: v2 +appVersion: "1.1.0" +dependencies: + - name: common + repository: https://library-charts.truecharts.org + version: 12.10.4 +deprecated: false +description: Whisper is a general-purpose speech recognition model. +home: https://truecharts.org/charts/incubator/whisper-asr-webservice +icon: https://truecharts.org/img/hotlink-ok/chart-icons/whisper-asr-webservice.png +keywords: + - whisper-asr-webservice + - machine-learning +kubeVersion: ">=1.16.0-0" +maintainers: + - email: info@truecharts.org + name: TrueCharts + url: https://truecharts.org +name: whisper-asr-webservice +sources: + - https://github.com/truecharts/charts/tree/master/charts/incubator/whisper-asr-webservice + - https://github.com/ahmetoner/whisper-asr-webservice +type: application +version: 0.0.1 +annotations: + truecharts.org/catagories: | + - machine-learning + truecharts.org/SCALE-support: "true" diff --git a/charts/incubator/whisper-asr-webservice/README.md b/charts/incubator/whisper-asr-webservice/README.md new file mode 100644 index 00000000000..7e59600739c --- /dev/null +++ b/charts/incubator/whisper-asr-webservice/README.md @@ -0,0 +1 @@ +# README diff --git a/charts/incubator/whisper-asr-webservice/docs/installation_notes.md b/charts/incubator/whisper-asr-webservice/docs/installation_notes.md new file mode 100644 index 00000000000..8c88eb89e17 --- /dev/null +++ b/charts/incubator/whisper-asr-webservice/docs/installation_notes.md @@ -0,0 +1,37 @@ +# Installation Notes + +A quick run down on the options available for **whisper-asr-webservice**. + +The main service runs a Interactive Swagger API documentation is available at + +## Models + +The **ASR Model** has the following values: + +| Model | Required VRAM | Relative speed | +|---------|--------------|----------------| +| tiny | ~1 GB | ~32x | +| base | ~1 GB | ~16x | +| small | ~2 GB | ~6x | +| medium | ~5 GB | ~2x | +| large | ~10 GB | ~1x | + +Default is **Base**. + +## Engines + +The **ASR Engine** is default to **Faster Whisper**, explained [here](https://github.com/guillaumekln/faster-whisper#faster-whisper-transcription-with-ctranslate2). + +A list of Engines available. + +| Engines | +|--------------------| +| Faster Whisper | +| OpenAI Whisper | + +## Cache + +> The ASR model is downloaded each time you start the container, using the large model this can take some time. If you want to decrease the time it takes to start your container by skipping the download, you can store the cache directory (/root/.cache/whisper) to an persistent storage. Next time you start your container the ASR Model will be taken from the cache instead of being downloaded again. +Important this will prevent you from receiving any updates to the models. + +You can set the pre-persisted mount **whisper** as emptyDir and set it as default or memory if you have the ram for it. diff --git a/charts/incubator/whisper-asr-webservice/icon.png b/charts/incubator/whisper-asr-webservice/icon.png new file mode 100644 index 00000000000..b6577cb89af Binary files /dev/null and b/charts/incubator/whisper-asr-webservice/icon.png differ diff --git a/charts/incubator/whisper-asr-webservice/questions.yaml b/charts/incubator/whisper-asr-webservice/questions.yaml new file mode 100644 index 00000000000..16d6036643e --- /dev/null +++ b/charts/incubator/whisper-asr-webservice/questions.yaml @@ -0,0 +1,162 @@ +# Include{groups} +portals: + open: +# Include{portalLink} +questions: +# Include{global} +# Include{workload} +# Include{workloadDeployment} + +# Include{replicas1} +# Include{podSpec} +# Include{containerMain} + - variable: imageSelector + label: Select Image + schema: + type: string + default: image + enum: + - value: image + description: CPU + - value: gpuImage + description: GPU + + - variable: env + label: Image Environment + schema: + additional_attrs: true + type: dict + attrs: + - variable: ASR_MODEL + label: ASR Model + schema: + type: string + required: true + default: base + enum: + - value: tiny + description: Tiny + - value: base + description: Base + - value: small + description: Small + - value: medium + description: Medium + - value: large + description: Large + - value: large-v1 + description: Large V1 + - value: large-v2 + description: Large V2 + - variable: ASR_ENGINE + label: ASR Engine + schema: + type: string + required: true + default: faster_whisper + enum: + - value: openai_whisper + description: OpenAI Whisper + - value: faster_whisper + description: Faster Whisper +# Include{containerBasic} +# Include{containerAdvanced} + +# Include{containerConfig} +# Include{podOptions} +# Include{serviceRoot} +# Include{serviceMain} +# Include{serviceSelectorLoadBalancer} +# Include{serviceSelectorExtras} + - variable: main + label: "Main Service Port Configuration" + schema: + additional_attrs: true + type: dict + attrs: + - variable: port + label: "Port" + description: "This port exposes the container port on the service" + schema: + type: int + default: 19900 + required: true +# Include{serviceExpertRoot} +# Include{serviceExpert} +# Include{serviceList} +# Include{persistenceRoot} + - variable: pip + label: "App Pip Storage" + description: "Stores the Application Pip." + schema: + additional_attrs: true + type: dict + attrs: +# Include{persistenceBasic} + - variable: poetry + label: "App Poetry Storage" + description: "Stores the Application Poetry." + schema: + additional_attrs: true + type: dict + attrs: +# Include{persistenceBasic} + - variable: whisper + label: "App Whisper Storage" + description: "Stores the Application Whisper." + schema: + additional_attrs: true + type: dict + attrs: +# Include{persistenceBasic} + - variable: faster-whisper + label: "App Faster Whisper Storage" + description: "Stores the Application Faster Whisper." + schema: + additional_attrs: true + type: dict + attrs: +# Include{persistenceBasic} +# Include{persistenceList} +# Include{ingressRoot} + - variable: main + label: "Main Ingress" + schema: + additional_attrs: true + type: dict + attrs: +# Include{ingressDefault} +# Include{ingressTLS} +# Include{ingressTraefik} +# Include{ingressList} +# Include{securityContextRoot} + + - variable: runAsUser + label: "runAsUser" + description: "The UserID of the user running the application" + schema: + type: int + default: 0 + - variable: runAsGroup + label: "runAsGroup" + description: "The groupID this App of the user running the application" + schema: + type: int + default: 0 +# Include{securityContextContainer} +# Include{securityContextAdvanced} +# Include{securityContextPod} + - variable: fsGroup + label: "fsGroup" + description: "The group that should own ALL storage." + schema: + type: int + default: 568 + +# Include{resources} +# Include{advanced} +# Include{addons} +# Include{codeserver} +# Include{netshoot} +# Include{vpn} +# Include{documentation} diff --git a/charts/incubator/whisper-asr-webservice/templates/NOTES.txt b/charts/incubator/whisper-asr-webservice/templates/NOTES.txt new file mode 100644 index 00000000000..efcb74cb772 --- /dev/null +++ b/charts/incubator/whisper-asr-webservice/templates/NOTES.txt @@ -0,0 +1 @@ +{{- include "tc.v1.common.lib.chart.notes" $ -}} diff --git a/charts/incubator/whisper-asr-webservice/templates/common.yaml b/charts/incubator/whisper-asr-webservice/templates/common.yaml new file mode 100644 index 00000000000..b51394e00a4 --- /dev/null +++ b/charts/incubator/whisper-asr-webservice/templates/common.yaml @@ -0,0 +1 @@ +{{ include "tc.v1.common.loader.all" . }} diff --git a/charts/incubator/whisper-asr-webservice/values.yaml b/charts/incubator/whisper-asr-webservice/values.yaml new file mode 100644 index 00000000000..896db1c04d9 --- /dev/null +++ b/charts/incubator/whisper-asr-webservice/values.yaml @@ -0,0 +1,61 @@ +image: + repository: tccr.io/truecharts/whisper-asr-webservice-cpu + pullPolicy: IfNotPresent + tag: v1.1.0@sha256:d23d734490bb8ae57d19d7c93965f213e9f96fb6f85b10c01f2f10ecec2e19f4 +gpuImage: + repository: tccr.io/truecharts/whisper-asr-webservice-gpu + pullPolicy: IfNotPresent + tag: v1.1.0@sha256:39851411e99bbc02488d994f9d077197d8ef536e251e941006f5e0f65cb55461 + +securityContext: + container: + readOnlyRootFilesystem: false + runAsNonRoot: false + runAsUser: 0 + runAsGroup: 0 + +workload: + main: + podSpec: + containers: + main: + imageSelector: image + probes: + liveness: + type: http + path: "/docs" + readiness: + type: http + path: "/docs" + startup: + type: http + path: "/docs" + env: + ASR_MODEL: tiny + ASR_ENGINE: faster_whisper + +service: + main: + ports: + main: + protocol: http + targetPort: 9000 + port: 19900 + +persistence: + pip: + enabled: true + mountPath: "/root/.cache/pip" + poetry: + enabled: true + mountPath: "/root/.cache/poetry" + whisper: + enabled: true + mountPath: "/root/.cache/whisper" + faster-whisper: + enabled: true + mountPath: "/root/.cache/faster_whisper" + +portal: + open: + enabled: true