Update deployment of localai to basic deployment
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
fcc8de43c5
commit
2b930a1687
32
localai/localai-deployment.yaml
Normal file
32
localai/localai-deployment.yaml
Normal 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
11
localai/localai-pvc.yaml
Normal file
@ -0,0 +1,11 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: localai-pvc
|
||||
namespace: localai-ns
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWritemany
|
||||
resources:
|
||||
requests:
|
||||
storage: 20Gi
|
13
localai/localai-service.yaml
Normal file
13
localai/localai-service.yaml
Normal 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
|
Loading…
Reference in New Issue
Block a user