diff --git a/localai/local-ai-deployment.yaml b/localai/local-ai-deployment.yaml deleted file mode 100644 index 2a7b90c..0000000 --- a/localai/local-ai-deployment.yaml +++ /dev/null @@ -1,37 +0,0 @@ -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:v2.14.0-cublas-cuda12 - 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-service.yaml b/localai/local-ai-service.yaml deleted file mode 100644 index b86c80d..0000000 --- a/localai/local-ai-service.yaml +++ /dev/null @@ -1,13 +0,0 @@ -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 diff --git a/ollama/ollama-deployment.yaml b/ollama/ollama-deployment.yaml new file mode 100644 index 0000000..ffb33e4 --- /dev/null +++ b/ollama/ollama-deployment.yaml @@ -0,0 +1,36 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: ollama-deployment + namespace: ollama-ns +spec: + replicas: 1 + selector: + matchLabels: + app: ollama + template: + metadata: + labels: + app: ollama + spec: + runtimeClassName: nvidia + containers: + - name: ollama + image: ollama/ollama + env: + - name: OLLAMA_HOST + value: 0.0.0.0 + - name: OLLAMA_MODELS + value: "/models" + ports: + - containerPort: 11434 + resources: + limits: + nvidia.com/gpu: 2 + volumeMounts: + - name: ollama-volume + mountPath: "/my-models" + volumes: + - name: ollama-volume + persistentVolumeClaim: + claimName: ollama-pvc diff --git a/localai/local-ai-pvc.yaml b/ollama/ollama-pvc.yaml similarity index 60% rename from localai/local-ai-pvc.yaml rename to ollama/ollama-pvc.yaml index ca00a7a..f2d2aa0 100644 --- a/localai/local-ai-pvc.yaml +++ b/ollama/ollama-pvc.yaml @@ -1,12 +1,12 @@ apiVersion: v1 kind: PersistentVolumeClaim metadata: - name: models-pvc - namespace: local-ai-ns + name: ollama-pvc + namespace: ollama-ns spec: accessModes: - - ReadWriteMany + - ReadWriteOnce storageClassName: longhorn resources: requests: - storage: 100Gi + storage: 200Gi diff --git a/ollama/ollama-service.yaml b/ollama/ollama-service.yaml new file mode 100644 index 0000000..d034c21 --- /dev/null +++ b/ollama/ollama-service.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: Service +metadata: + name: ollama-service + namespace: ollama-ns +spec: + type: LoadBalancer + ports: + - port: 11434 + targetPort: 11434 + selector: + app: ollama