build(deps): bump caikit from 0.26.37 to 0.26.40 #168
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Build and Test" | |
on: | |
schedule: | |
- cron: "20 4 * * 1" # once a week | |
workflow_dispatch: | |
push: | |
branches: [main] | |
paths: | |
- "!docs" | |
- "!demo" | |
pull_request: | |
env: | |
KIND_CLUSTER_NAME: "kserve-testing" | |
ISVC_NAME: "caikit-tgis-isvc" | |
TEST_NS: "kserve-demo" | |
# note: knative serving will try to resolve the image tag unless the registry is kind.local | |
# See the deployment configmap: | |
# registries-skipping-tag-resolving: "kind.local,ko.local,dev.local" | |
DEV_IMAGE: "kind.local/caikit-tgis-serving:dev" | |
jobs: | |
build-image: | |
name: "Build image" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Free Disk Space | |
uses: jlumbroso/[email protected] | |
with: | |
tool-cache: false | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build and export | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
file: ./Dockerfile | |
tags: ${{ env.DEV_IMAGE }} | |
# outputs: type=oci,dest=/tmp/image.tar | |
outputs: type=docker,dest=/tmp/image.tar | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: caikit-tgis-serving | |
path: /tmp/image.tar | |
compose-smoke-test: | |
name: Smoke Test | |
runs-on: ubuntu-latest | |
needs: build-image | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Free Disk Space | |
uses: jlumbroso/free-disk-space@main | |
with: | |
tool-cache: false | |
- name: Download artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: caikit-tgis-serving | |
path: /tmp | |
- name: Load Docker image | |
run: | | |
docker load --input /tmp/image.tar | |
- name: Pull tgis image | |
run: | | |
docker pull quay.io/opendatahub/text-generation-inference:stable | |
- name: Test image | |
run: | | |
cd test/compose | |
bash -x smoke-test.sh | |
env: | |
CI: true | |
kserve-smoke-test: | |
needs: build-image | |
name: Kserve Smoke Test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup kind/kserve | |
uses: dtrifiro/[email protected] | |
with: | |
cluster_name: ${{ env.KIND_CLUSTER_NAME }} | |
namespace: ${{ env.TEST_NS }} | |
- name: Download built image | |
uses: actions/download-artifact@v4 | |
- name: Load built image into kind | |
run: | | |
kind load image-archive --name ${{ env.KIND_CLUSTER_NAME }} caikit-tgis-serving/image.tar | |
- name: Free Disk Space | |
uses: jlumbroso/[email protected] | |
with: | |
tool-cache: false | |
- name: Setup flan-t5-small model volume | |
run: | | |
sed 's|quay.io/opendatahub/caikit-tgis-serving:fast|${{ env.DEV_IMAGE }}|g' test/kserve/setup.yaml | \ | |
kubectl apply -f - | |
max_retries=10 | |
wait_time=60s | |
until kubectl wait --for=jsonpath='{.status.phase}'=Succeeded pod/setup-flan-t5-small --timeout ${wait_time}; do | |
echo "Current status:" | |
kubectl describe pod,pv,pvc | |
max_retries=$((max_retries-1)) | |
if [[ $max_retries -le 0 ]]; then | |
echo "Failed to setup model" | |
kubectl logs pod/setup-flan-t5-small --all-containers | |
exit 1 | |
fi | |
echo "-------------------" | |
done | |
- name: Deploy ServingRuntime/InferenceService | |
run: | | |
sed 's|quay.io/opendatahub/caikit-tgis-serving:fast|${{ env.DEV_IMAGE }}|g' test/kserve/caikit-tgis-serving.yaml | \ | |
kubectl apply -f - | |
max_retries=10 | |
wait_time=60s | |
until kubectl wait isvc/${ISVC_NAME} --for=condition=Ready --timeout=${wait_time}; do | |
echo "Current status:" | |
kubectl describe isvc,servingruntime,pod | |
max_retries=$((max_retries-1)) | |
if [[ $max_retries -le 0 ]]; then | |
exit 1 | |
fi | |
echo "-------------------" | |
done | |
- name: Install caikit-nlp-client | |
run: | | |
pip install caikit-nlp-client | |
- name: Perform test inference (http) | |
run: | | |
export ISVC_URL="$(oc get isvc ${ISVC_NAME} -o jsonpath='{.status.components.predictor.url}')" | |
export ISVC_HOSTNAME=$(echo $ISVC_URL | cut -d/ -f3-) | |
echo "Querying ISVC at: ${ISVC_URL}" | |
# We can't query the service via hostname, we need to add the entry to /etc/hosts | |
echo "127.0.0.1 ${ISVC_HOSTNAME}" | sudo tee -a /etc/hosts | |
python test/smoke-test.py |