-
Notifications
You must be signed in to change notification settings - Fork 448
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add the CI to build multi-platform container images #1956
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# Reusable workflows for publishing Katib images. | ||
name: Build And Publish Images | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
component-name: | ||
required: true | ||
type: string | ||
platforms: | ||
required: true | ||
type: string | ||
dockerfile: | ||
required: true | ||
type: string | ||
secrets: | ||
DOCKERHUB_USERNAME: | ||
required: false | ||
DOCKERHUB_TOKEN: | ||
required: false | ||
|
||
jobs: | ||
build-and-publish: | ||
name: Publish Image | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Docker Login | ||
# Trigger workflow only for kubeflow/katib repository with specific branch (master, release-.*) or tag (v.*). | ||
if: >- | ||
github.repository == 'kubeflow/katib' && | ||
(github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release-') || startsWith(github.ref, 'refs/tags/v')) | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Publish Component ${{ inputs.component-name }} | ||
# Trigger workflow only for kubeflow/katib repository with specific branch (master, release-.*) or tag (v.*). | ||
if: >- | ||
github.repository == 'kubeflow/katib' && | ||
(github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release-') || startsWith(github.ref, 'refs/tags/v')) | ||
id: publish | ||
uses: ./.github/workflows/template-publish-image | ||
with: | ||
image: docker.io/kubeflowkatib/${{ inputs.component-name }} | ||
dockerfile: ${{ inputs.dockerfile }} | ||
platforms: ${{ inputs.platforms }} | ||
push: true | ||
|
||
- name: Test Build For Component ${{ inputs.component-name }} | ||
if: steps.publish.outcome == 'skipped' | ||
uses: ./.github/workflows/template-publish-image | ||
with: | ||
image: docker.io/kubeflowkatib/${{ inputs.component-name }} | ||
dockerfile: ${{ inputs.dockerfile }} | ||
platforms: ${{ inputs.platforms }} | ||
push: false |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,4 +20,3 @@ jobs: | |
|
||
- name: Check YAML | ||
run: make yamllint | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,49 @@ | ||
name: Publish Trial Images | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
env: | ||
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} | ||
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- push | ||
- pull_request | ||
|
||
jobs: | ||
trial: | ||
name: Publish Image | ||
# Trigger workflow only for kubeflow/katib repository. | ||
if: github.repository == 'kubeflow/katib' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Publish Trial ${{ matrix.trial-name }} | ||
uses: ./.github/workflows/template-publish-image | ||
with: | ||
image: docker.io/kubeflowkatib/${{ matrix.trial-name }} | ||
dockerfile: ${{ matrix.dockerfile }} | ||
uses: ./.github/workflows/build-and-publish-images.yaml | ||
with: | ||
component-name: ${{ matrix.trial-name }} | ||
platforms: ${{ matrix.platforms }} | ||
dockerfile: ${{ matrix.dockerfile }} | ||
secrets: | ||
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} | ||
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- trial-name: mxnet-mnist | ||
platforms: linux/amd64,linux/arm64 | ||
dockerfile: examples/v1beta1/trial-images/mxnet-mnist/Dockerfile | ||
- trial-name: pytorch-mnist-cpu | ||
platforms: linux/amd64,linux/arm64 | ||
dockerfile: examples/v1beta1/trial-images/pytorch-mnist/Dockerfile.cpu | ||
- trial-name: pytorch-mnist-gpu | ||
platforms: linux/amd64 | ||
dockerfile: examples/v1beta1/trial-images/pytorch-mnist/Dockerfile.gpu | ||
- trial-name: tf-mnist-with-summaries | ||
platforms: linux/amd64,linux/arm64 | ||
dockerfile: examples/v1beta1/trial-images/tf-mnist-with-summaries/Dockerfile | ||
- trial-name: enas-cnn-cifar10-gpu | ||
platforms: linux/amd64 | ||
dockerfile: examples/v1beta1/trial-images/enas-cnn-cifar10/Dockerfile.gpu | ||
- trial-name: enas-cnn-cifar10-cpu | ||
platforms: linux/amd64,linux/arm64 | ||
dockerfile: examples/v1beta1/trial-images/enas-cnn-cifar10/Dockerfile.cpu | ||
- trial-name: darts-cnn-cifar10-cpu | ||
platforms: linux/amd64,linux/arm64 | ||
dockerfile: examples/v1beta1/trial-images/darts-cnn-cifar10/Dockerfile.cpu | ||
- trial-name: darts-cnn-cifar10-gpu | ||
platforms: linux/amd64 | ||
dockerfile: examples/v1beta1/trial-images/darts-cnn-cifar10/Dockerfile.gpu | ||
- trial-name: simple-pbt | ||
platforms: linux/amd64,linux/arm64 | ||
dockerfile: examples/v1beta1/trial-images/simple-pbt/Dockerfile |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,25 @@ | ||
# Template for e2e tests. | ||
# Composite action for e2e tests. | ||
name: Run E2E Test | ||
description: Run e2e test using the minikube cluster | ||
|
||
inputs: | ||
experiments: | ||
required: true | ||
type: string | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
description: comma delimited experiment name | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Needs to specify |
||
training-operator: | ||
required: false | ||
type: boolean | ||
default: false | ||
description: whether to deploy training-operator or not | ||
default: "false" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Needs to specify string data. |
||
trial-images: | ||
required: true | ||
type: string | ||
description: comma delimited trial image name | ||
katib-ui: | ||
required: true | ||
type: boolean | ||
default: false | ||
description: whether to deploy katib-ui or not | ||
default: "false" | ||
database-type: | ||
required: false | ||
type: string | ||
description: mysql or postgres | ||
default: mysql | ||
|
||
runs: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we face the below error, we can not build multiplatform container images with GPU support.
Once we use AWS self-hosted runner, we will be able to build it.
https://github.com/kubeflow/katib/actions/runs/3075994787