openshift-deployment-patch.json 1.6 KB

1234567891011121314151617181920
  1. [
  2. {"op":"test","path":"/spec/template/spec/containers/0/name","value":"whisper-stt-chatbot"},
  3. {"op":"replace","path":"/spec/replicas","value":1},
  4. {"op":"add","path":"/spec/template/spec/serviceAccountName","value":"whisper-stt-chatbot"},
  5. {"op":"add","path":"/spec/template/spec/automountServiceAccountToken","value":false},
  6. {"op":"add","path":"/spec/strategy","value":{"type":"Recreate"}},
  7. {"op":"replace","path":"/spec/template/spec/containers/0/resources","value":{"limits":{"nvidia.com/gpu":"1"}}},
  8. {"op":"replace","path":"/spec/template/spec/volumes","value":[{"name":"hf-cache","persistentVolumeClaim":{"claimName":"whisper-model-cache"}}]},
  9. {"op":"replace","path":"/spec/template/spec/containers/0/env","value":[
  10. {"name":"HF_HOME","value":"/tmp/hf-cache"},
  11. {"name":"HUGGINGFACE_HUB_CACHE","value":"/tmp/hf-cache"},
  12. {"name":"WHISPER_LOG_LEVEL","value":"INFO"},
  13. {"name":"WHISPER_VAD","value":"true"},
  14. {"name":"MODEL_SIZE","value":"small"}
  15. ]},
  16. {"op":"replace","path":"/spec/template/spec/containers/0/args","value":["app:app","--host","0.0.0.0","--port","8000","--log-level","info"]},
  17. {"op":"add","path":"/spec/template/spec/containers/0/startupProbe","value":{"httpGet":{"path":"/healthz","port":8000},"periodSeconds":10,"timeoutSeconds":5,"failureThreshold":90}},
  18. {"op":"add","path":"/spec/template/spec/containers/0/readinessProbe","value":{"httpGet":{"path":"/healthz","port":8000},"periodSeconds":10,"timeoutSeconds":5}},
  19. {"op":"add","path":"/spec/template/spec/containers/0/livenessProbe","value":{"httpGet":{"path":"/healthz","port":8000},"periodSeconds":30,"timeoutSeconds":5,"failureThreshold":5}}
  20. ]