Update deployment of localai to basic deployment
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Tyler Perkins 2024-04-05 11:22:31 -04:00
parent fcc8de43c5
commit 2b930a1687
4 changed files with 56 additions and 0 deletions

View File

@ -0,0 +1,32 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: localai
namespace: localai-ns
spec:
replicas: 1
selector:
matchLabels:
app: localai
template:
metadata:
labels:
app: localai
spec:
runtimeClassName: nvidia
resources:
limits:
nvidia.com/gpu: 2
containers:
- name: localai
image: quay.io/go-skynet/local-ai:latest-aio-gpu-nvidia-cuda-12
ports:
- containerPort: 80
env:
volumeMounts:
- mountPath: "/models"
name: models
volumes:
- name: models
persistentVolumeClaim:
claimName: localai-pvc

11
localai/localai-pvc.yaml Normal file
View File

@ -0,0 +1,11 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: localai-pvc
namespace: localai-ns
spec:
accessModes:
- ReadWritemany
resources:
requests:
storage: 20Gi

View File

@ -0,0 +1,13 @@
apiVersion: v1
kind: Service
metadata:
name: localai
namespace: localai-ns
spec:
type: LoadBalancer
selector:
app: localai
ports:
- port: 80
targetPort: 80
protocol: TCP