-
Notifications
You must be signed in to change notification settings - Fork 2k
Expand file tree
/
Copy pathfunasr-api.yaml
More file actions
114 lines (114 loc) · 2.54 KB
/
Copy pathfunasr-api.yaml
File metadata and controls
114 lines (114 loc) · 2.54 KB
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: funasr-cache
labels:
app.kubernetes.io/name: funasr-api
app.kubernetes.io/component: cache
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 20Gi
---
apiVersion: v1
kind: ConfigMap
metadata:
name: funasr-api-config
labels:
app.kubernetes.io/name: funasr-api
app.kubernetes.io/component: api
data:
FUNASR_PORT: "8000"
FUNASR_DEVICE: "cpu"
FUNASR_MODEL: "sensevoice"
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: funasr-api
labels:
app.kubernetes.io/name: funasr-api
app.kubernetes.io/component: api
spec:
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
app.kubernetes.io/name: funasr-api
app.kubernetes.io/component: api
template:
metadata:
labels:
app.kubernetes.io/name: funasr-api
app.kubernetes.io/component: api
spec:
containers:
- name: funasr-api
image: funasr-api:local
imagePullPolicy: IfNotPresent
envFrom:
- configMapRef:
name: funasr-api-config
ports:
- name: http
containerPort: 8000
readinessProbe:
httpGet:
path: /health
port: http
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 3
livenessProbe:
httpGet:
path: /health
port: http
periodSeconds: 30
timeoutSeconds: 5
failureThreshold: 3
startupProbe:
httpGet:
path: /health
port: http
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 60
resources:
requests:
cpu: "2"
memory: 8Gi
limits:
memory: 16Gi
volumeMounts:
- name: cache
mountPath: /root/.cache
- name: dshm
mountPath: /dev/shm
volumes:
- name: cache
persistentVolumeClaim:
claimName: funasr-cache
- name: dshm
emptyDir:
medium: Memory
sizeLimit: 2Gi
---
apiVersion: v1
kind: Service
metadata:
name: funasr-api
labels:
app.kubernetes.io/name: funasr-api
app.kubernetes.io/component: api
spec:
type: ClusterIP
selector:
app.kubernetes.io/name: funasr-api
app.kubernetes.io/component: api
ports:
- name: http
port: 8000
targetPort: http