Gluttony-Cluster/ollama/ollama-deployment.yaml

37 lines
760 B
YAML
Raw Normal View History

2024-04-13 01:02:18 +00:00
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:
2024-04-13 01:05:57 +00:00
runtimeClassName: nvidia
2024-04-13 01:02:18 +00:00
containers:
- name: ollama
image: ollama/ollama
2024-04-14 01:00:43 +00:00
env:
- name: OLLAMA_HOST
value: 0.0.0.0
- name: OLLAMA_MODELS
value: "/models"
2024-04-13 01:02:18 +00:00
ports:
- containerPort: 11434
2024-04-13 01:05:57 +00:00
resources:
limits:
nvidia.com/gpu: 2
2024-04-13 01:02:18 +00:00
volumeMounts:
- name: ollama-volume
2024-04-14 01:00:43 +00:00
mountPath: "/my-models"
2024-04-13 01:02:18 +00:00
volumes:
- name: ollama-volume
persistentVolumeClaim:
claimName: ollama-pvc