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

Update the release branch with our changes to the kserve fork #6

Merged
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ bin
# Notebook Checkpoints
.ipynb_checkpoints

.gitlab-ci.yml
.openapi-generator-ignore
.openapi-generator/

Expand Down
58 changes: 58 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
include:
- project: 'analytics/artificial-intelligence/ai-platform/aip-infrastructure/ci-templates/ci-cd-template'
ref: &include_ref 'v4'
file: 'environments/devex.yml'
- project: 'analytics/artificial-intelligence/ai-platform/aip-infrastructure/ci-templates/ci-cd-template'
ref: *include_ref
file: '/blocks/python.yml'

variables:
PY_LIBRARY_NAME: "zillow-kserve"
MAJOR_VERSION: "0"
MINOR_VERSION: "10"
RELEASE_BRANCH: "zillow/release-0.10.2"
KSERVE_VERSION_PATH: "python/kserve/setup.py"
PUBLISH: "true"

stages:
- build

.version: &version |
# Extract the open source KServe version as the basis for our forked library version.
KSERVE_VERSION=$(cat python/VERSION)

PY_LIBRARY_VERSION="${MAJOR_VERSION}.${MINOR_VERSION}.${CI_PIPELINE_IID}"
if [ "${CI_COMMIT_BRANCH}" != "${RELEASE_BRANCH}" ]; then
PY_LIBRARY_VERSION="${PY_LIBRARY_VERSION}.dev${CI_PIPELINE_IID}"
fi
IMAGE_TAG="${PY_LIBRARY_VERSION}"
akdigitalself marked this conversation as resolved.
Show resolved Hide resolved

# Suffix the KServe version to the python library version only, because Docker versions
# do not have the concept of build metadata and the "+" character causes errors.
PY_LIBRARY_VERSION="${PY_LIBRARY_VERSION}+${KSERVE_VERSION}"

build:publish:
extends: .aip_python_debian_image
stage: build
script:
- *version
# Now write back the zillow-kserve version back to the original location we got it from,
# so python package managers can reference it as they need the version stored internally.
- echo "${PY_LIBRARY_VERSION}" > python/VERSION
- cd python/kserve
- python setup.py sdist
# Set up the configuration for Artifactory to publish the python package internally.
- |
cat >~/.pypirc <<EOL
[distutils]
index-servers = local
[local]
repository: ${ANALYTICS_PYPI_REPOSITORY}
username: ${PYPI_USERNAME}
password: ${PYPI_PASSWORD}
EOL
- python setup.py sdist upload --repository "${ANALYTICS_PYPI_REPOSITORY}"
rules:
- if: '$PUBLISH == "true"'
# only trigger on zillow/ branches
- if: '$CI_COMMIT_BRANCH =~ /^zillow.*/'
13 changes: 10 additions & 3 deletions python/kserve/kserve/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,16 @@
from azure.storage.blob._list_blobs_helper import BlobPrefix
from azure.storage.fileshare import ShareServiceClient

from botocore.client import Config
from botocore import UNSIGNED
import boto3
# AIP: we'll never use them
try:
from botocore.client import Config
from botocore import UNSIGNED
import boto3
except ImportError:
Config = None
UNSIGNED = None
boto3 = None

from google.auth import exceptions
from google.cloud import storage

Expand Down
6 changes: 4 additions & 2 deletions python/kserve/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@ azure-storage-file-share==12.7.0
azure-identity>=1.8.0
cloudevents>=1.6.2
avro>=1.11.0
boto3~=1.21
# AIP: remove boto dependencies as we are not using them and they will slow down dependency resolution
# boto3~=1.21
psutil>=5.9.0
ray[serve]==2.0.0
# AIP: relax ray for vllm
ray[serve]>=2.0.0
grpcio>=1.34.0
tritonclient==2.18.0
protobuf>=3.19.0
Expand Down
2 changes: 1 addition & 1 deletion python/kserve/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
version = version_file.read().strip()

setuptools.setup(
name='kserve',
name='zillow-kserve',
version=version,
author="The KServe Authors",
author_email='[email protected], [email protected], [email protected]',
Expand Down
Loading