|
| 1 | +apiVersion: apps/v1 |
| 2 | +kind: Deployment |
| 3 | +metadata: |
| 4 | + name: ${VLLM_DEPLOYMENT_NAME} |
| 5 | +spec: |
| 6 | + replicas: 3 |
| 7 | + selector: |
| 8 | + matchLabels: |
| 9 | + app: vllm-llama3-8b-instruct |
| 10 | + template: |
| 11 | + metadata: |
| 12 | + labels: |
| 13 | + app: vllm-llama3-8b-instruct |
| 14 | + spec: |
| 15 | + securityContext: |
| 16 | + runAsUser: ${PROXY_UID} |
| 17 | + runAsNonRoot: true |
| 18 | + seccompProfile: |
| 19 | + type: RuntimeDefault |
| 20 | + containers: |
| 21 | + - name: vllm |
| 22 | + image: "vllm/vllm-openai:latest" |
| 23 | + imagePullPolicy: IfNotPresent |
| 24 | + command: ["python3", "-m", "vllm.entrypoints.openai.api_server"] |
| 25 | + args: |
| 26 | + - "--model" |
| 27 | + - "meta-llama/Llama-3.1-8B-Instruct" |
| 28 | + - "--tensor-parallel-size" |
| 29 | + - "1" |
| 30 | + - "--port" |
| 31 | + - "8000" |
| 32 | + - "--max-num-seq" |
| 33 | + - "1024" |
| 34 | + - "--compilation-config" |
| 35 | + - "3" |
| 36 | + - "--enable-lora" |
| 37 | + - "--max-loras" |
| 38 | + - "2" |
| 39 | + - "--max-lora-rank" |
| 40 | + - "8" |
| 41 | + - "--max-cpu-loras" |
| 42 | + - "12" |
| 43 | + env: |
| 44 | + - name: VLLM_USE_V1 |
| 45 | + value: "1" |
| 46 | + - name: PORT |
| 47 | + value: "8000" |
| 48 | + - name: HUGGING_FACE_HUB_TOKEN |
| 49 | + valueFrom: |
| 50 | + secretKeyRef: |
| 51 | + name: hf-token |
| 52 | + key: token |
| 53 | + - name: VLLM_ALLOW_RUNTIME_LORA_UPDATING |
| 54 | + value: "true" |
| 55 | + - name: XDG_CACHE_HOME |
| 56 | + value: /cache |
| 57 | + - name: HF_HOME |
| 58 | + value: /cache/huggingface |
| 59 | + - name: FLASHINFER_CACHE_DIR |
| 60 | + value: /cache/flashinfer |
| 61 | + ports: |
| 62 | + - containerPort: 8000 |
| 63 | + name: http |
| 64 | + protocol: TCP |
| 65 | + lifecycle: |
| 66 | + preStop: |
| 67 | + sleep: |
| 68 | + seconds: 30 |
| 69 | + livenessProbe: |
| 70 | + httpGet: |
| 71 | + path: /health |
| 72 | + port: http |
| 73 | + scheme: HTTP |
| 74 | + periodSeconds: 1 |
| 75 | + successThreshold: 1 |
| 76 | + failureThreshold: 5 |
| 77 | + timeoutSeconds: 1 |
| 78 | + readinessProbe: |
| 79 | + httpGet: |
| 80 | + path: /health |
| 81 | + port: http |
| 82 | + scheme: HTTP |
| 83 | + periodSeconds: 1 |
| 84 | + successThreshold: 1 |
| 85 | + failureThreshold: 1 |
| 86 | + timeoutSeconds: 1 |
| 87 | + startupProbe: |
| 88 | + httpGet: |
| 89 | + path: /health |
| 90 | + port: http |
| 91 | + scheme: HTTP |
| 92 | + failureThreshold: 600 |
| 93 | + initialDelaySeconds: 2 |
| 94 | + periodSeconds: 1 |
| 95 | + resources: |
| 96 | + limits: |
| 97 | + nvidia.com/gpu: 1 |
| 98 | + requests: |
| 99 | + nvidia.com/gpu: 1 |
| 100 | + volumeMounts: |
| 101 | + - mountPath: /cache |
| 102 | + name: hf-cache |
| 103 | + - mountPath: /dev/shm |
| 104 | + name: shm |
| 105 | + - mountPath: /adapters |
| 106 | + name: adapters |
| 107 | + securityContext: |
| 108 | + allowPrivilegeEscalation: false |
| 109 | + capabilities: |
| 110 | + drop: |
| 111 | + - ALL |
| 112 | + initContainers: |
| 113 | + - name: lora-adapter-syncer |
| 114 | + tty: true |
| 115 | + stdin: true |
| 116 | + image: us-central1-docker.pkg.dev/k8s-staging-images/gateway-api-inference-extension/lora-syncer:main |
| 117 | + restartPolicy: Always |
| 118 | + imagePullPolicy: Always |
| 119 | + env: |
| 120 | + - name: DYNAMIC_LORA_ROLLOUT_CONFIG |
| 121 | + value: "/config/configmap.yaml" |
| 122 | + volumeMounts: |
| 123 | + - name: config-volume |
| 124 | + mountPath: /config |
| 125 | + securityContext: |
| 126 | + allowPrivilegeEscalation: false |
| 127 | + capabilities: |
| 128 | + drop: |
| 129 | + - ALL |
| 130 | + restartPolicy: Always |
| 131 | + enableServiceLinks: false |
| 132 | + terminationGracePeriodSeconds: 130 |
| 133 | + volumes: |
| 134 | + - name: hf-cache |
| 135 | + emptyDir: {} |
| 136 | + - name: shm |
| 137 | + emptyDir: |
| 138 | + medium: Memory |
| 139 | + - name: adapters |
| 140 | + emptyDir: {} |
| 141 | + - name: config-volume |
| 142 | + configMap: |
| 143 | + name: vllm-llama3-8b-instruct-adapters |
0 commit comments