From e536dbfff9432ca69b742095d35f52ab92e1d11b Mon Sep 17 00:00:00 2001 From: Daniele Date: Mon, 10 Jun 2024 16:14:25 +0200 Subject: [PATCH] opendatahub/vllm: include adapter smoke test for main (#52662) * opendatahub-io/vllm: use Dockerfile.ubi for main branch * opendatahub-io/vllm: add grpc test to main branch smoke test --- .../vllm/opendatahub-io-vllm-main.yaml | 34 +++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/ci-operator/config/opendatahub-io/vllm/opendatahub-io-vllm-main.yaml b/ci-operator/config/opendatahub-io/vllm/opendatahub-io-vllm-main.yaml index 164c4ada9bf8f..b15211a1e194e 100644 --- a/ci-operator/config/opendatahub-io/vllm/opendatahub-io-vllm-main.yaml +++ b/ci-operator/config/opendatahub-io/vllm/opendatahub-io-vllm-main.yaml @@ -56,13 +56,15 @@ tests: # we will need to download test models off HF hub unset HF_HUB_OFFLINE - # spin up the server and run it in the background, allowing for images download + + # spin up the OpenAPI server in the background python -m vllm.entrypoints.openai.api_server & server_pid=$! # wait for the server to be up sleep 60 + # OpenAI API tests curl -v --no-progress-meter --fail-with-body \ localhost:8000/v1/models | python -m json.tool || \ (kill -9 $server_pid && exit 1) @@ -76,7 +78,35 @@ tests: localhost:8000/v1/completions | python -m json.tool || \ (kill -9 $server_pid && exit 1) - echo "success" + echo "OpenAI API success" + kill -9 $server_pid + + # spin up the grpc server in the background + python -m vllm_tgis_adapter & + server_pid=$! + + # wait for the server to be up + sleep 60 + + + # get grpcurl + curl --no-progress-meter --location --output grpcurl.tar.gz \ + https://github.com/fullstorydev/grpcurl/releases/download/v1.9.1/grpcurl_1.9.1_linux_x86_64.tar.gz + tar -xf grpcurl.tar.gz + + # get grpc proto + curl --no-progress-meter --location --remote-name \ + https://github.com/opendatahub-io/text-generation-inference/raw/main/proto/generation.proto + + # GRPC API test + ./grpcurl -v \ + -plaintext \ + -proto generation.proto \ + -d '{ "requests": [{"text": "A red fedora symbolizes "}]}' \ + localhost:8033 \ + fmaas.GenerationService/Generate || (kill -9 $server_pid && exit 1) + + echo "GRPC API success" kill -9 $server_pid container: clone: false