Add whishper back

This commit is contained in:
Ruben Hensen
2025-03-14 17:45:55 +01:00
parent 1b2879026a
commit 97badf0b21
23 changed files with 0 additions and 0 deletions
-12
View File
@@ -1,12 +0,0 @@
apiVersion: v1
data:
DB_PASS: whishper
DB_USER: whishper
LT_LOAD_ONLY: es,en,fr,nl
WHISHPER_HOST: http://127.0.0.1:8082
WHISPER_MODELS: tiny,small,large-v3
kind: ConfigMap
metadata:
labels:
io.kompose.service: mongo-env
name: env
@@ -1,12 +0,0 @@
# apiVersion: v1
# kind: PersistentVolumeClaim
# metadata:
# labels:
# io.kompose.service: mongo-claim1
# name: mongo-claim1
# spec:
# accessModes:
# - ReadWriteOnce
# resources:
# requests:
# storage: 10Gi
-76
View File
@@ -1,76 +0,0 @@
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
kompose.cmd: kompose convert
kompose.version: 1.34.0 (cbf2835db)
labels:
io.kompose.service: mongo
name: mongo
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: mongo
strategy:
type: Recreate
template:
metadata:
annotations:
kompose.cmd: kompose convert
kompose.version: 1.34.0 (cbf2835db)
labels:
io.kompose.service: mongo
spec:
containers:
# - args:
# - --logpath
# - /var/log/mongodb/mongod.log
- env:
- name: DB_PASS
valueFrom:
configMapKeyRef:
key: DB_PASS
name: env
- name: DB_USER
valueFrom:
configMapKeyRef:
key: DB_USER
name: env
- name: LT_LOAD_ONLY
valueFrom:
configMapKeyRef:
key: LT_LOAD_ONLY
name: env
- name: MONGO_INITDB_ROOT_PASSWORD
value: whishper
- name: MONGO_INITDB_ROOT_USERNAME
value: whishper
- name: WHISHPER_HOST
valueFrom:
configMapKeyRef:
key: WHISHPER_HOST
name: env
- name: WHISPER_MODELS
valueFrom:
configMapKeyRef:
key: WHISPER_MODELS
name: env
image: mongo
name: mongo
ports:
- containerPort: 27017
protocol: TCP
volumeMounts:
- mountPath: /data/db
name: mongo-claim0
# - mountPath: /var/log/mongodb
# name: mongo-claim1
restartPolicy: Always
volumes:
- name: mongo-claim0
persistentVolumeClaim:
claimName: mongo-claim10
# - name: mongo-claim1
# persistentVolumeClaim:
# claimName: mongo-claim1
@@ -1,12 +0,0 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
labels:
io.kompose.service: translate-claim0
name: translate-claim0
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
@@ -1,12 +0,0 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
labels:
io.kompose.service: translate-claim1
name: translate-claim1
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
@@ -1,85 +0,0 @@
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
kompose.cmd: kompose convert
kompose.version: 1.34.0 (cbf2835db)
labels:
io.kompose.service: translate
name: translate
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: translate
strategy:
type: Recreate
template:
metadata:
annotations:
kompose.cmd: kompose convert
kompose.version: 1.34.0 (cbf2835db)
labels:
io.kompose.service: translate
spec:
containers:
- image: libretranslate/libretranslate:latest
securityContext:
runAsUser: 0
runAsGroup: 0
runAsNonRoot: false
livenessProbe:
exec:
command:
- ./venv/bin/python scripts/healthcheck.py
failureThreshold: 5
periodSeconds: 2
timeoutSeconds: 3
name: whisper-libretranslate
ports:
- containerPort: 5000
protocol: TCP
tty: true
volumeMounts:
- mountPath: /home/libretranslate/.local/share
name: translate-claim0
- mountPath: /home/libretranslate/.local/cache
name: translate-claim1
env:
- name: DB_PASS
valueFrom:
configMapKeyRef:
key: DB_PASS
name: env
- name: DB_USER
valueFrom:
configMapKeyRef:
key: DB_USER
name: env
- name: LT_DISABLE_WEB_UI
value: "true"
- name: LT_LOAD_ONLY
valueFrom:
configMapKeyRef:
key: LT_LOAD_ONLY
name: env
- name: LT_UPDATE_MODELS
value: "true"
- name: WHISHPER_HOST
valueFrom:
configMapKeyRef:
key: WHISHPER_HOST
name: env
- name: WHISPER_MODELS
valueFrom:
configMapKeyRef:
key: WHISPER_MODELS
name: env
restartPolicy: Always
volumes:
- name: translate-claim0
persistentVolumeClaim:
claimName: translate-claim0
- name: translate-claim1
persistentVolumeClaim:
claimName: translate-claim1
-16
View File
@@ -1,16 +0,0 @@
apiVersion: v1
kind: Service
metadata:
annotations:
kompose.cmd: kompose convert
kompose.version: 1.34.0 (cbf2835db)
labels:
io.kompose.service: translate
name: translate
spec:
ports:
- name: "5000"
port: 5000
targetPort: 5000
selector:
io.kompose.service: translate
@@ -1,12 +0,0 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
labels:
io.kompose.service: whishper-claim1
name: whishper-claim1
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
-81
View File
@@ -1,81 +0,0 @@
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
kompose.cmd: kompose convert
kompose.version: 1.34.0 (cbf2835db)
labels:
io.kompose.service: whishper
name: whishper
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: whishper
strategy:
type: Recreate
template:
metadata:
annotations:
kompose.cmd: kompose convert
kompose.version: 1.34.0 (cbf2835db)
labels:
io.kompose.service: whishper
spec:
containers:
- env:
- name: CPU_THREADS
value: "4"
- name: DB_PASS
valueFrom:
configMapKeyRef:
key: DB_PASS
name: env
- name: DB_USER
valueFrom:
configMapKeyRef:
key: DB_USER
name: env
- name: LT_LOAD_ONLY
valueFrom:
configMapKeyRef:
key: LT_LOAD_ONLY
name: env
- name: PUBLIC_API_HOST
- name: PUBLIC_INTERNAL_API_HOST
value: http://127.0.0.1:80
- name: PUBLIC_TRANSLATION_API_HOST
- name: PUBLIC_WHISHPER_PROFILE
value: cpu
- name: UPLOAD_DIR
value: /app/uploads
- name: WHISHPER_HOST
valueFrom:
configMapKeyRef:
key: WHISHPER_HOST
name: env
- name: WHISPER_MODELS
valueFrom:
configMapKeyRef:
key: WHISPER_MODELS
name: env
- name: WHISPER_MODELS_DIR
value: /app/models
image: pluja/whishper:latest
name: whishper
ports:
- containerPort: 80
protocol: TCP
volumeMounts:
- mountPath: /app/uploads
name: whishper-claim0
- mountPath: /var/log/whishper
name: whishper-claim1
restartPolicy: Always
volumes:
- name: whishper-claim0
persistentVolumeClaim:
claimName: whishper-claim0
- name: whishper-claim1
persistentVolumeClaim:
claimName: whishper-claim1
-43
View File
@@ -1,43 +0,0 @@
# apiVersion: networking.k8s.io/v1
# kind: Ingress
# metadata:
# name: whisper-ingress
# annotations:
# # nginx.ingress.kubernetes.io/rewrite-target: /
# cert-manager.io/cluster-issuer: prod-cluster-issuer
# nginx.ingress.kubernetes.io/ssl-passthrough: "false"
# nginx.ingress.kubernetes.io/enable-cors: "true"
# # type of authentication
# nginx.ingress.kubernetes.io/auth-type: basic
# # name of the secret that contains the user/password definitions
# nginx.ingress.kubernetes.io/auth-secret: whisper-basic-auth
# # message to display with an appropriate context why the authentication is required
# nginx.ingress.kubernetes.io/auth-realm: 'Authentication Required '
# nginx.ingress.kubernetes.io/proxy-body-size: "0"
# # nginx.ingress.kubernetes.io/cors-allow-origin: "http://localhost:3000/"
# # nginx.ingress.kubernetes.io/cors-allow-methods: "PUT, GET, POST, OPTIONS, DELETE"
# # If you encounter a redirect loop or are getting a 307 response code
# # then you need to force the nginx ingress to connect to the backend using HTTPS.
# #
# # nginx.ingress.kubernetes.io/backend-protocol: "HTTP"
# # namespace: ente-photos
# spec:
# ingressClassName: nginx
# rules:
# - host: alv.hensen.io
# http:
# paths:
# - path: /
# pathType: Prefix
# backend:
# service:
# name: whishper
# port:
# number: 8082
# # TLS configuration for HTTPS
# tls:
# # TLS secretName used on ClusterIssuer
# - secretName: letsencrypt-prod
# hosts:
# - alv.hensen.io
-16
View File
@@ -1,16 +0,0 @@
apiVersion: v1
kind: Service
metadata:
annotations:
kompose.cmd: kompose convert
kompose.version: 1.34.0 (cbf2835db)
labels:
io.kompose.service: whishper
name: whishper
spec:
ports:
- name: "8082"
port: 8082
targetPort: 80
selector:
io.kompose.service: whishper
@@ -1,7 +1,7 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: whisper
name: whisper-webui-folder
namespace: argocd
finalizers:
- resources-finalizer.argocd.argoproj.io
@@ -10,10 +10,12 @@ spec:
source:
repoURL: https://github.com/rubenhensen/k8scd.git
targetRevision: HEAD
path: whishper
path: whisper-webui
destination:
server: https://kubernetes.default.svc
namespace: whisper
namespace: whisper-webui
syncPolicy:
syncOptions:
- CreateNamespace=true
- CreateNamespace=true
automated:
selfHeal: true
@@ -2,8 +2,8 @@ apiVersion: v1
kind: PersistentVolumeClaim
metadata:
labels:
io.kompose.service: mongo-claim10
name: mongo-claim10
io.kompose.service: app-claim0
name: app-claim0
spec:
accessModes:
- ReadWriteOnce
@@ -2,8 +2,8 @@ apiVersion: v1
kind: PersistentVolumeClaim
metadata:
labels:
io.kompose.service: whishper-claim0
name: whishper-claim0
io.kompose.service: app-claim1
name: app-claim1
spec:
accessModes:
- ReadWriteOnce
+61
View File
@@ -0,0 +1,61 @@
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
kompose.cmd: kompose convert
kompose.version: 1.34.0 (cbf2835db)
labels:
io.kompose.service: app
name: app
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: app
strategy:
type: Recreate
template:
metadata:
annotations:
kompose.cmd: kompose convert
kompose.version: 1.34.0 (cbf2835db)
labels:
io.kompose.service: app
spec:
containers:
- command:
- sh
- -c
- |
# Replace the original file with a symlink to our writable version
if [ -f /Whisper-WebUI/configs/default_parameters.yaml ]; then
rm /Whisper-WebUI/configs/default_parameters.yaml
fi
cp /myconfig/default_parameters.yaml /Whisper-WebUI/configs/default_parameters.yaml
# Start the application
python app.py --server_port 7860 --server_name 0.0.0.0
image: hebury/whisper-webui:latest
name: app
ports:
- containerPort: 7860
protocol: TCP
stdin: true
tty: true
volumeMounts:
- mountPath: /Whisper-WebUI/models
name: app-claim0
- mountPath: /Whisper-WebUI/outputs
name: app-claim1
- name: config-volume
mountPath: /myconfig
restartPolicy: Always
volumes:
- name: app-claim0
persistentVolumeClaim:
claimName: app-claim0
- name: app-claim1
persistentVolumeClaim:
claimName: app-claim1
- name: config-volume
configMap:
name: whisper-webui-config
+43
View File
@@ -0,0 +1,43 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: whisper-webui-ingress
annotations:
# nginx.ingress.kubernetes.io/rewrite-target: /
cert-manager.io/cluster-issuer: prod-cluster-issuer
nginx.ingress.kubernetes.io/ssl-passthrough: "false"
nginx.ingress.kubernetes.io/enable-cors: "true"
# type of authentication
# nginx.ingress.kubernetes.io/auth-type: basic
# name of the secret that contains the user/password definitions
# nginx.ingress.kubernetes.io/auth-secret: whisper-basic-auth
# message to display with an appropriate context why the authentication is required
nginx.ingress.kubernetes.io/auth-realm: 'Authentication Required '
nginx.ingress.kubernetes.io/proxy-body-size: "0"
# nginx.ingress.kubernetes.io/cors-allow-origin: "http://localhost:3000/"
# nginx.ingress.kubernetes.io/cors-allow-methods: "PUT, GET, POST, OPTIONS, DELETE"
# If you encounter a redirect loop or are getting a 307 response code
# then you need to force the nginx ingress to connect to the backend using HTTPS.
#
# nginx.ingress.kubernetes.io/backend-protocol: "HTTP"
# namespace: ente-photos
spec:
ingressClassName: nginx
rules:
- host: alv.hensen.io
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: app
port:
number: 7860
# TLS configuration for HTTPS
tls:
# TLS secretName used on ClusterIssuer
- secretName: letsencrypt-prod
hosts:
- alv.hensen.io
@@ -5,12 +5,12 @@ metadata:
kompose.cmd: kompose convert
kompose.version: 1.34.0 (cbf2835db)
labels:
io.kompose.service: mongo
name: mongo
io.kompose.service: app
name: app
spec:
ports:
- name: "27017"
port: 27017
targetPort: 27017
- name: "7860"
port: 7860
targetPort: 7860
selector:
io.kompose.service: mongo
io.kompose.service: app
+29
View File
@@ -0,0 +1,29 @@
# services:
# app:
# build: .
# image: jhj0517/whisper-webui:latest
# volumes:
# # You can mount the container's volume paths to directory paths on your local machine.
# # Models will be stored in the `./models' directory on your machine.
# # Similarly, all output files will be stored in the `./outputs` directory.
# - ./models:/Whisper-WebUI/models
# - ./outputs:/Whisper-WebUI/outputs
# ports:
# - "7860:7860"
# stdin_open: true
# tty: true
# entrypoint: ["python", "app.py", "--server_port", "7860", "--server_name", "0.0.0.0",]
# # If you're not using nvidia GPU, Update device to match yours.
# # See more info at : https://docs.docker.com/compose/compose-file/deploy/#driver
# deploy:
# resources:
# reservations:
# devices:
# - driver: nvidia
# count: all
# capabilities: [ gpu ]
+73
View File
@@ -0,0 +1,73 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: whisper-webui-config
data:
default_parameters.yaml: |
whisper:
model_size: "large-v3"
file_format: "SRT"
lang: "dutch"
is_translate: false
beam_size: 5
log_prob_threshold: -0.8
no_speech_threshold: 0.7
best_of: 5
patience: 1
condition_on_previous_text: true
prompt_reset_on_temperature: 0.5
initial_prompt: "Dit is een zakelijke algemene leden vergadering in het Nederlands op studentenroeivereniging Phocas."
temperature: 0
compression_ratio_threshold: 2.0
chunk_length: 30
batch_size: 24
length_penalty: 1
repetition_penalty: 1.2
no_repeat_ngram_size: 3
prefix: null
suppress_blank: true
suppress_tokens: "[-1]"
max_initial_timestamp: 1
word_timestamps: true
prepend_punctuations: "\"'“¿([{-"
append_punctuations: "\"'.。,!?::”)]}、"
max_new_tokens: null
hallucination_silence_threshold: 0.2
hotwords: null
language_detection_threshold: 0.8
language_detection_segments: 2
add_timestamp: true
enable_offload: true
vad:
vad_filter: true
threshold: 0.6
min_speech_duration_ms: 250
max_speech_duration_s: 9999
min_silence_duration_ms: 1000
speech_pad_ms: 2000
diarization:
is_diarize: false
hf_token: ""
enable_offload: true
bgm_separation:
is_separate_bgm: false
uvr_model_size: "UVR-MDX-NET-Inst_HQ_4"
segment_size: 256
save_file: false
enable_offload: true
translation:
deepl:
api_key: ""
is_pro: false
source_lang: "Automatic Detection"
target_lang: "English"
nllb:
model_size: "facebook/nllb-200-1.3B"
source_lang: null
target_lang: null
max_length: 200
add_timestamp: false