Skip to content

Commit

Permalink
Merge pull request #70 from vaibhavjainwiz/master
Browse files Browse the repository at this point in the history
[Sync] kserve/kserve-master to master branch
  • Loading branch information
openshift-merge-robot authored Sep 4, 2023
2 parents 50d33ed + 41e4a4f commit 833f509
Show file tree
Hide file tree
Showing 220 changed files with 52,327 additions and 6,738 deletions.
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Please delete options that are not relevant.

**Feature/Issue validation/testing**:

Please describe the tests that you ran to verify your changes and relevent result summary. Provide instructions so it can be reproduced.
Please describe the tests that you ran to verify your changes and relevant result summary. Provide instructions so it can be reproduced.
Please also list any relevant details for your test configuration.

- [ ] Test A
Expand Down
34 changes: 34 additions & 0 deletions .github/actions/free-up-disk-space/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: 'Free-up disk space action'
description: 'Removes non-essential tools, libraries and cached files from GitHub action runner node'

runs:
using: "composite"
steps:
- name: Free up disk space
shell: bash
run: |
echo "Disk usage before cleanup:"
df -h
# remove non-essential tools and libraries, see:
# https://github.com/actions/runner-images/issues/2840#issuecomment-790492173
sudo rm -rf /opt/ghc
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/share/boost
# delete libraries for Android (12G), CodeQL (5.3G), PowerShell (1.3G), Swift (1.7G)
sudo rm -rf /usr/local/lib/android
sudo rm -rf "${AGENT_TOOLSDIRECTORY}/CodeQL"
sudo rm -rf /usr/local/share/powershell
sudo rm -rf /usr/share/swift
echo "Disk usage after cleanup:"
df -h
- name: Prune docker images
shell: bash
run: |
echo "Pruning docker images"
docker image prune -a -f
docker system df
df -h
2 changes: 0 additions & 2 deletions .github/actions/kserve-dep-setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ runs:
elif [[ "${{ inputs.network-layer }}" == "kourier" ]]; then
echo "Selected network layer ${{ inputs.network-layer }}"
./test/scripts/gh-actions/setup-kourier.sh
kubectl describe pods -n kourier-system
else
echo "Unsupported network layer"
fi
Expand Down
39 changes: 6 additions & 33 deletions .github/actions/minikube-setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,49 +4,22 @@ description: 'Sets up minikube on the github runner'
runs:
using: "composite"
steps:
- name: Free up disk space
shell: bash
run: |
echo "Disk usage before cleanup:"
df -h
# remove non-essential tools and libraries, see:
# https://github.com/actions/runner-images/issues/2840#issuecomment-790492173
sudo rm -rf /opt/ghc
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/share/boost
# delete libraries for Android (12G), CodeQL (5.3G), PowerShell (1.3G), Swift (1.7G)
sudo rm -rf /usr/local/lib/android
sudo rm -rf "${AGENT_TOOLSDIRECTORY}/CodeQL"
sudo rm -rf /usr/local/share/powershell
sudo rm -rf /usr/share/swift
echo "Disk usage after cleanup:"
df -h
- name: Install kubectl
uses: azure/setup-kubectl@v3
with:
version: 'v1.26.0'
version: 'v1.27.4'

- name: Setup Minikube
uses: medyagh/setup-minikube@latest
with:
minikube-version: '1.28.0'
kubernetes-version: 'v1.26.4'
minikube-version: '1.31.1'
kubernetes-version: 'v1.27.4'
driver: 'none'
network-plugin: 'cni'
cni: 'calico'
wait: 'all'
start-args: --wait-timeout=120s
start-args: --wait-timeout=6m0s

- name: Check Kubernetes pods
shell: bash
run: kubectl get pods -n kube-system

- name: Prune docker images
shell: bash
run: |
echo "Pruning docker images"
docker image prune -a -f
docker system df
df -h
33 changes: 22 additions & 11 deletions .github/workflows/alibiexplainer-docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,19 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Build image
run: |
cd python
docker buildx build . --file alibiexplainer.Dockerfile --tag $IMAGE_NAME
- name: Setup QEMU
uses: docker/setup-qemu-action@v2

- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Log into registry
run: docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_PASSWORD }}
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Push image
- name: Export version variable
run: |
IMAGE_ID=kserve/$IMAGE_NAME
Expand All @@ -71,9 +75,16 @@ jobs:
# Use Docker `latest` tag convention
[ "$VERSION" == "master" ] && VERSION=latest
echo IMAGE_ID=$IMAGE_ID
echo VERSION=$VERSION
echo VERSION=$VERSION >> $GITHUB_ENV
echo IMAGE_ID=$IMAGE_ID >> $GITHUB_ENV
- name: Build and push
uses: docker/build-push-action@v3
with:
platforms: linux/amd64, linux/arm64/v8
context: python
file: python/alibiexplainer.Dockerfile
push: true
tags: ${{ env.IMAGE_ID }}:${{ env.VERSION }}

docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
docker push $IMAGE_ID:$VERSION

35 changes: 22 additions & 13 deletions .github/workflows/artexplainer-docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,19 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Build image
run: |
cd python
docker buildx build . --file artexplainer.Dockerfile --tag $IMAGE_NAME
- name: Setup QEMU
uses: docker/setup-qemu-action@v2

- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Log into registry
run: docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_PASSWORD }}
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Push image
- name: Export version variable
run: |
IMAGE_ID=kserve/$IMAGE_NAME
Expand All @@ -71,9 +75,14 @@ jobs:
# Use Docker `latest` tag convention
[ "$VERSION" == "master" ] && VERSION=latest
echo IMAGE_ID=$IMAGE_ID
echo VERSION=$VERSION
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
docker push $IMAGE_ID:$VERSION
echo VERSION=$VERSION >> $GITHUB_ENV
echo IMAGE_ID=$IMAGE_ID >> $GITHUB_ENV
- name: Build and push
uses: docker/build-push-action@v3
with:
platforms: linux/amd64, linux/arm64/v8
context: python
file: python/artexplainer.Dockerfile
push: true
tags: ${{ env.IMAGE_ID }}:${{ env.VERSION }}
23 changes: 19 additions & 4 deletions .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Free-up disk space
uses: ./.github/actions/free-up-disk-space

- name: Build runtime server images
run: |
./test/scripts/gh-actions/build-server-runtimes.sh predictor,transformer
Expand Down Expand Up @@ -147,6 +150,9 @@ jobs:
with:
python-version: '3.9'

- name: Free-up disk space
uses: ./.github/actions/free-up-disk-space

- name: Setup Minikube
uses: ./.github/actions/minikube-setup

Expand Down Expand Up @@ -227,6 +233,7 @@ jobs:
with:
python-version: '3.9'

- uses: ./.github/actions/free-up-disk-space
- uses: ./.github/actions/minikube-setup
- uses: ./.github/actions/kserve-dep-setup
- uses: ./.github/actions/base-download
Expand Down Expand Up @@ -285,6 +292,7 @@ jobs:
with:
python-version: '3.9'

- uses: ./.github/actions/free-up-disk-space
- uses: ./.github/actions/minikube-setup
- uses: ./.github/actions/kserve-dep-setup
- uses: ./.github/actions/base-download
Expand Down Expand Up @@ -337,7 +345,8 @@ jobs:
- uses: actions/setup-python@v4
with:
python-version: '3.9'


- uses: ./.github/actions/free-up-disk-space
- uses: ./.github/actions/minikube-setup
- uses: ./.github/actions/kserve-dep-setup
- uses: ./.github/actions/base-download
Expand Down Expand Up @@ -390,6 +399,7 @@ jobs:
- uses: actions/setup-python@v4
with:
python-version: '3.9'
- uses: ./.github/actions/free-up-disk-space
- uses: ./.github/actions/minikube-setup
- uses: ./.github/actions/kserve-dep-setup
- uses: ./.github/actions/base-download
Expand Down Expand Up @@ -442,6 +452,7 @@ jobs:
with:
python-version: '3.9'

- uses: ./.github/actions/free-up-disk-space
- uses: ./.github/actions/minikube-setup
- uses: ./.github/actions/kserve-dep-setup
- uses: ./.github/actions/base-download
Expand Down Expand Up @@ -503,6 +514,7 @@ jobs:
with:
python-version: '3.9'

- uses: ./.github/actions/free-up-disk-space
- uses: ./.github/actions/minikube-setup
- uses: ./.github/actions/kserve-dep-setup
- uses: ./.github/actions/base-download
Expand Down Expand Up @@ -541,6 +553,7 @@ jobs:
with:
python-version: '3.9'

- uses: ./.github/actions/free-up-disk-space
- uses: ./.github/actions/minikube-setup
- uses: ./.github/actions/kserve-dep-setup
- uses: ./.github/actions/base-download
Expand Down Expand Up @@ -584,6 +597,7 @@ jobs:
with:
python-version: '3.9'

- uses: ./.github/actions/free-up-disk-space
- uses: ./.github/actions/minikube-setup
- uses: ./.github/actions/kserve-dep-setup
with:
Expand Down Expand Up @@ -618,8 +632,8 @@ jobs:
- name: Run E2E tests
timeout-minutes: 25
run: |
export KSERVE_INGRESS_HOST_PORT=$(kubectl get pod -n kourier-system -l "app=3scale-kourier-gateway" \
--output=jsonpath="{.items[0].status.podIP}"):$(kubectl get pod -n kourier-system -l "app=3scale-kourier-gateway" \
export KSERVE_INGRESS_HOST_PORT=$(kubectl get pod -n knative-serving -l "app=3scale-kourier-gateway" \
--output=jsonpath="{.items[0].status.podIP}"):$(kubectl get pod -n knative-serving -l "app=3scale-kourier-gateway" \
--output=jsonpath="{.items[0].spec.containers[0].ports[0].containerPort}")
./test/scripts/gh-actions/run-e2e-tests.sh "kourier"
Expand All @@ -632,12 +646,13 @@ jobs:
docker image ls
kubectl get pods -n kserve
kubectl get pods -n kserve-ci-e2e-test
kubectl get pods -A --field-selector=metadata.namespace!=kserve,metadata.namespace!=kserve-ci-e2e-test
kubectl describe pods -n kserve-ci-e2e-test
kubectl get events -n kserve-ci-e2e-test
kubectl logs -l control-plane=kserve-controller-manager -n kserve -c manager
kubectl logs -l 'component in (predictor)' -c kserve-container -n kserve-ci-e2e-test --tail 500
kubectl logs -l 'component in (transformer)' -c kserve-container -n kserve-ci-e2e-test --tail 500
kubectl logs -l 'component in (explainer)' -c kserve-container -n kserve-ci-e2e-test --tail 500
kubectl logs $(kubectl get pod -n kourier-system -l "app=3scale-kourier-gateway" --output=jsonpath="{.items[0].metadata.name}") -n kourier-system
kubectl logs $(kubectl get pod -n knative-serving -l "app=3scale-kourier-gateway" --output=jsonpath="{.items[0].metadata.name}") -n knative-serving
34 changes: 22 additions & 12 deletions .github/workflows/lightgbm-docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,19 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Build image
run: |
cd python
docker buildx build . --file lgb.Dockerfile --tag $IMAGE_NAME
- name: Setup QEMU
uses: docker/setup-qemu-action@v2

- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Log into registry
run: docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_PASSWORD }}
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Push image
- name: Export version variable
run: |
IMAGE_ID=kserve/$IMAGE_NAME
Expand All @@ -71,8 +75,14 @@ jobs:
# Use Docker `latest` tag convention
[ "$VERSION" == "master" ] && VERSION=latest
echo IMAGE_ID=$IMAGE_ID
echo VERSION=$VERSION
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
docker push $IMAGE_ID:$VERSION
echo VERSION=$VERSION >> $GITHUB_ENV
echo IMAGE_ID=$IMAGE_ID >> $GITHUB_ENV
- name: Build and push
uses: docker/build-push-action@v3
with:
platforms: linux/amd64, linux/arm64/v8
context: python
file: python/lgb.Dockerfile
push: true
tags: ${{ env.IMAGE_ID }}:${{ env.VERSION }}
Loading

0 comments on commit 833f509

Please sign in to comment.