feat: Add L4 vLLM deployment and KEDA scale-to-zero for A100
This commit is contained in:
parent
46f576dcda
commit
7a0d33f042
3 changed files with 106 additions and 0 deletions
18
apps/base/customer1/openclaw/keda-a100.yaml
Normal file
18
apps/base/customer1/openclaw/keda-a100.yaml
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
apiVersion: http.keda.sh/v1alpha1
|
||||
kind: HTTPScaledObject
|
||||
metadata:
|
||||
name: openclaw-brain-a100-scaling
|
||||
namespace: customer1
|
||||
spec:
|
||||
hosts:
|
||||
- a100-vllm.internal.cluster # Replace with actual internal routing host if needed
|
||||
scaleTargetRef:
|
||||
name: openclaw-brain-vllm
|
||||
kind: Deployment
|
||||
apiVersion: apps/v1
|
||||
service: openclaw-brain-service
|
||||
port: 8000
|
||||
replicas:
|
||||
min: 0
|
||||
max: 1
|
||||
scaledownPeriod: 900 # 15 minutes of idle time before scaling to zero
|
||||
|
|
@ -1,6 +1,8 @@
|
|||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- vllm-l4.yaml
|
||||
- keda-a100.yaml
|
||||
- pvc.yaml
|
||||
- configmap.yaml
|
||||
- deployment.yaml
|
||||
|
|
|
|||
86
apps/base/customer1/openclaw/vllm-l4.yaml
Normal file
86
apps/base/customer1/openclaw/vllm-l4.yaml
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: openclaw-brain-vllm-l4
|
||||
namespace: customer1
|
||||
labels:
|
||||
app: openclaw-brain-l4
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: openclaw-brain-l4
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: openclaw-brain-l4
|
||||
spec:
|
||||
nodeSelector:
|
||||
cloud.google.com/gke-accelerator: "nvidia-l4"
|
||||
tolerations:
|
||||
- key: "nvidia.com/gpu"
|
||||
operator: "Exists"
|
||||
effect: "NoSchedule"
|
||||
containers:
|
||||
- name: vllm-brain-l4
|
||||
image: vllm/vllm-openai:latest
|
||||
command: ["python3", "-m", "vllm.entrypoints.openai.api_server"]
|
||||
env:
|
||||
- name: HF_TOKEN
|
||||
value: ""
|
||||
args:
|
||||
- --model=Qwen/Qwen2.5-Coder-7B-Instruct
|
||||
- --host=0.0.0.0
|
||||
- --port=8000
|
||||
- --tensor-parallel-size=1
|
||||
- --gpu-memory-utilization=0.90
|
||||
- --max-model-len=16384
|
||||
- --enable-auto-tool-choice
|
||||
- --trust-remote-code
|
||||
- --dtype=auto
|
||||
- --tool-call-parser=qwen3_coder
|
||||
- --enable-prefix-caching
|
||||
ports:
|
||||
- containerPort: 8000
|
||||
resources:
|
||||
limits:
|
||||
nvidia.com/gpu: 1
|
||||
memory: "24Gi"
|
||||
cpu: "8"
|
||||
requests:
|
||||
nvidia.com/gpu: 1
|
||||
memory: "16Gi"
|
||||
cpu: "4"
|
||||
volumeMounts:
|
||||
- name: model-cache
|
||||
mountPath: /root/.cache/huggingface
|
||||
volumes:
|
||||
- name: model-cache
|
||||
persistentVolumeClaim:
|
||||
claimName: vllm-model-cache-pvc-l4
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: vllm-model-cache-pvc-l4
|
||||
namespace: customer1
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 50Gi
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: openclaw-brain-service-l4
|
||||
namespace: customer1
|
||||
spec:
|
||||
selector:
|
||||
app: openclaw-brain-l4
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 8000
|
||||
targetPort: 8000
|
||||
type: ClusterIP
|
||||
Loading…
Add table
Reference in a new issue