Skip to content

Commit

Permalink
Add aix-explainer deploy command (kubeflow#2174)
Browse files Browse the repository at this point in the history
* Add aix-explainer deploy command

Signed-off-by: Cheng8994 <nick20000904@gmail.com>

* Add aix-explainer deploy command

Signed-off-by: Cheng8994 <nick20000904@gmail.com>
  • Loading branch information
cheng8994 authored May 14, 2022
1 parent 2533040 commit 9592b3b
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ PYTORCH_IMG ?= pytorchserver
PMML_IMG ?= pmmlserver
PADDLE_IMG ?= paddleserver
ALIBI_IMG ?= alibi-explainer
AIX_IMG ?= aix-explainer
STORAGE_INIT_IMG ?= storage-initializer
CRD_OPTIONS ?= "crd:maxDescLen=0"
KSERVE_ENABLE_SELF_SIGNED_CA ?= false
Expand Down Expand Up @@ -89,6 +90,10 @@ deploy-dev-alibi: docker-push-alibi
./hack/alibi_patch_dev.sh ${KO_DOCKER_REPO}/${ALIBI_IMG}
kustomize build config/overlays/dev-image-config | kubectl apply -f -

deploy-dev-aix: docker-push-aix
./hack/aix_patch_dev.sh ${KO_DOCKER_REPO}/${AIX_IMG}
kustomize build config/overlays/dev-image-config | kubectl apply -f -

deploy-dev-storageInitializer: docker-push-storageInitializer
./hack/storageInitializer_patch_dev.sh ${KO_DOCKER_REPO}/${STORAGE_INIT_IMG}
kustomize build config/overlays/dev-image-config | kubectl apply -f -
Expand Down Expand Up @@ -228,6 +233,12 @@ docker-build-alibi:
docker-push-alibi: docker-build-alibi
docker push ${KO_DOCKER_REPO}/${ALIBI_IMG}

docker-build-aix:
cd python && docker build -t ${KO_DOCKER_REPO}/${AIX_IMG} -f aixexplainer.Dockerfile .

docker-push-aix: docker-build-aix
docker push ${KO_DOCKER_REPO}/${AIX_IMG}

docker-build-storageInitializer:
cd python && docker build -t ${KO_DOCKER_REPO}/${STORAGE_INIT_IMG} -f storage-initializer.Dockerfile .

Expand Down
23 changes: 23 additions & 0 deletions hack/aix_patch_dev.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash
# Usage: image_patch_dev.sh [OVERLAY]
set -u
IMG=$1
if [ -z ${IMG} ]; then exit; fi
cat > config/overlays/dev-image-config/inferenceservice_patch.yaml << EOF
apiVersion: v1
kind: ConfigMap
metadata:
name: inferenceservice-config
namespace: kserve
data:
explainers: |-
{
"aix": {
"image" : "${IMG}",
"defaultImageVersion": "latest",
"allowedImageVersions": [
"latest"
]
}
}
EOF

0 comments on commit 9592b3b

Please sign in to comment.