Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync Upstream/master with ODH/master #471

Open
wants to merge 29 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
b836fc8
Remove redundant namespace yaml (#4148)
greenmoon55 Dec 23, 2024
cb38637
Fix Localmodel agent build (#4150)
greenmoon55 Dec 23, 2024
41a1fd7
Fix model server fails to gracefully shutdown (#4116)
sivanantha321 Dec 24, 2024
07edb56
Ensure root model directory exists and add protection for jobs create…
yuzisun Dec 24, 2024
61b0746
Enable transformer deeper readiness check tests (#4121)
sivanantha321 Dec 26, 2024
5e5bff8
Update HuggingFace server dependencies versions (#4147)
AyushSawant18588 Dec 26, 2024
874a4a4
Add workflow for verifying go mod (#4137)
sivanantha321 Dec 26, 2024
ff13ef8
Fix for CVE-2024-52304 - aiohttp upgrade (#4113)
andyi2it Dec 27, 2024
7bec6fb
Allow other engine builders other than docker (#3906)
spolti Dec 30, 2024
8f79c44
Add localmodelnode crd to helm chart (#4161)
greenmoon55 Jan 2, 2025
5b718bc
Fixes Non-linear parsing of case-insensitive content (#4158)
spolti Jan 3, 2025
3e842b8
Helm chart - option to run daemonset as root (#4164)
greenmoon55 Jan 3, 2025
7b2681f
Replace nodeGroup with nodeGroups in charts/kserve-crd (#4166)
ritzdevp Jan 5, 2025
3597fa7
Add affinity and tolerations to localmodel daemonset (#4173)
greenmoon55 Jan 7, 2025
cb8a657
Fix s3 download PermanentRedirectError for legacy s3 endpoint (#4157)
bentohset Jan 8, 2025
654d314
Make label and annotation propagation configurable (#4030)
spolti Jan 8, 2025
b7155b3
Add ModelCache e2e test (#4136)
sivanantha321 Jan 11, 2025
717c6ae
Update vllm to 0.6.6 (#4176)
rajatvig Jan 12, 2025
1b64da9
[bugfix] fix s3 storage download filename bug (#4162)
anencore94 Jan 13, 2025
8a32b6f
Add hf to storageuri prefix list (#4184)
tjandy98 Jan 16, 2025
990e412
Add Support for OpenAI-compatible Embeddings API (#4129)
FabianScheidt Jan 16, 2025
d377350
fix: typo in _construct_http_status_error method (#4190)
Mgla96 Jan 16, 2025
a1ad62b
Fix raw logger e2e test (#4185)
sivanantha321 Jan 19, 2025
b164ea0
Feat: Support configuring isvc resource defaults (#4032)
andyi2it Jan 21, 2025
6653b89
keep replicas when autoscaler set external (#4196)
Jooho Jan 22, 2025
6f842d6
Increase kserve controller readiness probe time period (#4200)
sivanantha321 Jan 22, 2025
1d0afe1
Fix golangci-lint binary path selection based on GOBIN (#4198)
Jooho Jan 22, 2025
96f43de
Add option to disable volume management in localModel config (#4186)
ritzdevp Jan 22, 2025
7560598
Merge branch 'upstream-master' into odh-master
spolti Jan 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions .github/actions/minikube-setup/action.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
name: 'Minikube setup action'
description: 'Sets up minikube on the github runner'

inputs:
nodes:
description: 'Number of nodes to start minikube with'
required: false
default: '1'
driver:
description: 'Driver to use for minikube'
required: false
default: 'none'
start-args:
description: 'Additional arguments to pass to minikube start'
required: false
default: ''

runs:
using: "composite"
steps:
Expand All @@ -14,9 +28,11 @@ runs:
with:
minikube-version: '1.33.1'
kubernetes-version: 'v1.29.7'
driver: 'none'
driver: ${{ inputs.driver }}
wait: 'all'
start-args: --wait-timeout=6m0s
cpus: 'max'
memory: 'max'
start-args: --wait-timeout=6m0s --nodes=${{ inputs.nodes }} ${{ inputs.start-args }}

- name: Check Kubernetes pods
shell: bash
Expand Down
138 changes: 136 additions & 2 deletions .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ env:
# Controller images
CONTROLLER_IMG: "kserve-controller"
LOCALMODEL_CONTROLLER_IMG: "kserve-localmodel-controller"
LOCALMODEL_AGENT_IMG: "kserve-localmodelnode-agent"
STORAGE_INIT_IMG: "storage-initializer"
AGENT_IMG: "agent"
ROUTER_IMG: "router"
Expand Down Expand Up @@ -87,6 +88,14 @@ jobs:
compression-level: 0
if-no-files-found: error

- name: Upload localmodel agent image
uses: actions/upload-artifact@v4
with:
name: ${{ env.BASE_ARTIFACT_PREFIX }}-${{ env.LOCALMODEL_AGENT_IMG }}-${{ github.sha }}
path: ${{ env.DOCKER_IMAGES_PATH }}/${{ env.LOCALMODEL_AGENT_IMG }}-${{ github.sha }}
compression-level: 0
if-no-files-found: error

- name: Upload agent image
uses: actions/upload-artifact@v4
with:
Expand Down Expand Up @@ -900,7 +909,7 @@ jobs:
test-llm:
runs-on: ubuntu-22.04
needs:
[ kserve-image-build, predictor-runtime-build]
[kserve-image-build, predictor-runtime-build]
steps:
- name: Checkout source
uses: actions/checkout@v4
Expand Down Expand Up @@ -960,7 +969,7 @@ jobs:
test-huggingface-server-vllm:
runs-on: ubuntu-22.04
needs:
[ kserve-image-build, predictor-runtime-build]
[kserve-image-build, predictor-runtime-build]
steps:
- name: Checkout source
uses: actions/checkout@v4
Expand Down Expand Up @@ -1015,4 +1024,129 @@ jobs:
- name: Check system status
if: always()
run: |
./test/scripts/gh-actions/status-check.sh

test-modelcache:
runs-on: ubuntu-22.04
needs:
[kserve-image-build, predictor-runtime-build]
steps:
- name: Checkout source
uses: actions/checkout@v4

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

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: "1.22"

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.9"

- name: Create tmp-images directory
run: |
sudo mkdir -p /tmp-images
sudo chown -R $USER /tmp-images

- name: Setup Minikube
uses: ./.github/actions/minikube-setup
with:
nodes: 3
driver: "docker"
start-args: "--mount --mount-string=/tmp-images:/tmp-images"

- name: Create minikube tunnel
run: |
nohup minikube tunnel > minikube-tunnel.log 2>&1 &

- name: KServe dependency setup
uses: ./.github/actions/kserve-dep-setup

- name: Download base images
uses: actions/download-artifact@v4
with:
path: /tmp-images
pattern: ${{ env.BASE_ARTIFACT_PREFIX }}-*
merge-multiple: true

- name: Load base docker images
run: |
ls -l /tmp-images
minikube ssh -n minikube -- ls -l /tmp-images
files=$(find /tmp-images -maxdepth 1 -type f)
for file in ${files[@]};do
echo "Loading image $(basename ${file})"
minikube ssh -n minikube -- docker image load -i ${file}
minikube ssh -n minikube-m02 -- docker image load -i ${file}
minikube ssh -n minikube-m03 -- docker image load -i ${file}
done
sudo rm -rf /tmp-images/*
minikube ssh -n minikube -- docker image ls
minikube ssh -n minikube-m02 -- docker image ls
minikube ssh -n minikube-m03 -- docker image ls

- name: Download huggingface server image
uses: actions/download-artifact@v4
with:
name: ${{ env.HUGGINGFACE_IMG }}-${{ github.sha }}
path: /tmp-images

- name: Load runtime docker images
run: |
files=$(find /tmp-images -maxdepth 1 -type f)
for file in ${files[@]};do
echo "Loading image $(basename ${file})"
minikube ssh -n minikube-m02 -- docker image load -i ${file}
done
sudo rm -rf tmp-images/*
minikube ssh -n minikube-m02 -- docker image ls

- name: Create model root directory
run: |
minikube ssh -n minikube-m02 -- sudo mkdir -p -m=777 /models
minikube ssh -n minikube-m03 -- sudo mkdir -p -m=777 /models

- name: Install Poetry and version plugin
run: ./test/scripts/gh-actions/setup-poetry.sh

- name: Install KServe
run: |
./test/scripts/gh-actions/setup-kserve.sh

kubectl get pods -n kserve
kubectl describe pods -n kserve

- name: Enable modelcache
run: |
sed -i -e "s/latest/${GITHUB_SHA}/g" config/overlays/test/configmap/inferenceservice-enable-modelcache.yaml
kubectl patch configmaps -n kserve inferenceservice-config --patch-file config/overlays/test/configmap/inferenceservice-enable-modelcache.yaml
kubectl describe configmaps -n kserve inferenceservice-config

- name: Create localmodel job namespace
run: |
kubectl create ns kserve-localmodel-jobs

- name: Label worker nodes for modelcache
run: |
kubectl label nodes -l '!node-role.kubernetes.io/control-plane' kserve/localmodel=worker

- name: Enable nodeselector in knative
run: |
kubectl patch configmaps -n knative-serving config-features --patch '{"data": {"kubernetes.podspec-nodeselector": "enabled"}}'

- name: Run E2E tests
timeout-minutes: 15
run: |
./test/scripts/gh-actions/run-e2e-tests.sh "modelcache" "1"

- name: Check system status
if: always()
run: |
echo "::group::Minikube tunnel logs"
cat minikube-tunnel.log
echo "::endgroup::"
./test/scripts/gh-actions/status-check.sh
38 changes: 37 additions & 1 deletion .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,47 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.22'
go-version: "1.22"
cache: false
- name: golangci-lint
uses: golangci/golangci-lint-action@v4
with:
version: v1.56
args: --out-format=line-number

verify-go-mod:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v4

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.22
cache: false

- name: Run go mod tidy
run: |
go mod tidy

- name: Verify
shell: bash
run: |
# From: https://backreference.org/2009/12/23/how-to-match-newlines-in-sed/
# This is to leverage this workaround:
# https://github.com/actions/toolkit/issues/193#issuecomment-605394935
urlencode() {
sed ':begin;$!N;s/\n/%0A/;tbegin'
}

if [ -z "$(git status --porcelain)" ]; then
echo "${{ github.repository }} up to date."
else
echo "Found diffs in: $(git diff-index --name-only HEAD)"
for x in $(git diff-index --name-only HEAD); do
echo "::error file=$x::Please run 'go mod tidy'.%0A$(git diff $x | urlencode)"
done
echo "${{ github.repository }} is out of date. Please run 'go mod tidy'"
exit 1
fi
95 changes: 95 additions & 0 deletions .github/workflows/kserve-localmodel-agent-docker-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
name: Kserve localmodel agent Docker Publisher

on:
push:
# Publish `master` as Docker `latest` image.
branches:
- master

# Publish `v1.2.3` tags as releases.
tags:
- v*

# Run tests for any PRs.
pull_request:

env:
IMAGE_NAME: kserve-localmodelnode-agent

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
# Run tests.
# See also https://docs.docker.com/docker-hub/builds/automated-testing/
test:
runs-on: ubuntu-latest

steps:
- name: Checkout source
uses: actions/checkout@v4

- name: Run tests
run: |
if [ -f docker-compose.test.yml ]; then
docker-compose --file docker-compose.test.yml build
docker-compose --file docker-compose.test.yml run sut
else
docker buildx build . --file localmodel-agent.Dockerfile
fi

# Push image to GitHub Packages.
# See also https://docs.docker.com/docker-hub/builds/
push:
# Ensure test job passes before pushing image.
needs: test

runs-on: ubuntu-latest
if: github.event_name == 'push'

steps:
- name: Checkout source
uses: actions/checkout@v4

- name: Setup QEMU
uses: docker/setup-qemu-action@v3

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

- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: export version variable
run: |
IMAGE_ID=kserve/$IMAGE_NAME

# Change all uppercase to lowercase
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')

# Strip git ref prefix from version
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')

# Strip "v" prefix from tag name
# [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')

# Use Docker `latest` tag convention
[ "$VERSION" == "master" ] && VERSION=latest

echo VERSION=$VERSION >> $GITHUB_ENV
echo IMAGE_ID=$IMAGE_ID >> $GITHUB_ENV

- name: Build and push
uses: docker/build-push-action@v5
with:
platforms: linux/amd64,linux/arm/v7,linux/arm64/v8,linux/ppc64le,linux/s390x
context: .
file: localmodel-agent.Dockerfile
push: true
tags: ${{ env.IMAGE_ID }}:${{ env.VERSION }}
# https://github.com/docker/buildx/issues/1533
provenance: false
11 changes: 3 additions & 8 deletions .github/workflows/scheduled-image-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,10 @@ jobs:
[
{ name: kserve-controller, file: Dockerfile },
{ name: agent, file: agent.Dockerfile },
{
name: storage-initializer,
file: python/storage-initializer.Dockerfile,
},
{ name: storage-initializer, file: python/storage-initializer.Dockerfile },
{ name: router, file: router.Dockerfile },
{ name: kserve-localmodel-controller, file: localmodel.Dockerfile },
{ name: kserve-localmodelnode-agent, file: localmodel-agent.Dockerfile },
]

steps:
Expand Down Expand Up @@ -112,10 +110,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
image:
[
{ name: art-explainer, file: python/artexplainer.Dockerfile },
]
image: [{ name: art-explainer, file: python/artexplainer.Dockerfile }]

steps:
- name: Checkout
Expand Down
Loading
Loading