Created
January 31, 2025 14:28
-
-
Save Tokynet/43502ba279f93b2f31111b1d54aec861 to your computer and use it in GitHub Desktop.
Wyoming-whisper and piper in k8s exposed via Traefikv3 ingressRouteTCP.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Create TCP entrypoints in Traefik (v3.3.2) | |
... | |
########## | |
# Ports | |
########## | |
ports: | |
web: | |
... | |
whisper: | |
port: 10300 | |
protocol: TCP | |
expose: | |
default: true | |
exposedPort: 10300 | |
proxyProtocol: | |
insecure: true | |
piper: | |
port: 10200 | |
protocol: TCP | |
expose: | |
default: true | |
exposedPort: 10200 | |
proxyProtocol: | |
insecure: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
apiVersion: v1 | |
kind: PersistentVolumeClaim | |
metadata: | |
name: data-wyoming-piper | |
namespace: wyoming | |
labels: | |
app: wyoming-piper | |
spec: | |
storageClassName: longhorn # Using Longhorn storage class | |
resources: | |
requests: | |
storage: 5Gi # Increased storage for model files | |
volumeMode: Filesystem | |
accessModes: | |
- ReadWriteOnce | |
--- | |
apiVersion: v1 | |
kind: PersistentVolumeClaim | |
metadata: | |
name: data-wyoming-whisper | |
namespace: wyoming | |
labels: | |
app: wyoming-whisper | |
spec: | |
storageClassName: longhorn # Using Longhorn storage class | |
resources: | |
requests: | |
storage: 5Gi # Increased storage for model files | |
volumeMode: Filesystem | |
accessModes: | |
- ReadWriteOnce |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: wyoming-piper | |
namespace: wyoming | |
labels: | |
app: wyoming-piper | |
spec: | |
strategy: | |
type: Recreate # Ensure clean pod replacement | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: wyoming-piper | |
template: | |
metadata: | |
labels: | |
app: wyoming-piper | |
spec: | |
containers: | |
- name: wyoming-piper | |
image: rhasspy/wyoming-piper:1.5.0 | |
args: | |
- "--voice" | |
- "en_US-lessac-medium" | |
resources: | |
requests: | |
cpu: 500m # Higher CPU request for speech processing | |
memory: 1Gi | |
limits: | |
cpu: 2000m # Limit to 2 CPU cores | |
memory: 2Gi # Limit memory to 2GB | |
ports: | |
- containerPort: 10200 # Default wyoming-piper port | |
name: piper | |
volumeMounts: | |
- mountPath: /data | |
name: data | |
readinessProbe: | |
tcpSocket: | |
port: 10200 | |
initialDelaySeconds: 45 | |
periodSeconds: 15 | |
livenessProbe: | |
tcpSocket: | |
port: 10200 | |
initialDelaySeconds: 45 | |
periodSeconds: 20 | |
imagePullSecrets: | |
- name: docker-hub | |
volumes: | |
- name: data | |
persistentVolumeClaim: | |
claimName: data-wyoming-piper | |
--- | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: wyoming-whisper | |
namespace: wyoming | |
labels: | |
app: wyoming-whisper | |
spec: | |
strategy: | |
type: Recreate # Ensure clean pod replacement | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: wyoming-whisper | |
template: | |
metadata: | |
labels: | |
app: wyoming-whisper | |
spec: | |
containers: | |
- name: wyoming-whisper | |
image: rhasspy/wyoming-whisper:2.4.0 | |
args: | |
- "--model" | |
- "small.en" | |
- "--language" | |
- "en" | |
resources: | |
requests: | |
cpu: 500m # Higher CPU request for speech processing | |
memory: 1Gi | |
limits: | |
cpu: 2000m # Limit to 2 CPU cores | |
memory: 2Gi # Limit memory to 2GB | |
ports: | |
- containerPort: 10300 # Default wyoming-whisper port | |
name: whisper | |
volumeMounts: | |
- mountPath: /data | |
name: data | |
readinessProbe: | |
tcpSocket: | |
port: 10300 | |
initialDelaySeconds: 45 | |
periodSeconds: 15 | |
livenessProbe: | |
tcpSocket: | |
port: 10300 | |
initialDelaySeconds: 45 | |
periodSeconds: 20 | |
imagePullSecrets: | |
- name: docker-hub | |
volumes: | |
- name: data | |
persistentVolumeClaim: | |
claimName: data-wyoming-whisper |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
apiVersion: traefik.io/v1alpha1 | |
kind: IngressRouteTCP | |
metadata: | |
name: wyoming-whisper | |
namespace: wyoming | |
annotations: | |
external-dns.alpha.kubernetes.io/target: 192.168.55.45 #This is for external-dns service to create dns entry in pihole. | |
kubernetes.io/ingress.class: traefik | |
spec: | |
entryPoints: | |
- whisper | |
routes: | |
- match: HostSNI(`*`) | |
services: | |
- name: wyoming-whisper | |
port: 10300 | |
--- | |
apiVersion: traefik.io/v1alpha1 | |
kind: IngressRouteTCP | |
metadata: | |
name: wyoming-piper | |
namespace: wyoming | |
annotations: | |
external-dns.alpha.kubernetes.io/target: 192.168.55.45 #This is for external-dns service to create dns entry in pihole. | |
kubernetes.io/ingress.class: traefik | |
spec: | |
entryPoints: | |
- piper | |
routes: | |
- match: HostSNI(`*`) | |
services: | |
- name: wyoming-piper | |
port: 10200 | |
# tls: | |
# secretName: wyoming-whisper-ssl |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: wyoming-whisper | |
namespace: wyoming | |
labels: | |
app: wyoming-whisper | |
spec: | |
selector: | |
app: wyoming-whisper | |
ports: | |
- port: 10300 | |
targetPort: 10300 | |
name: whisper | |
type: ClusterIP | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: wyoming-piper | |
namespace: wyoming | |
labels: | |
app: wyoming-piper | |
spec: | |
selector: | |
app: wyoming-piper | |
ports: | |
- port: 10200 | |
targetPort: 10200 | |
name: piper | |
type: ClusterIP |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment