39 lines
844 B
YAML
39 lines
844 B
YAML
apiVersion: apps/v1
|
|
kind: StatefulSet
|
|
metadata:
|
|
name: ollama
|
|
namespace: ollama
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: ollama
|
|
serviceName: ollama
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: ollama
|
|
spec:
|
|
restartPolicy: Always
|
|
terminationGracePeriodSeconds: 60
|
|
nodeSelector:
|
|
nvidia.com/gpu.present: "true"
|
|
containers:
|
|
- name: ollama
|
|
image: ollama/ollama:latest
|
|
ports:
|
|
- containerPort: 11434
|
|
resources:
|
|
limits:
|
|
nvidia.com/gpu: "1"
|
|
env:
|
|
- name: OLLAMA_HOST
|
|
value: "0.0.0.0"
|
|
volumeMounts:
|
|
- name: data
|
|
mountPath: /root/.ollama
|
|
volumes:
|
|
- name: data
|
|
persistentVolumeClaim:
|
|
claimName: ollama-pvc
|