mirror of
https://github.com/rubenhensen/k8scd.git
synced 2026-09-17 18:22:54 +02:00
72 lines
2.2 KiB
YAML
72 lines
2.2 KiB
YAML
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:
|
|
initContainers:
|
|
- name: config-init
|
|
image: busybox
|
|
command: ['sh', '-c', 'cp /config-readonly/default_parameters.yaml /writable-configs/ && chmod 666 /writable-configs/default_parameters.yaml']
|
|
volumeMounts:
|
|
- name: config-volume
|
|
mountPath: /config-readonly
|
|
- name: writable-config
|
|
mountPath: /writable-configs
|
|
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
|
|
ln -s /writable-configs/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: writable-config
|
|
mountPath: /writable-configs
|
|
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
|
|
- name: writable-config
|
|
emptyDir: {} |