diff --git a/kubernetes/kserve/build_image.sh b/kubernetes/kserve/build_image.sh index b644dc37f7..b3215a8923 100755 --- a/kubernetes/kserve/build_image.sh +++ b/kubernetes/kserve/build_image.sh @@ -57,4 +57,5 @@ fi cp ../../frontend/server/src/main/resources/proto/*.proto . cp -r ../../third_party . -DOCKER_BUILDKIT=1 docker build --file "$DOCKER_FILE" --build-arg BASE_IMAGE=$BASE_IMAGE -t "$DOCKER_TAG" . +docker buildx create --name mybuilder --use --bootstrap +docker buildx build --file "$DOCKER_FILE" --build-arg BASE_IMAGE=$BASE_IMAGE --platform linux/amd64,linux/arm64 --push -t "$DOCKER_TAG" . diff --git a/kubernetes/kserve/build_upload_release.py b/kubernetes/kserve/build_upload_release.py index 55183c7a03..4dc0cc83ec 100644 --- a/kubernetes/kserve/build_upload_release.py +++ b/kubernetes/kserve/build_upload_release.py @@ -39,12 +39,6 @@ dry_run, ) - for image in [ - f"{organization}/torchserve-kfs:{check_ts_version()}", - f"{organization}/torchserve-kfs:{check_ts_version()}-gpu", - ]: - try_and_handle(f"docker push {image}", dry_run) - # Cleanup built images if args.cleanup: try_and_handle(f"docker system prune --all --volumes -f", dry_run) diff --git a/kubernetes/kserve/docker_nightly.py b/kubernetes/kserve/docker_nightly.py index 209c0d976e..cd2181b1de 100644 --- a/kubernetes/kserve/docker_nightly.py +++ b/kubernetes/kserve/docker_nightly.py @@ -36,18 +36,16 @@ cpu_version = f"{project}:cpu-{get_nightly_version()}" gpu_version = f"{project}:gpu-{get_nightly_version()}" - # Build Nightly images and append the date in the name - try_and_handle(f"./build_image.sh -n -t {organization}/{cpu_version}", dry_run) + # Build and push Nightly images and append the date in the name + try_and_handle( + f"./build_image.sh -n -t {organization}/{cpu_version}", + dry_run) try_and_handle( f"./build_image.sh -g -n -t {organization}/{gpu_version}", dry_run, ) - # Push Nightly images to official PyTorch Dockerhub account - try_and_handle(f"docker push {organization}/{cpu_version}", dry_run) - try_and_handle(f"docker push {organization}/{gpu_version}", dry_run) - - # Tag nightly images with latest + # Build and push Nightly images with latest try_and_handle( f"docker tag {organization}/{cpu_version} {organization}/{project}:latest-cpu", dry_run, @@ -57,10 +55,6 @@ dry_run, ) - # Push images with latest tag - try_and_handle(f"docker push {organization}/{project}:latest-cpu", dry_run) - try_and_handle(f"docker push {organization}/{project}:latest-gpu", dry_run) - # Cleanup built images if args.cleanup: try_and_handle(f"docker system prune --all --volumes -f", dry_run)