Skip to content

Commit

Permalink
Run build steps for multi-arch sequentially (kubeflow#7333)
Browse files Browse the repository at this point in the history
* Run build steps for multi-arch sequentially

We saw that if we try to build using an ENV var containing all the
architectures then docker buildx will run 3 parallel jobs.

This made the GH runners crash in some cases because they were
over-utilizing the resources.

To mitigate this we'll sequentially build each image for each arch.

Signed-off-by: Kimonas Sotirchos <kimwnasptd@gmail.com>

* review: Build first for amd64

Signed-off-by: Kimonas Sotirchos <kimwnasptd@gmail.com>

---------

Signed-off-by: Kimonas Sotirchos <kimwnasptd@gmail.com>
  • Loading branch information
kimwnasptd authored Oct 13, 2023
1 parent 51becc7 commit 0a69444
Show file tree
Hide file tree
Showing 20 changed files with 40 additions and 30 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/centraldb_docker_publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ on:
env:
DOCKER_USER: kubeflownotebookswg
IMG: kubeflownotebookswg/centraldashboard
ARCH: linux/ppc64le,linux/amd64,linux/arm64/v8

jobs:
push_to_registry:
Expand Down Expand Up @@ -43,7 +42,9 @@ jobs:
- name: Build and push multi-arch docker image
run: |
cd components/centraldashboard
make docker-build-push-multi-arch
ARCH=linux/amd64 make docker-build-multi-arch
ARCH=linux/ppc64le make docker-build-multi-arch
ARCH=linux/arm64/v8 make docker-build-multi-arch
- name: Build and push latest multi-arch docker image
if: github.ref == 'refs/heads/master'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/centraldb_multi_arch_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ jobs:
- name: Build multi-arch Image
run: |
cd components/centraldashboard
ARCH=linux/ppc64le make docker-build-multi-arch
ARCH=linux/amd64 make docker-build-multi-arch
ARCH=linux/ppc64le make docker-build-multi-arch
ARCH=linux/arm64/v8 make docker-build-multi-arch
5 changes: 3 additions & 2 deletions .github/workflows/jwa_docker_publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ on:
env:
DOCKER_USER: kubeflownotebookswg
IMG: kubeflownotebookswg/jupyter-web-app
ARCH: linux/amd64,linux/ppc64le,linux/arm64/v8

jobs:
push_to_registry:
Expand Down Expand Up @@ -44,7 +43,9 @@ jobs:
- name: Build and push multi-arch docker image
run: |
cd components/crud-web-apps/jupyter
make docker-build-push-multi-arch
ARCH=linux/amd64 make docker-build-multi-arch
ARCH=linux/ppc64le make docker-build-multi-arch
ARCH=linux/arm64/v8 make docker-build-multi-arch
- name: Build and push latest multi-arch docker image
if: github.ref == 'refs/heads/master'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/jwa_multi_arch_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ jobs:
- name: Build multi-arch Image
run: |
cd components/crud-web-apps/jupyter
ARCH=linux/ppc64le make docker-build-multi-arch
ARCH=linux/amd64 make docker-build-multi-arch
ARCH=linux/ppc64le make docker-build-multi-arch
ARCH=linux/arm64/v8 make docker-build-multi-arch
5 changes: 3 additions & 2 deletions .github/workflows/kfam_docker_publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ on:
env:
DOCKER_USER: kubeflownotebookswg
IMG: kubeflownotebookswg/kfam
ARCH: linux/amd64,linux/ppc64le,linux/arm64/v8

jobs:
push_to_registry:
Expand Down Expand Up @@ -43,7 +42,9 @@ jobs:
- name: Build and push multi-arch docker image
run: |
cd components/access-management
make docker-build-push-multi-arch
ARCH=linux/amd64 make docker-build-multi-arch
ARCH=linux/ppc64le make docker-build-multi-arch
ARCH=linux/arm64/v8 make docker-build-multi-arch
- name: Build and push latest multi-arch docker image
if: github.ref == 'refs/heads/master'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/kfam_multi_arch_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ jobs:
- name: Build multi-arch Image
run: |
cd components/access-management
ARCH=linux/ppc64le make docker-build-multi-arch
ARCH=linux/amd64 make docker-build-multi-arch
ARCH=linux/ppc64le make docker-build-multi-arch
ARCH=linux/arm64/v8 make docker-build-multi-arch
5 changes: 3 additions & 2 deletions .github/workflows/nb_controller_docker_publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ on:
env:
DOCKER_USER: kubeflownotebookswg
IMG: kubeflownotebookswg/notebook-controller
ARCH: linux/amd64,linux/ppc64le,linux/arm64/v8

jobs:
push_to_registry:
Expand Down Expand Up @@ -44,7 +43,9 @@ jobs:
- name: Build and push multi-arch docker image
run: |
cd components/notebook-controller
make docker-build-push-multi-arch
ARCH=linux/amd64 make docker-build-multi-arch
ARCH=linux/ppc64le make docker-build-multi-arch
ARCH=linux/arm64/v8 make docker-build-multi-arch
- name: Build and push latest multi-arch docker image
if: github.ref == 'refs/heads/master'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nb_controller_multi_arch_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ jobs:
- name: Build multi-arch Image
run: |
cd components/notebook-controller
ARCH=linux/ppc64le make docker-build-multi-arch
ARCH=linux/amd64 make docker-build-multi-arch
ARCH=linux/ppc64le make docker-build-multi-arch
ARCH=linux/arm64/v8 make docker-build-multi-arch
5 changes: 3 additions & 2 deletions .github/workflows/poddefaults_docker_publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ on:
env:
DOCKER_USER: kubeflownotebookswg
IMG: kubeflownotebookswg/poddefaults-webhook
ARCH: linux/amd64,linux/ppc64le,linux/arm64/v8

jobs:
push_to_registry:
Expand Down Expand Up @@ -43,7 +42,9 @@ jobs:
- name: Build and push multi-arch docker image
run: |
cd components/admission-webhook
make docker-build-push-multi-arch
ARCH=linux/amd64 make docker-build-multi-arch
ARCH=linux/ppc64le make docker-build-multi-arch
ARCH=linux/arm64/v8 make docker-build-multi-arch
- name: Build and push latest multi-arch docker image
if: github.ref == 'refs/heads/master'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/poddefaults_multi_arch_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ jobs:
- name: Build multi-arch Image
run: |
cd components/admission-webhook
ARCH=linux/ppc64le make docker-build-multi-arch
ARCH=linux/amd64 make docker-build-multi-arch
ARCH=linux/ppc64le make docker-build-multi-arch
ARCH=linux/arm64/v8 make docker-build-multi-arch
5 changes: 3 additions & 2 deletions .github/workflows/prof_controller_docker_publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ on:
env:
DOCKER_USER: kubeflownotebookswg
IMG: kubeflownotebookswg/profile-controller
ARCH: linux/amd64,linux/ppc64le,linux/arm64/v8

jobs:
push_to_registry:
Expand Down Expand Up @@ -43,7 +42,9 @@ jobs:
- name: Build and push multi-arch docker image
run: |
cd components/profile-controller
make docker-build-push-multi-arch
ARCH=linux/amd64 make docker-build-multi-arch
ARCH=linux/ppc64le make docker-build-multi-arch
ARCH=linux/arm64/v8 make docker-build-multi-arch
- name: Build and push latest multi-arch docker image
if: github.ref == 'refs/heads/master'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/prof_controller_multi_arch_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ jobs:
- name: Build multi-arch Image
run: |
cd components/profile-controller
ARCH=linux/ppc64le make docker-build-multi-arch
ARCH=linux/amd64 make docker-build-multi-arch
ARCH=linux/ppc64le make docker-build-multi-arch
ARCH=linux/arm64/v8 make docker-build-multi-arch
5 changes: 3 additions & 2 deletions .github/workflows/pvcviewer_controller_docker_publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ on:
env:
DOCKER_USER: kubeflownotebookswg
IMG: kubeflownotebookswg/pvcviewer-controller
ARCH: linux/amd64,linux/ppc64le,linux/arm64/v8

jobs:
push_to_registry:
Expand Down Expand Up @@ -41,7 +40,9 @@ jobs:
- name: Build and push multi-arch docker image
run: |
cd components/pvcviewer-controller
make docker-build-push-multi-arch
ARCH=linux/amd64 make docker-build-multi-arch
ARCH=linux/ppc64le make docker-build-multi-arch
ARCH=linux/arm64/v8 make docker-build-multi-arch
- name: Build and push latest multi-arch docker image
if: github.ref == 'refs/heads/master'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ jobs:
- name: Build multi-arch Image
run: |
cd components/pvcviewer-controller
ARCH=linux/ppc64le make docker-build-multi-arch
ARCH=linux/amd64 make docker-build-multi-arch
ARCH=linux/ppc64le make docker-build-multi-arch
ARCH=linux/arm64/v8 make docker-build-multi-arch
5 changes: 3 additions & 2 deletions .github/workflows/tb_controller_docker_publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ on:
env:
DOCKER_USER: kubeflownotebookswg
IMG: kubeflownotebookswg/tensorboard-controller
ARCH: linux/amd64,linux/ppc64le,linux/arm64/v8

jobs:
push_to_registry:
Expand Down Expand Up @@ -43,7 +42,9 @@ jobs:
- name: Build and push multi-arch docker image
run: |
cd components/tensorboard-controller
make docker-build-push-multi-arch
ARCH=linux/amd64 make docker-build-multi-arch
ARCH=linux/ppc64le make docker-build-multi-arch
ARCH=linux/arm64/v8 make docker-build-multi-arch
- name: Build and push latest multi-arch docker image
if: github.ref == 'refs/heads/master'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tb_controller_multi_arch_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ jobs:
- name: Build multi-arch Image
run: |
cd components/tensorboard-controller
ARCH=linux/ppc64le make docker-build-multi-arch
ARCH=linux/amd64 make docker-build-multi-arch
ARCH=linux/ppc64le make docker-build-multi-arch
ARCH=linux/arm64/v8 make docker-build-multi-arch
5 changes: 3 additions & 2 deletions .github/workflows/twa_docker_publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ on:
env:
DOCKER_USER: kubeflownotebookswg
IMG: kubeflownotebookswg/tensorboards-web-app
ARCH: linux/amd64,linux/ppc64le,linux/arm64/v8

jobs:
push_to_registry:
Expand Down Expand Up @@ -44,7 +43,9 @@ jobs:
- name: Build and push multi-arch docker image
run: |
cd components/crud-web-apps/tensorboards
make docker-build-push-multi-arch
ARCH=linux/amd64 make docker-build-multi-arch
ARCH=linux/ppc64le make docker-build-multi-arch
ARCH=linux/arm64/v8 make docker-build-multi-arch
- name: Build and push latest multi-arch docker image
if: github.ref == 'refs/heads/master'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/twa_multi_arch_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ jobs:
- name: Build multi-arch Image
run: |
cd components/crud-web-apps/tensorboards
ARCH=linux/ppc64le make docker-build-multi-arch
ARCH=linux/amd64 make docker-build-multi-arch
ARCH=linux/ppc64le make docker-build-multi-arch
ARCH=linux/arm64/v8 make docker-build-multi-arch
5 changes: 3 additions & 2 deletions .github/workflows/vwa_docker_publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ on:
env:
DOCKER_USER: kubeflownotebookswg
IMG: kubeflownotebookswg/volumes-web-app
ARCH: linux/amd64,linux/ppc64le,linux/arm64/v8

jobs:
push_to_registry:
Expand Down Expand Up @@ -44,7 +43,9 @@ jobs:
- name: Build and push multi-arch docker image
run: |
cd components/crud-web-apps/volumes
make docker-build-push-multi-arch
ARCH=linux/amd64 make docker-build-multi-arch
ARCH=linux/ppc64le make docker-build-multi-arch
ARCH=linux/arm64/v8 make docker-build-multi-arch
- name: Build and push latest multi-arch docker image
if: github.ref == 'refs/heads/master'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/vwa_multi_arch_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ jobs:
- name: Build multi-arch Image
run: |
cd components/crud-web-apps/volumes
ARCH=linux/ppc64le make docker-build-multi-arch
ARCH=linux/amd64 make docker-build-multi-arch
ARCH=linux/ppc64le make docker-build-multi-arch
ARCH=linux/arm64/v8 make docker-build-multi-arch

0 comments on commit 0a69444

Please sign in to comment.