diff --git a/.github/actions/base-download/action.yml b/.github/actions/base-download/action.yml index ce9a7d189cd..9d6feac6df0 100644 --- a/.github/actions/base-download/action.yml +++ b/.github/actions/base-download/action.yml @@ -4,23 +4,34 @@ description: 'A wrapper around download docker artifact to download a set of bas runs: using: "composite" steps: - - - name: Download controller image - uses: ishworkh/docker-image-artifact-download@v1 - with: - image: "kserve/kserve-controller:${{ github.sha }}" - - - name: Download agent image - uses: ishworkh/docker-image-artifact-download@v1 + - name: Download base artifacts + uses: actions/download-artifact@v4 with: - image: "kserve/agent:${{ github.sha }}" - - - name: Download storage initializer image - uses: ishworkh/docker-image-artifact-download@v1 - with: - image: "kserve/storage-initializer:${{ github.sha }}" + path: ./tmp + pattern: ${{ env.BASE_ARTIFACT_PREFIX }}-* + merge-multiple: ture +# +# - name: Load base images +# run: | +# pushd ./tmp >> /dev/null +# docker image load -i sflj - - name: Download router image - uses: ishworkh/docker-image-artifact-download@v1 - with: - image: "kserve/router:${{ github.sha }}" +# - name: Download controller image +# uses: ishworkh/docker-image-artifact-download@v1 +# with: +# image: "kserve/kserve-controller:${{ github.sha }}" +# +# - name: Download agent image +# uses: ishworkh/docker-image-artifact-download@v1 +# with: +# image: "kserve/agent:${{ github.sha }}" +# +# - name: Download storage initializer image +# uses: ishworkh/docker-image-artifact-download@v1 +# with: +# image: "kserve/storage-initializer:${{ github.sha }}" +# +# - name: Download router image +# uses: ishworkh/docker-image-artifact-download@v1 +# with: +# image: "kserve/router:${{ github.sha }}" diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml index 7e736f5409b..36050dd141a 100644 --- a/.github/workflows/e2e-test.yml +++ b/.github/workflows/e2e-test.yml @@ -13,6 +13,35 @@ on: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + DOCKER_IMAGES_PATH: /mnt/docker-images + DOCKER_REPO: kserve + PREDICTOR_ARTIFACT_PREFIX: pred + EXPLAINER_ARTIFACT_PREFIX: exp + TRANSFORMER_ARTIFACT_PREFIX: trans + GRAPH_ARTIFACT_PREFIX: graph + BASE_ARTIFACT_PREFIX: base + # Controller images + CONTROLLER_IMG: kserve-controller + STORAGE_INIT_IMG: storage-initializer + AGENT_IMG: agent + ROUTER_IMG: router + # Predictor runtime server images + SKLEARN_IMG: sklearnserver + XGB_IMG: xgbserver + LGB_IMG: lgbserver + PMML_IMG: pmmlserver + PADDLE_IMG: paddleserver + CUSTOM_MODEL_GRPC_IMG: custom-model-grpc + # Explainer images + ALIBI_IMG: alibi-explainer + ART_IMG: art-explainer + # Transformer images + IMAGE_TRANSFORMER_IMG: image-transformer + CUSTOM_TRANSFORMER_GRPC_IMG: custom-image-transformer-grpc + # Graph images + SUCCESS_200_ISVC_IMG: success-200-isvc + ERROR_404_ISVC_IMG: error-404-isvc + concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -26,29 +55,39 @@ jobs: - name: Build KServe images run: | + sudo mkdir -p ${DOCKER_IMAGES_PATH} + sudo chown -R $USER ${DOCKER_IMAGES_PATH} ./test/scripts/gh-actions/build-images.sh docker image ls - cat ./config/overlays/test/configmap/inferenceservice.yaml + sudo ls -l ${DOCKER_IMAGES_PATH} - name: Upload controller image - uses: ishworkh/docker-image-artifact-upload@v1 + uses: actions/upload-artifact@v4 with: - image: "kserve/kserve-controller:${{ github.sha }}" + name: ${{ env.BASE_ARTIFACT_PREFIX }}-${{ env.CONTROLLER_IMG }}-${{ github.sha }} + path: ${{ env.DOCKER_IMAGES_PATH }}/${{ env.CONTROLLER_IMG }} + compression-level: 0 - name: Upload agent image - uses: ishworkh/docker-image-artifact-upload@v1 + uses: actions/upload-artifact@v4 with: - image: "kserve/agent:${{ github.sha }}" + name: ${{ env.BASE_ARTIFACT_PREFIX }}-${{ env.AGENT_IMG }}-${{ github.sha }} + path: ${{ env.DOCKER_IMAGES_PATH }}/${{ env.AGENT_IMG }} + compression-level: 0 - name: Upload storage initializer image - uses: ishworkh/docker-image-artifact-upload@v1 + uses: actions/upload-artifact@v4 with: - image: "kserve/storage-initializer:${{ github.sha }}" + name: ${{ env.BASE_ARTIFACT_PREFIX }}-${{ env.STORAGE_INIT_IMG }}-${{ github.sha }} + path: ${{ env.DOCKER_IMAGES_PATH }}/${{ env.STORAGE_INIT_IMG }} + compression-level: 0 - name: Upload router image - uses: ishworkh/docker-image-artifact-upload@v1 + uses: actions/upload-artifact@v4 with: - image: "kserve/router:${{ github.sha }}" + name: ${{ env.BASE_ARTIFACT_PREFIX }}-${{ env.ROUTER_IMG }}-${{ github.sha }} + path: ${{ env.DOCKER_IMAGES_PATH }}/${{ env.ROUTER_IMG }} + compression-level: 0 poetry-check: runs-on: ubuntu-latest @@ -76,49 +115,68 @@ jobs: - name: Build runtime server images run: | + sudo mkdir -p ${DOCKER_IMAGES_PATH} + sudo chown -R $USER ${DOCKER_IMAGES_PATH} ./test/scripts/gh-actions/build-server-runtimes.sh predictor,transformer docker image ls - cat ./config/overlays/test/configmap/inferenceservice.yaml + sudo ls -l /mnt + sudo ls -l ${DOCKER_IMAGES_PATH} - - name: Upload sklearn server image - uses: ishworkh/docker-image-artifact-upload@v1 + - name: Upload sklearn artifact + uses: actions/upload-artifact@v4 with: - image: "kserve/sklearnserver:${{ github.sha }}" + name: ${{ env.PREDICTOR_ARTIFACT_PREFIX }}-${{ env.SKLEARN_IMG }}-${{ github.sha }} + path: ${{ env.DOCKER_IMAGES_PATH }}/${{ env.SKLEARN_IMG }} + compression-level: 0 - name: Upload xgb server image - uses: ishworkh/docker-image-artifact-upload@v1 + uses: actions/upload-artifact@v4 with: - image: "kserve/xgbserver:${{ github.sha }}" + name: ${{ env.PREDICTOR_ARTIFACT_PREFIX }}-${{ env.XGB_IMG }}-${{ github.sha }} + path: ${{ env.DOCKER_IMAGES_PATH }}/${{ env.XGB_IMG }} + compression-level: 0 - name: Upload lgb server image - uses: ishworkh/docker-image-artifact-upload@v1 + uses: actions/upload-artifact@v4 with: - image: "kserve/lgbserver:${{ github.sha }}" + name: ${{ env.PREDICTOR_ARTIFACT_PREFIX }}-${{ env.LGB_IMG }}-${{ github.sha }} + path: ${{ env.DOCKER_IMAGES_PATH }}/${{ env.LGB_IMG }} + compression-level: 0 - name: Upload pmml server image - uses: ishworkh/docker-image-artifact-upload@v1 + uses: actions/upload-artifact@v4 with: - image: "kserve/pmmlserver:${{ github.sha }}" + name: ${{ env.PREDICTOR_ARTIFACT_PREFIX }}-${{ env.PMML_IMG }}-${{ github.sha }} + path: ${{ env.DOCKER_IMAGES_PATH }}/${{ env.PMML_IMG }} + compression-level: 0 - name: Upload paddle image - uses: ishworkh/docker-image-artifact-upload@v1 + uses: actions/upload-artifact@v4 with: - image: "kserve/paddleserver:${{ github.sha }}" + name: ${{ env.PREDICTOR_ARTIFACT_PREFIX }}-${{ env.PADDLE_IMG }}-${{ github.sha }} + path: ${{ env.DOCKER_IMAGES_PATH }}/${{ env.PADDLE_IMG }} + compression-level: 0 - name: Upload image transformer image - uses: ishworkh/docker-image-artifact-upload@v1 + uses: actions/upload-artifact@v4 with: - image: "kserve/image-transformer:${{ github.sha }}" + name: ${{ env.TRANSFORMER_ARTIFACT_PREFIX }}-${{ env.IMAGE_TRANSFORMER_IMG }}-${{ github.sha }} + path: ${{ env.DOCKER_IMAGES_PATH }}/${{ env.IMAGE_TRANSFORMER_IMG }} + compression-level: 0 - name: Upload custom model grpc image - uses: ishworkh/docker-image-artifact-upload@v1 + uses: actions/upload-artifact@v4 with: - image: "kserve/custom-model-grpc:${{ github.sha }}" + name: ${{ env.PREDICTOR_ARTIFACT_PREFIX }}-${{ env.CUSTOM_MODEL_GRPC_IMG }}-${{ github.sha }} + path: ${{ env.DOCKER_IMAGES_PATH }}/${{ env.CUSTOM_MODEL_GRPC_IMG }} + compression-level: 0 - name: Upload custom model transformer grpc image - uses: ishworkh/docker-image-artifact-upload@v1 + uses: actions/upload-artifact@v4 with: - image: "kserve/custom-image-transformer-grpc:${{ github.sha }}" + name: ${{ env.TRANSFORMER_ARTIFACT_PREFIX }}-${{ env.CUSTOM_TRANSFORMER_GRPC_IMG }}-${{ github.sha }} + path: ${{ env.DOCKER_IMAGES_PATH }}/${{ env.CUSTOM_TRANSFORMER_GRPC_IMG }} + compression-level: 0 explainer-runtime-build: runs-on: ubuntu-latest @@ -128,19 +186,25 @@ jobs: - name: Build runtime server images run: | + sudo mkdir -p ${DOCKER_IMAGES_PATH} + sudo chown -R $USER ${DOCKER_IMAGES_PATH} ./test/scripts/gh-actions/build-server-runtimes.sh explainer docker image ls - cat ./config/overlays/test/configmap/inferenceservice.yaml + sudo ls -l ${DOCKER_IMAGES_PATH} - name: Upload alibi image - uses: ishworkh/docker-image-artifact-upload@v1 + uses: actions/upload-artifact@v4 with: - image: "kserve/alibi-explainer:${{ github.sha }}" + name: ${{ env.EXPLAINER_ARTIFACT_PREFIX }}-${{ env.ALIBI_IMG }}-${{ github.sha }} + path: ${{ env.DOCKER_IMAGES_PATH }}/${{ env.ALIBI_IMG }} + compression-level: 0 - name: Upload art explainer image - uses: ishworkh/docker-image-artifact-upload@v1 + uses: actions/upload-artifact@v4 with: - image: "kserve/art-explainer:${{ github.sha }}" + name: ${{ env.EXPLAINER_ARTIFACT_PREFIX }}-${{ env.ART_IMG }}-${{ github.sha }} + path: ${{ env.DOCKER_IMAGES_PATH }}/${{ env.ART_IMG }} + compression-level: 0 graph-tests-images-build: runs-on: ubuntu-latest @@ -153,18 +217,25 @@ jobs: - name: Build test images needed for graph tests run: | + sudo mkdir -p ${DOCKER_IMAGES_PATH} + sudo chown -R $USER ${DOCKER_IMAGES_PATH} ./test/scripts/gh-actions/build-graph-tests-images.sh docker image ls + sudo ls -l ${DOCKER_IMAGES_PATH} - name: Upload success_200_isvc predictor image - uses: ishworkh/docker-image-artifact-upload@v1 + uses: actions/upload-artifact@v4 with: - image: "kserve/success-200-isvc:${{ github.sha }}" + name: ${{ env.GRAPH_ARTIFACT_PREFIX }}-${{ env.SUCCESS_200_ISVC_IMG }}-${{ github.sha }} + path: ${{ env.DOCKER_IMAGES_PATH }}/${{ env.SUCCESS_200_ISVC_IMG }} + compression-level: 0 - name: Upload error_404_isvc predictor image - uses: ishworkh/docker-image-artifact-upload@v1 + uses: actions/upload-artifact@v4 with: - image: "kserve/error-404-isvc:${{ github.sha }}" + name: ${{ env.GRAPH_ARTIFACT_PREFIX }}-${{ env.ERROR_404_ISVC_IMG }}-${{ github.sha }} + path: ${{ env.DOCKER_IMAGES_PATH }}/${{ env.ERROR_404_ISVC_IMG }} + compression-level: 0 test-fast: runs-on: ubuntu-latest @@ -199,35 +270,43 @@ jobs: - name: KServe dependency setup uses: ./.github/actions/kserve-dep-setup - - name: Download sklearn server image - uses: ishworkh/docker-image-artifact-download@v1 - with: - image: "kserve/sklearnserver:${{ github.sha }}" - - - name: Download xgb server image - uses: ishworkh/docker-image-artifact-download@v1 - with: - image: "kserve/xgbserver:${{ github.sha }}" - - - name: Download lgb server image - uses: ishworkh/docker-image-artifact-download@v1 - with: - image: "kserve/lgbserver:${{ github.sha }}" - - - name: Download pmml image - uses: ishworkh/docker-image-artifact-download@v1 - with: - image: "kserve/pmmlserver:${{ github.sha }}" - - - name: Download paddle image - uses: ishworkh/docker-image-artifact-download@v1 - with: - image: "kserve/paddleserver:${{ github.sha }}" - - - name: Download custom model grpc image - uses: ishworkh/docker-image-artifact-download@v1 - with: - image: "kserve/custom-model-grpc:${{ github.sha }}" + - name: Download predictor artifacts + uses: actions/download-artifact@v4 + with: + path: ./tmp + pattern: ${{ env.PREDICTOR_ARTIFACT_PREFIX }}-* + merge-multiple: true + + +# - name: Download sklearn server image +# uses: ishworkh/container-image-artifact-download@v1.0.0 +# with: +# image: "kserve/sklearnserver:${{ github.sha }}" +# +# - name: Download xgb server image +# uses: ishworkh/container-image-artifact-download@v1.0.0 +# with: +# image: "kserve/xgbserver:${{ github.sha }}" +# +# - name: Download lgb server image +# uses: ishworkh/container-image-artifact-download@v1.0.0 +# with: +# image: "kserve/lgbserver:${{ github.sha }}" +# +# - name: Download pmml image +# uses: ishworkh/container-image-artifact-download@v1.0.0 +# with: +# image: "kserve/pmmlserver:${{ github.sha }}" +# +# - name: Download paddle image +# uses: ishworkh/container-image-artifact-download@v1.0.0 +# with: +# image: "kserve/paddleserver:${{ github.sha }}" +# +# - name: Download custom model grpc image +# uses: ishworkh/container-image-artifact-download@v1.0.0 +# with: +# image: "kserve/custom-model-grpc:${{ github.sha }}" - name: Install Poetry and version plugin run: ./test/scripts/gh-actions/setup-poetry.sh @@ -267,41 +346,48 @@ jobs: - uses: ./.github/actions/kserve-dep-setup - uses: ./.github/actions/base-download + - name: Download transformer and explainer artifacts + uses: actions/download-artifact@v4 + with: + path: ./tmp + pattern: ${{ env.TRANSFORMER_ARTIFACT_PREFIX }}-*|${{ env.EXPLAINER_ARTIFACT_PREFIX }}-* + merge-multiple: true + - name: Download sklearn server image - uses: ishworkh/docker-image-artifact-download@v1 + uses: actions/download-artifact@v4 with: - image: "kserve/sklearnserver:${{ github.sha }}" + name: ${{ env.PREDICTOR_ARTIFACT_PREFIX }}-${{ env.SKLEARN_IMG }} + path: ./tmp - name: Download custom model grpc image uses: ishworkh/docker-image-artifact-download@v1 with: image: "kserve/custom-model-grpc:${{ github.sha }}" - - name: Download transformer image - uses: ishworkh/docker-image-artifact-download@v1 - with: - image: "kserve/image-transformer:${{ github.sha }}" - - - name: Download custom transformer grpc image - uses: ishworkh/docker-image-artifact-download@v1 - with: - image: "kserve/custom-image-transformer-grpc:${{ github.sha }}" - +# - name: Download transformer image +# uses: ishworkh/container-image-artifact-download@v1.0.0 +# with: +# image: "kserve/image-transformer:${{ github.sha }}" +# +# - name: Download custom transformer grpc image +# uses: ishworkh/container-image-artifact-download@v1.0.0 +# with: +# image: "kserve/custom-image-transformer-grpc:${{ github.sha }}" - name: Download xgb server image - uses: ishworkh/docker-image-artifact-download@v1 + uses: ishworkh/container-image-artifact-download@v1.0.0 with: image: "kserve/xgbserver:${{ github.sha }}" - - name: Download alibi image - uses: ishworkh/docker-image-artifact-download@v1 - with: - image: "kserve/alibi-explainer:${{ github.sha }}" - - - name: Download art explainer image - uses: ishworkh/docker-image-artifact-download@v1 - with: - image: "kserve/art-explainer:${{ github.sha }}" +# - name: Download alibi image +# uses: ishworkh/container-image-artifact-download@v1.0.0 +# with: +# image: "kserve/alibi-explainer:${{ github.sha }}" +# +# - name: Download art explainer image +# uses: ishworkh/container-image-artifact-download@v1.0.0 +# with: +# image: "kserve/art-explainer:${{ github.sha }}" - name: Install Poetry and version plugin run: ./test/scripts/gh-actions/setup-poetry.sh @@ -358,7 +444,7 @@ jobs: uses: ./.github/actions/kserve-dep-setup - name: Download sklearn server image - uses: ishworkh/docker-image-artifact-download@v1 + uses: ishworkh/container-image-artifact-download@v1.0.0 with: image: "kserve/sklearnserver:${{ github.sha }}" @@ -368,12 +454,12 @@ jobs: image: "kserve/xgbserver:${{ github.sha }}" - name: Download success_200_isvc predictor image - uses: ishworkh/docker-image-artifact-download@v1 + uses: ishworkh/container-image-artifact-download@v1.0.0 with: image: "kserve/success-200-isvc:${{ github.sha }}" - name: Download error_404_isvc predictor image - uses: ishworkh/docker-image-artifact-download@v1 + uses: ishworkh/container-image-artifact-download@v1.0.0 with: image: "kserve/error-404-isvc:${{ github.sha }}" @@ -434,12 +520,12 @@ jobs: uses: ./.github/actions/kserve-dep-setup - name: Download sklearn server image - uses: ishworkh/docker-image-artifact-download@v1 + uses: ishworkh/container-image-artifact-download@v1.0.0 with: image: "kserve/sklearnserver:${{ github.sha }}" - name: Download xgb server image - uses: ishworkh/docker-image-artifact-download@v1 + uses: ishworkh/container-image-artifact-download@v1.0.0 with: image: "kserve/xgbserver:${{ github.sha }}" @@ -498,7 +584,7 @@ jobs: ./test/scripts/gh-actions/build-qpext-image.sh docker image ls - name: Download sklearn server image - uses: ishworkh/docker-image-artifact-download@v1 + uses: ishworkh/container-image-artifact-download@v1.0.0 with: image: "kserve/sklearnserver:${{ github.sha }}" - name: Install Poetry and version plugin @@ -580,12 +666,12 @@ jobs: - uses: ./.github/actions/base-download - name: Download sklearn server image - uses: ishworkh/docker-image-artifact-download@v1 + uses: ishworkh/container-image-artifact-download@v1.0.0 with: image: "kserve/sklearnserver:${{ github.sha }}" - name: Download transformer image - uses: ishworkh/docker-image-artifact-download@v1 + uses: ishworkh/container-image-artifact-download@v1.0.0 with: image: "kserve/image-transformer:${{ github.sha }}" @@ -635,22 +721,22 @@ jobs: - uses: ./.github/actions/base-download - name: Download sklearn server image - uses: ishworkh/docker-image-artifact-download@v1 + uses: ishworkh/container-image-artifact-download@v1.0.0 with: image: "kserve/sklearnserver:${{ github.sha }}" - name: Download xgb server image - uses: ishworkh/docker-image-artifact-download@v1 + uses: ishworkh/container-image-artifact-download@v1.0.0 with: image: "kserve/xgbserver:${{ github.sha }}" - name: Download success_200_isvc predictor image - uses: ishworkh/docker-image-artifact-download@v1 + uses: ishworkh/container-image-artifact-download@v1.0.0 with: image: "kserve/success-200-isvc:${{ github.sha }}" - name: Download error_404_isvc predictor image - uses: ishworkh/docker-image-artifact-download@v1 + uses: ishworkh/container-image-artifact-download@v1.0.0 with: image: "kserve/error-404-isvc:${{ github.sha }}" diff --git a/test/scripts/gh-actions/build-graph-tests-images.sh b/test/scripts/gh-actions/build-graph-tests-images.sh index 3660f6187b6..9696f8f9145 100755 --- a/test/scripts/gh-actions/build-graph-tests-images.sh +++ b/test/scripts/gh-actions/build-graph-tests-images.sh @@ -19,16 +19,19 @@ set -o errexit set -o nounset set -o pipefail + echo "Github SHA ${GITHUB_SHA}" -export SUCCESS_200_ISVC_IMG=kserve/success-200-isvc:${GITHUB_SHA} -export ERROR_404_ISVC_IMG=kserve/error-404-isvc:${GITHUB_SHA} +SUCCESS_200_ISVC_IMG=${SUCCESS_200_ISVC_IMG}:${GITHUB_SHA} +ERROR_404_ISVC_IMG=${ERROR_404_ISVC_IMG}:${GITHUB_SHA} pushd python >/dev/null echo "Building success_200_isvc image" -docker buildx build -t ${SUCCESS_200_ISVC_IMG} -f success_200_isvc.Dockerfile . +docker buildx build -t "${DOCKER_REPO}/${SUCCESS_200_ISVC_IMG}" -f success_200_isvc.Dockerfile . +docker image save -o "${DOCKER_IMAGES_PATH}/${SUCCESS_200_ISVC_IMG}" "${DOCKER_REPO}/${SUCCESS_200_ISVC_IMG}" echo "Done building success_200_isvc image" echo "Building error_404_isvc image" -docker buildx build -t ${ERROR_404_ISVC_IMG} -f error_404_isvc.Dockerfile . +docker buildx build -t "${DOCKER_REPO}/${ERROR_404_ISVC_IMG}" -f error_404_isvc.Dockerfile . +docker image save -o "${DOCKER_IMAGES_PATH}/${ERROR_404_ISVC_IMG}" "${DOCKER_REPO}/${ERROR_404_ISVC_IMG}" echo "Done building error_404_isvc image" popd echo "Done building images" diff --git a/test/scripts/gh-actions/build-images.sh b/test/scripts/gh-actions/build-images.sh index d43f802fa78..f242d7c351b 100755 --- a/test/scripts/gh-actions/build-images.sh +++ b/test/scripts/gh-actions/build-images.sh @@ -21,25 +21,29 @@ set -o errexit set -o nounset set -o pipefail -echo "Github SHA ${GITHUB_SHA}" -export CONTROLLER_IMG=kserve/kserve-controller:${GITHUB_SHA} -STORAGE_INIT_IMG=kserve/storage-initializer:${GITHUB_SHA} -AGENT_IMG=kserve/agent:${GITHUB_SHA} -ROUTER_IMG=kserve/router:${GITHUB_SHA} +echo "Github SHA ${GITHUB_SHA}" +CONTROLLER_IMG=${CONTROLLER_IMG}:${GITHUB_SHA} +STORAGE_INIT_IMG=${STORAGE_INIT_IMG}:${GITHUB_SHA} +AGENT_IMG=${AGENT_IMG}:${GITHUB_SHA} +ROUTER_IMG=${ROUTER_IMG}:${GITHUB_SHA} echo "Building Kserve controller image" -docker buildx build . -t ${CONTROLLER_IMG} +docker buildx build . -t "${DOCKER_REPO}/${CONTROLLER_IMG}" +docker image save -o "${DOCKER_IMAGES_PATH}/${CONTROLLER_IMG}" "${DOCKER_REPO}/${CONTROLLER_IMG}" echo "Building agent image" -docker buildx build -f agent.Dockerfile . -t ${AGENT_IMG} +docker buildx build -f agent.Dockerfile . -t "${DOCKER_REPO}/${AGENT_IMG}" +docker image save -o "${DOCKER_IMAGES_PATH}/${AGENT_IMG}" "${DOCKER_REPO}/${AGENT_IMG}" echo "Building router image" -docker buildx build -f router.Dockerfile . -t ${ROUTER_IMG} +docker buildx build -f router.Dockerfile . -t "${DOCKER_REPO}/${ROUTER_IMG}" +docker image save -o "${DOCKER_IMAGES_PATH}/${ROUTER_IMG}" "${DOCKER_REPO}/${ROUTER_IMG}" pushd python >/dev/null echo "Building storage initializer" - docker buildx build -t ${STORAGE_INIT_IMG} -f storage-initializer.Dockerfile . + docker buildx build -t "${DOCKER_REPO}/${STORAGE_INIT_IMG}" -f storage-initializer.Dockerfile . + docker image save -o "${DOCKER_IMAGES_PATH}/${STORAGE_INIT_IMG}" "${DOCKER_REPO}/${STORAGE_INIT_IMG}" popd echo "Done building images" diff --git a/test/scripts/gh-actions/build-server-runtimes.sh b/test/scripts/gh-actions/build-server-runtimes.sh index 2be98aa02e7..f094605efec 100755 --- a/test/scripts/gh-actions/build-server-runtimes.sh +++ b/test/scripts/gh-actions/build-server-runtimes.sh @@ -21,53 +21,62 @@ set -o errexit set -o nounset set -o pipefail -echo "Github SHA ${GITHUB_SHA}" IFS=, -types=($1) +echo "Github SHA ${GITHUB_SHA}" # Predictor runtime server images -SKLEARN_IMG=kserve/sklearnserver:${GITHUB_SHA} -XGB_IMG=kserve/xgbserver:${GITHUB_SHA} -LGB_IMG=kserve/lgbserver:${GITHUB_SHA} -PMML_IMG=kserve/pmmlserver:${GITHUB_SHA} -PADDLE_IMG=kserve/paddleserver:${GITHUB_SHA} -CUSTOM_MODEL_GRPC=kserve/custom-model-grpc:${GITHUB_SHA} -CUSTOM_TRANSFORMER_GRPC=kserve/custom-image-transformer-grpc:${GITHUB_SHA} +SKLEARN_IMG=${SKLEARN_IMG}:${GITHUB_SHA} +XGB_IMG=${XGB_IMG}:${GITHUB_SHA} +LGB_IMG=${LGB_IMG}:${GITHUB_SHA} +PMML_IMG=${PMML_IMG}:${GITHUB_SHA} +PADDLE_IMG=${PADDLE_IMG}:${GITHUB_SHA} +CUSTOM_MODEL_GRPC=${CUSTOM_MODEL_GRPC}:${GITHUB_SHA} +CUSTOM_TRANSFORMER_GRPC=${CUSTOM_TRANSFORMER_GRPC}:${GITHUB_SHA} # Explainer images -ALIBI_IMG=kserve/alibi-explainer:${GITHUB_SHA} -ART_IMG=kserve/art-explainer:${GITHUB_SHA} +ALIBI_IMG=${ALIBI_IMG}:${GITHUB_SHA} +ART_IMG=${ART_IMG}:${GITHUB_SHA} # Transformer images -IMAGE_TRANSFORMER_IMG=kserve/image-transformer:${GITHUB_SHA} - +IMAGE_TRANSFORMER_IMG=${IMAGE_TRANSFORMER_IMG}:${GITHUB_SHA} +types=("$1") pushd python >/dev/null if [[ " ${types[*]} " =~ "predictor" ]]; then echo "Building Sklearn image" - docker buildx build -t ${SKLEARN_IMG} -f sklearn.Dockerfile . + docker buildx build -t "${DOCKER_REPO}/${SKLEARN_IMG}" -f sklearn.Dockerfile . + docker image save -o "${DOCKER_IMAGES_PATH}/${SKLEARN_IMG}" "${DOCKER_REPO}/${SKLEARN_IMG}" echo "Building XGB image" - docker buildx build -t ${XGB_IMG} -f xgb.Dockerfile . + docker buildx build -t "${DOCKER_REPO}/${XGB_IMG}" -f xgb.Dockerfile . + docker image save -o "${DOCKER_IMAGES_PATH}/${XGB_IMG}" "${DOCKER_REPO}/${XGB_IMG}" echo "Building LGB image" - docker buildx build -t ${LGB_IMG} -f lgb.Dockerfile . + docker buildx build -t "${DOCKER_REPO}/${LGB_IMG}" -f lgb.Dockerfile . + docker image save -o "${DOCKER_IMAGES_PATH}/${LGB_IMG}" "${DOCKER_REPO}/${LGB_IMG}" echo "Building PMML image" - docker buildx build -t ${PMML_IMG} -f pmml.Dockerfile . + docker buildx build -t "${DOCKER_REPO}/${PMML_IMG}" -f pmml.Dockerfile . + docker image save -o "${DOCKER_IMAGES_PATH}/${PMML_IMG}" "${DOCKER_REPO}/${PMML_IMG}" echo "Building Paddle image" - docker buildx build -t ${PADDLE_IMG} -f paddle.Dockerfile . + docker buildx build -t "${DOCKER_REPO}/${PADDLE_IMG}" -f paddle.Dockerfile . + docker image save -o "${DOCKER_IMAGES_PATH}/${PADDLE_IMG}" "${DOCKER_REPO}/${PADDLE_IMG}" echo "Building Custom model gRPC image" - docker buildx build -t ${CUSTOM_MODEL_GRPC} -f custom_model_grpc.Dockerfile . + docker buildx build -t "${DOCKER_REPO}/${CUSTOM_MODEL_GRPC_IMG}" -f custom_model_grpc.Dockerfile . + docker image save -o "${DOCKER_IMAGES_PATH}/${CUSTOM_MODEL_GRPC_IMG}" "${DOCKER_REPO}/${CUSTOM_MODEL_GRPC_IMG}" echo "Building image transformer gRPC image" - docker buildx build -t ${CUSTOM_TRANSFORMER_GRPC} -f custom_transformer_grpc.Dockerfile . + docker buildx build -t "${DOCKER_REPO}/${CUSTOM_TRANSFORMER_GRPC_IMG}" -f custom_transformer_grpc.Dockerfile . + docker image save -o "${DOCKER_IMAGES_PATH}/${CUSTOM_TRANSFORMER_GRPC_IMG}" "${DOCKER_REPO}/${CUSTOM_TRANSFORMER_GRPC_IMG}" fi if [[ " ${types[*]} " =~ "explainer" ]]; then echo "Building Alibi image" - docker buildx build -t ${ALIBI_IMG} -f alibiexplainer.Dockerfile . + docker buildx build -t "${DOCKER_REPO}/${ALIBI_IMG}" -f alibiexplainer.Dockerfile . + docker save -o "${DOCKER_IMAGES_PATH}/${ALIBI_IMG}" "${DOCKER_REPO}/${ALIBI_IMG}" echo "Building ART explainer image" - docker buildx build -t ${ART_IMG} -f artexplainer.Dockerfile . + docker buildx build -t "${DOCKER_REPO}/${ART_IMG}" -f artexplainer.Dockerfile . + docker save -o "${DOCKER_IMAGES_PATH}/${ART_IMG}" "${DOCKER_REPO}/${ART_IMG}" fi if [[ " ${types[*]} " =~ "transformer" ]]; then echo "Building Image transformer image" - docker buildx build -t ${IMAGE_TRANSFORMER_IMG} -f custom_transformer.Dockerfile . + docker buildx build -t "${DOCKER_REPO}/${IMAGE_TRANSFORMER_IMG}" -f custom_transformer.Dockerfile . + docker save -o "${DOCKER_IMAGES_PATH}/${IMAGE_TRANSFORMER_IMG}" "${DOCKER_REPO}/${IMAGE_TRANSFORMER_IMG}" fi popd