-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathollama.yaml
67 lines (67 loc) · 1.42 KB
/
ollama.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
kind: Deployment
apiVersion: apps/v1
metadata:
name: ollama
namespace: default
labels:
app: ollama
spec:
replicas: 1
selector:
matchLabels:
app: ollama
template:
metadata:
labels:
app: ollama
spec:
volumes:
- name: ollama-models
hostPath:
path: /root/.ollama
type: ''
- name: host-time
hostPath:
path: /etc/localtime
type: ''
containers:
- name: ollama
image: 'cmss.aiclouldsz.icu/ollama/ollama:latest'
command: ["/bin/bash", "-c"]
args:
- |
(ollama serve &)
sleep 10
echo "pull model"
ollama pull qwen2.5:1.5b
echo "pull model finished"
sleep infinity
ports:
- name: http-11434
containerPort: 11434
protocol: TCP
volumeMounts:
- name: ollama-models
mountPath: /root/.ollama
- name: host-time
readOnly: true
mountPath: /etc/localtime
imagePullPolicy: IfNotPresent
restartPolicy: Always
---
kind: Service
apiVersion: v1
metadata:
name: ollama
namespace: default
labels:
app: ollama
spec:
ports:
- name: http-11434
protocol: TCP
port: 11434
targetPort: 11434
selector:
app: ollama
type: ClusterIP