From f4a121d7350655d59e5e097d38101bd3adfbc35b Mon Sep 17 00:00:00 2001 From: Sam Stoelinga Date: Wed, 4 Dec 2024 23:37:00 -0800 Subject: [PATCH] add e2e test --- .github/workflows/tests.yml | 7 ++++++- test/e2e/engine-vllm-pvc/pvc.yaml | 11 +++++++++++ test/e2e/engine-vllm-pvc/test.sh | 30 ++++++++++++++++++++++++++++++ 3 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 test/e2e/engine-vllm-pvc/pvc.yaml create mode 100755 test/e2e/engine-vllm-pvc/test.sh diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index cce01015..7ac34e92 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -27,7 +27,12 @@ jobs: #needs: unit-and-integration # No use in running e2e tests if integration tests fail. strategy: matrix: - testcase: ["quickstart", "openai-python-client", "autoscaler-restart", "cache-shared-filesystem"] + testcase: + - "quickstart" + - "openai-python-client" + - "autoscaler-restart" + - "cache-shared-filesystem" + - "engine-vllm-pvc" steps: - name: Checkout code uses: actions/checkout@v4 diff --git a/test/e2e/engine-vllm-pvc/pvc.yaml b/test/e2e/engine-vllm-pvc/pvc.yaml new file mode 100644 index 00000000..15ecb69e --- /dev/null +++ b/test/e2e/engine-vllm-pvc/pvc.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: model-pvc +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 10Gi + volumeName: kind-hostpath \ No newline at end of file diff --git a/test/e2e/engine-vllm-pvc/test.sh b/test/e2e/engine-vllm-pvc/test.sh new file mode 100755 index 00000000..88ccfce5 --- /dev/null +++ b/test/e2e/engine-vllm-pvc/test.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +source $REPO_DIR/test/e2e/common.sh + +models_release="kubeai-models" + +pip install -U "huggingface_hub[cli]" + +PV_HOST_PATH=/tmp/data + +huggingface-cli download facebook/opt-125m --local-dir ${PV_HOST_PATH} \ + --exclude "tf_model.h5" --exclude "flax_model.msgpack" + +kubectl apply -f - <