forked from kserve/kserve
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Copied over our changes in zillow/kserve, only those which are still …
…relevant. We don't need to remove ray anymore as it has been upgraded.
- Loading branch information
1 parent
32e1398
commit fb1cf95
Showing
5 changed files
with
75 additions
and
7 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
include: | ||
- project: 'analytics/artificial-intelligence/ai-platform/aip-infrastructure/ci-templates/ci-cd-template' | ||
ref: &include_ref 'v3' | ||
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: "7" | ||
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 $KSERVE_VERSION_PATH | sed -nr "s/^ *version=['\"]([^'\"]*)['\"],/\1/p") | ||
|
||
PY_LIBRARY_VERSION="${MAJOR_VERSION}.${MINOR_VERSION}.${CI_PIPELINE_IID}" | ||
if [ "${CI_COMMIT_BRANCH}" != "${CI_DEFAULT_BRANCH}" ]; then | ||
PY_LIBRARY_VERSION="${PY_LIBRARY_VERSION}-dev.${CI_PIPELINE_IID}" | ||
# Ensure the image tag is compliant with PEP-440, | ||
IMAGE_TAG="${PY_LIBRARY_VERSION}.dev${CI_PIPELINE_IID}" | ||
else | ||
IMAGE_TAG="${PY_LIBRARY_VERSION}" | ||
fi | ||
# Only apply the KServe version to the python library as 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 found the original so | ||
# python package managers can reference it as they need the version stored internally. | ||
- sed -i "s/\(version=['\"]\)[^'\"]*\(['\"]\)/\1${PY_LIBRARY_VERSION}\2/" $KSERVE_VERSION_PATH | ||
- 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.*/' | ||
|
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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]', | ||
|