Skip to content

Commit

Permalink
Add runtime template of vLLM ROCM (#280)
Browse files Browse the repository at this point in the history
* Add runtime template of vLLM ROCM

Signed-off-by: Vaibhav Jain <[email protected]>

* Fix runtime image reference

Signed-off-by: Vaibhav Jain <[email protected]>

* Update template description to highlight ROCm

Signed-off-by: Vaibhav Jain <[email protected]>

---------

Signed-off-by: Vaibhav Jain <[email protected]>
  • Loading branch information
vaibhavjainwiz authored Nov 4, 2024
1 parent fe9e14b commit 18a5e80
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 0 deletions.
12 changes: 12 additions & 0 deletions config/base/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ namespace: opendatahub
configMapGenerator:
- envs:
- params.env
- params-vllm-rocm.env
name: odh-model-controller-parameters
generatorOptions:
disableNameSuffixHash: true
Expand Down Expand Up @@ -84,6 +85,17 @@ replacements:
name: vllm-runtime-template
fieldPaths:
- objects.0.spec.containers.0.image
- source:
kind: ConfigMap
version: v1
name: odh-model-controller-parameters
fieldPath: data.vllm-rocm-image
targets:
- select:
kind: Template
name: vllm-rocm-runtime-template
fieldPaths:
- objects.0.spec.containers.0.image
- source:
kind: ConfigMap
version: v1
Expand Down
1 change: 1 addition & 0 deletions config/base/params-vllm-rocm.env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
vllm-rocm-image=quay.io/opendatahub/vllm:fast-rocm
1 change: 1 addition & 0 deletions config/runtimes/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ resources:
- tgis-template.yaml
- ovms-kserve-template.yaml
- vllm-template.yaml
- vllm-rocm-template.yaml
- caikit-standalone-template.yaml
51 changes: 51 additions & 0 deletions config/runtimes/vllm-rocm-template.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
apiVersion: template.openshift.io/v1
kind: Template
metadata:
labels:
opendatahub.io/dashboard: 'true'
opendatahub.io/ootb: 'true'
annotations:
description: vLLM ServingRuntime to support ROCm (for AMD GPUs)
openshift.io/display-name: vLLM ROCm ServingRuntime for KServe
openshift.io/provider-display-name: Red Hat, Inc.
tags: rhods,rhoai,kserve,servingruntime
template.openshift.io/documentation-url: https://github.com/opendatahub-io/vllm
template.openshift.io/long-description: This template defines resources needed to deploy vLLM ServingRuntime with KServe in Red Hat OpenShift AI
opendatahub.io/modelServingSupport: '["single"]'
opendatahub.io/apiProtocol: 'REST'
name: vllm-rocm-runtime-template
objects:
- apiVersion: serving.kserve.io/v1alpha1
kind: ServingRuntime
metadata:
name: vllm-rocm-runtime
annotations:
openshift.io/display-name: vLLM ROCm ServingRuntime for KServe
opendatahub.io/recommended-accelerators: '["amd.com/gpu"]'
labels:
opendatahub.io/dashboard: 'true'
spec:
annotations:
prometheus.io/port: '8080'
prometheus.io/path: '/metrics'
multiModel: false
supportedModelFormats:
- autoSelect: true
name: vLLM
containers:
- name: kserve-container
image: $(vllm-rocm-image)
command:
- python
- -m
- vllm.entrypoints.openai.api_server
args:
- "--port=8080"
- "--model=/mnt/models"
- "--served-model-name={{.Name}}"
env:
- name: HF_HOME
value: /tmp/hf_home
ports:
- containerPort: 8080
protocol: TCP

0 comments on commit 18a5e80

Please sign in to comment.