From fa4aa495d19fd98bbea15333d89a463a62653ed9 Mon Sep 17 00:00:00 2001 From: Tyler Perkins Date: Sat, 30 Mar 2024 18:30:05 -0400 Subject: [PATCH] Add text-gen --- text-ui/text-ui-deployment.yaml | 35 +++++++++++++++++++++++++++++++++ text-ui/text-ui-pvc.yaml | 12 +++++++++++ text-ui/text-ui-service.yaml | 19 ++++++++++++++++++ 3 files changed, 66 insertions(+) create mode 100644 text-ui/text-ui-deployment.yaml create mode 100644 text-ui/text-ui-pvc.yaml create mode 100644 text-ui/text-ui-service.yaml diff --git a/text-ui/text-ui-deployment.yaml b/text-ui/text-ui-deployment.yaml new file mode 100644 index 0000000..962575c --- /dev/null +++ b/text-ui/text-ui-deployment.yaml @@ -0,0 +1,35 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: text-gen + namespace: text-gen-ns +spec: + replicas: 1 + selector: + matchLabels: + app: text-generation-webui + template: + metadata: + labels: + app: text-generation-webui + spec: + containers: + - name: text-generation-webui + image: atinoda/text-generation-webui:default-nvidia + env: + - name: EXTRA_LAUNCH_ARGS + value: "--listen --verbose" + ports: + - containerPort: 7860 + - containerPort: 5000 + - containerPort: 5005 + volumeMounts: + - name: config-volume + mountPath: /app + resources: + limits: + nvidia.com/gpu: 1 + volumes: + - name: config-volume + persistentVolumeClaim: + claimName: text-gen-pvc diff --git a/text-ui/text-ui-pvc.yaml b/text-ui/text-ui-pvc.yaml new file mode 100644 index 0000000..bf34b21 --- /dev/null +++ b/text-ui/text-ui-pvc.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: text-gen-pvc + namespace: text-gen-ns +spec: + accessModes: + - ReadWriteMany + storageClassName: longhorn + resources: + requests: + storage: 100Gi diff --git a/text-ui/text-ui-service.yaml b/text-ui/text-ui-service.yaml new file mode 100644 index 0000000..8fc5090 --- /dev/null +++ b/text-ui/text-ui-service.yaml @@ -0,0 +1,19 @@ +apiVersion: v1 +kind: Service +metadata: + name: text-generation-webui-service + namespace: text-gen-ns +spec: + type: LoadBalancer + ports: + - name: web + port: 7860 + targetPort: 7860 + - name: api + port: 5000 + targetPort: 5000 + - name: stream + port: 5005 + targetPort: 5005 + selector: + app: text-generation-webui