Files
Yuan TangandGitHub 5a767fcf1c feat: Support customizable deployment strategy for RawDeployment mode. Fixes #3452 (#3603)
* feat: Support customizable deployment strategy for RawDeployment mode

Signed-off-by: Yuan Tang <[email protected]>

* regen

Signed-off-by: Yuan Tang <[email protected]>

* lint

Signed-off-by: Yuan Tang <[email protected]>

* Correctly apply rollingupdate

Signed-off-by: Yuan Tang <[email protected]>

* address comments

Signed-off-by: Yuan Tang <[email protected]>

* Add validation

Signed-off-by: Yuan Tang <[email protected]>

---------

Signed-off-by: Yuan Tang <[email protected]>
2024-05-09 10:38:08 -04:00
..
2023-07-07 08:07:47 -04:00
2023-07-07 08:07:47 -04:00

Deploy InferenceService with ONNX model

Setup

  1. Your ~/.kube/config should point to a cluster with KServe installed.
  2. Your cluster's Istio Ingress gateway must be network accessible.

Create the InferenceService

Apply the CRD

kubectl apply -f onnx.yaml 

Expected Output

$ inferenceservice.serving.kserve.io/style-sample configured

Run a sample inference

  1. Setup env vars The first step is to determine the ingress IP and ports and set INGRESS_HOST and INGRESS_PORT
export MODEL_NAME=onnx-model
export ISVC_NAME=style-sample
export SERVICE_HOSTNAME=$(kubectl get inferenceservice ${ISVC_NAME} -o jsonpath='{.status.url}' | cut -d "/" -f 3)
  1. Verify the service is healthy
curl -v -H "Host:${SERVICE_HOSTNAME}" http://localhost:8080/v2/models/${MODEL_NAME}
  1. Install dependencies
pip install -r requirements.txt
  1. Run the sample notebook in jupyter
jupyter notebook

Uploading your own model

The sample model for the example in this readme is already uploaded and available for use. However if you would like to modify the example to use your own ONNX model, all you need to do is to upload your model as model.onnx to S3, GCS or an Azure Blob.