From 93e63b34296cd113c67808e3e85a2dd195b57d38 Mon Sep 17 00:00:00 2001 From: Tyler Perkins Date: Sun, 5 May 2024 13:50:35 -0400 Subject: [PATCH] Add localai --- localai/local-ai-deployment.yaml | 37 ++++++++++++++++++++++++++++++++ localai/local-ai-pvc.yaml | 12 +++++++++++ localai/local-ai-service.yaml | 13 +++++++++++ 3 files changed, 62 insertions(+) create mode 100644 localai/local-ai-deployment.yaml create mode 100644 localai/local-ai-pvc.yaml create mode 100644 localai/local-ai-service.yaml diff --git a/localai/local-ai-deployment.yaml b/localai/local-ai-deployment.yaml new file mode 100644 index 0000000..795daa1 --- /dev/null +++ b/localai/local-ai-deployment.yaml @@ -0,0 +1,37 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: local-ai + namespace: local-ai-ns + labels: + app: local-ai +spec: + selector: + matchLabels: + app: local-ai + replicas: 1 + template: + metadata: + labels: + app: local-ai + name: local-ai + spec: + containers: + - args: + - dolphin-2.5-mixtral-8x7b + env: + - name: DEBUG + value: "true" + name: local-ai + image: quay.io/go-skynet/local-ai:master-ffmpeg-core + imagePullPolicy: IfNotPresent + resources: + limits: + nvidia.com/gpu: 2 + volumeMounts: + - name: models-volume + mountPath: /build/models + volumes: + - name: models-volume + persistentVolumeClaim: + claimName: models-pvc diff --git a/localai/local-ai-pvc.yaml b/localai/local-ai-pvc.yaml new file mode 100644 index 0000000..ca00a7a --- /dev/null +++ b/localai/local-ai-pvc.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: models-pvc + namespace: local-ai-ns +spec: + accessModes: + - ReadWriteMany + storageClassName: longhorn + resources: + requests: + storage: 100Gi diff --git a/localai/local-ai-service.yaml b/localai/local-ai-service.yaml new file mode 100644 index 0000000..b86c80d --- /dev/null +++ b/localai/local-ai-service.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +kind: Service +metadata: + name: local-ai + namespace: local-ai-ns +spec: + selector: + app: local-ai + type: LoadBalancer + ports: + - protocol: TCP + port: 80 + targetPort: 8080