2024-05-05 22:59:39 +00:00
|
|
|
apiVersion: apps/v1
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
2024-05-11 01:48:03 +00:00
|
|
|
name: ollama
|
2024-05-05 22:59:39 +00:00
|
|
|
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:
|
2024-05-11 01:48:03 +00:00
|
|
|
nvidia.com/gpu: 3
|
2024-05-05 22:59:39 +00:00
|
|
|
volumeMounts:
|
|
|
|
- name: ollama-volume
|
2024-05-11 01:48:03 +00:00
|
|
|
mountPath: "/root/.ollama"
|
2024-05-05 22:59:39 +00:00
|
|
|
volumes:
|
|
|
|
- name: ollama-volume
|
|
|
|
persistentVolumeClaim:
|
|
|
|
claimName: ollama-pvc
|