Skip to content
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 Workflow to Publish Katib Images #1746

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .github/workflows/publish-algorithm-images.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Publish AutoML Algorithm Images

on:
push:
branches:
- master
andreyvelich marked this conversation as resolved.
Show resolved Hide resolved

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
42 changes: 42 additions & 0 deletions .github/workflows/publish-core-images.yaml
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
40 changes: 40 additions & 0 deletions .github/workflows/publish-trial-images.yaml
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
40 changes: 40 additions & 0 deletions .github/workflows/template-publish-image/action.yaml
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 }}
zijianjoy marked this conversation as resolved.
Show resolved Hide resolved

- 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