-
Notifications
You must be signed in to change notification settings - Fork 448
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Workflow to Publish Katib Images (#1746)
* Add Workflow to Publish Katib Images * Change docker hub * Remove comment * Fix path * Use composite run
- Loading branch information
1 parent
326089d
commit 1519724
Showing
4 changed files
with
170 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Publish AutoML Algorithm Images | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
env: | ||
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} | ||
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
jobs: | ||
algorithm: | ||
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 Component ${{ matrix.component-name }} | ||
uses: ./.github/workflows/template-publish-image | ||
with: | ||
image: docker.io/kubeflowkatib/${{ matrix.component-name }} | ||
dockerfile: ${{ matrix.dockerfile }} | ||
|
||
strategy: | ||
matrix: | ||
include: | ||
- component-name: suggestion-hyperopt | ||
dockerfile: cmd/suggestion/hyperopt/v1beta1/Dockerfile | ||
- component-name: suggestion-chocolate | ||
dockerfile: cmd/suggestion/chocolate/v1beta1/Dockerfile | ||
- component-name: suggestion-hyperband | ||
dockerfile: cmd/suggestion/hyperband/v1beta1/Dockerfile | ||
- component-name: suggestion-skopt | ||
dockerfile: cmd/suggestion/skopt/v1beta1/Dockerfile | ||
- component-name: suggestion-goptuna | ||
dockerfile: cmd/suggestion/goptuna/v1beta1/Dockerfile | ||
- component-name: suggestion-optuna | ||
dockerfile: cmd/suggestion/optuna/v1beta1/Dockerfile | ||
- component-name: suggestion-enas | ||
dockerfile: cmd/suggestion/nas/enas/v1beta1/Dockerfile | ||
- component-name: suggestion-darts | ||
dockerfile: cmd/suggestion/nas/darts/v1beta1/Dockerfile | ||
- component-name: earlystopping-medianstop | ||
dockerfile: cmd/earlystopping/medianstop/v1beta1/Dockerfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Publish Katib Core Images | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
env: | ||
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} | ||
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
jobs: | ||
core: | ||
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 Component ${{ matrix.component-name }} | ||
uses: ./.github/workflows/template-publish-image | ||
with: | ||
image: docker.io/kubeflowkatib/${{ matrix.component-name }} | ||
dockerfile: ${{ matrix.dockerfile }} | ||
|
||
strategy: | ||
matrix: | ||
include: | ||
- component-name: katib-controller | ||
dockerfile: cmd/katib-controller/v1beta1/Dockerfile | ||
- component-name: katib-db-manager | ||
dockerfile: cmd/db-manager/v1beta1/Dockerfile | ||
- component-name: katib-ui | ||
dockerfile: cmd/new-ui/v1beta1/Dockerfile | ||
- component-name: cert-generator | ||
dockerfile: cmd/cert-generator/v1beta1/Dockerfile | ||
- component-name: file-metrics-collector | ||
dockerfile: cmd/metricscollector/v1beta1/file-metricscollector/Dockerfile | ||
- component-name: tfevent-metrics-collector | ||
dockerfile: cmd/metricscollector/v1beta1/tfevent-metricscollector/Dockerfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Publish Trial Images | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
env: | ||
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} | ||
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
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 }} | ||
|
||
strategy: | ||
matrix: | ||
include: | ||
- trial-name: mxnet-mnist | ||
dockerfile: examples/v1beta1/trial-images/mxnet-mnist/Dockerfile | ||
- trial-name: pytorch-mnist | ||
dockerfile: examples/v1beta1/trial-images/pytorch-mnist/Dockerfile | ||
- trial-name: enas-cnn-cifar10-gpu | ||
dockerfile: examples/v1beta1/trial-images/enas-cnn-cifar10/Dockerfile.gpu | ||
- trial-name: enas-cnn-cifar10-cpu | ||
dockerfile: examples/v1beta1/trial-images/enas-cnn-cifar10/Dockerfile.cpu | ||
- trial-name: darts-cnn-cifar10 | ||
dockerfile: examples/v1beta1/trial-images/darts-cnn-cifar10/Dockerfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Template run for publishing Katib images. | ||
|
||
inputs: | ||
image: | ||
required: true | ||
type: string | ||
dockerfile: | ||
required: true | ||
type: string | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Set Up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
|
||
- name: Docker Login | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ env.DOCKERHUB_USERNAME }} | ||
password: ${{ env.DOCKERHUB_TOKEN }} | ||
|
||
- name: Add Docker Tags | ||
id: meta | ||
uses: docker/metadata-action@v3 | ||
with: | ||
images: ${{ inputs.image }} | ||
tags: | | ||
type=raw,latest | ||
type=sha,prefix=v1beta1- | ||
- name: Build and Push | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: . | ||
file: ${{ inputs.dockerfile }} | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max |