@@ -13,49 +13,111 @@ spec:
13
13
app.kubernetes.io/name : vllm
14
14
app.kubernetes.io/component : vllm
15
15
app.kubernetes.io/model : ${MODEL_LABEL}
16
+ app : ${POOL_NAME}
16
17
template :
17
18
metadata :
18
19
labels :
19
20
app.kubernetes.io/name : vllm
20
21
app.kubernetes.io/component : vllm
21
22
app.kubernetes.io/model : ${MODEL_LABEL}
23
+ app : ${POOL_NAME}
22
24
spec :
25
+ # securityContext:
26
+ # runAsUser: ${PROXY_UID}
27
+ # runAsNonRoot: true
28
+ # seccompProfile:
29
+ # type: RuntimeDefault
23
30
containers :
24
31
- name : vllm
25
32
image : ${VLLM_IMAGE}:${VLLM_TAG}
26
- imagePullPolicy : Always
33
+ imagePullPolicy : IfNotPresent
27
34
command :
28
35
- /bin/sh
29
36
- " -c"
30
37
args :
31
38
- |
32
- export LMCACHE_DISTRIBUTED_URL=${POD_IP}:80 &&
33
- vllm serve ${MODEL_NAME}
34
- --host 0.0.0.0
35
- --port 8000
36
- --enable-chunked-prefill false
37
- --max-model-len ${MAX_MODEL_LEN}
38
- --kv-transfer-config
39
- '{"kv_connector":"LMCacheConnector","kv_role":"kv_both"}'
39
+ export LMCACHE_DISTRIBUTED_URL=$${${POD_IP}}:80 && \
40
+ vllm serve ${MODEL_NAME} \
41
+ --host 0.0.0.0 \
42
+ --port 8000 \
43
+ --enable-chunked-prefill false \
44
+ --max-model-len ${MAX_MODEL_LEN} \
45
+ --kv-transfer-config '{"kv_connector":"LMCacheConnector","kv_role":"kv_both"}'
40
46
ports :
41
47
- name : http
42
48
containerPort : 8000
43
- - name : lmcache-dist
49
+ protocol : TCP
50
+ - name : lmcache-dist # Assuming port 80 is used for LMCACHE_DISTRIBUTED_URL
44
51
containerPort : 80
52
+ protocol : TCP
53
+ livenessProbe :
54
+ failureThreshold : 3
55
+ httpGet :
56
+ path : /health
57
+ port : 8000
58
+ scheme : HTTP
59
+ initialDelaySeconds : 15
60
+ periodSeconds : 10
61
+ successThreshold : 1
62
+ timeoutSeconds : 1
63
+ startupProbe :
64
+ failureThreshold : 60
65
+ httpGet :
66
+ path : /health
67
+ port : 8000
68
+ scheme : HTTP
69
+ initialDelaySeconds : 15
70
+ periodSeconds : 10
71
+ successThreshold : 1
72
+ timeoutSeconds : 1
45
73
env :
74
+ - name : HF_HOME
75
+ value : /data
76
+ - name : POD_IP
77
+ valueFrom :
78
+ fieldRef :
79
+ apiVersion : v1
80
+ fieldPath : status.podIP
46
81
- name : HF_TOKEN
47
82
valueFrom :
48
83
secretKeyRef :
49
84
name : ${HF_SECRET_NAME}
50
85
key : ${HF_SECRET_KEY}
51
- - name : POD_IP
52
- valueFrom :
53
- fieldRef :
54
- fieldPath : status.podIP
55
- volumeMounts :
56
- - name : model-storage
57
- mountPath : ${VOLUME_MOUNT_PATH}
58
- volumes :
59
- - name : model-storage
60
- persistentVolumeClaim :
61
- claimName : ${PVC_NAME}
86
+ - name : LMCACHE_LOOKUP_URL
87
+ value : ${REDIS_HOST}:${REDIS_PORT}
88
+ - name : LMCACHE_ENABLE_DEBUG
89
+ value : " True"
90
+ - name : LMCACHE_ENABLE_P2P
91
+ value : " True"
92
+ - name : LMCACHE_LOCAL_CPU
93
+ value : " True"
94
+ - name : LMCACHE_MAX_LOCAL_CPU_SIZE
95
+ value : " 20"
96
+ - name : LMCACHE_USE_EXPERIMENTAL
97
+ value : " True"
98
+ - name : VLLM_RPC_TIMEOUT
99
+ value : " 1000000"
100
+ resources :
101
+ limits :
102
+ nvidia.com/gpu : " 1"
103
+ requests :
104
+ cpu : " 10"
105
+ memory : 40Gi
106
+ nvidia.com/gpu : " 1"
107
+ terminationMessagePath : /dev/termination-log
108
+ terminationMessagePolicy : File
109
+ securityContext :
110
+ runAsNonRoot : false
111
+ restartPolicy : Always
112
+ terminationGracePeriodSeconds : 30
113
+ dnsPolicy : ClusterFirst
114
+ securityContext : {}
115
+ schedulerName : default-scheduler
116
+ strategy :
117
+ type : RollingUpdate
118
+ rollingUpdate :
119
+ maxUnavailable : 0
120
+ maxSurge : " 100%"
121
+ revisionHistoryLimit : 10
122
+ progressDeadlineSeconds : 1200
123
+
0 commit comments