apiVersion: apps/v1
kind: Deployment
metadata:
  name: whisperasr
  namespace: stack-arr
spec:
  replicas: 1
  selector:
    matchLabels:
      app: whisperasr
  template:
    metadata:
      labels:
        app: whisperasr
    spec:
      imagePullSecrets:
        - name: regcred
      volumes:
        - name: whisperasr-model
          persistentVolumeClaim:
            claimName: whisperasr-model-pvc
      containers:
        - name: whisperasr
          image: onerahmet/openai-whisper-asr-webservice:latest-gpu
          ports:
            - containerPort: 9000
              name: api
          env:
            - name: ASR_MODEL
              value: medium
            - name: ASR_ENGINE
              value: faster_whisper
            - name: ASR_MODEL_PATH
              value: /data/whisper
          resources:
            limits:
              nvidia.com/gpu: '1'
          volumeMounts:
            - name: whisperasr-model
              mountPath: /data/whisper
          securityContext:
            privileged: true