-
Notifications
You must be signed in to change notification settings - Fork 706
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add CI to build example images (#1731)
Signed-off-by: Yuki Iwai <yuki.iwai.tz@gmail.com> Signed-off-by: Yuki Iwai <yuki.iwai.tz@gmail.com>
- Loading branch information
Showing
22 changed files
with
176 additions
and
70 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,60 @@ | ||
# Reusable workflows for publishing Training Operator 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@v3 | ||
|
||
- name: Docker Login | ||
# Trigger workflow only for kubeflow/training-operator repository with specific branch (master, v.*-branch) or tag (v.*). | ||
if: >- | ||
github.repository == 'kubeflow/training-operator' && | ||
(github.ref == 'refs/heads/master' || (startsWith(github.ref, 'refs/heads/v') && endsWith(github.ref, '-branch')) || 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/training-operator repository with specific branch (master, v.*-branch) or tag (v.*). | ||
if: >- | ||
github.repository == 'kubeflow/training-operator' && | ||
(github.ref == 'refs/heads/master' || (startsWith(github.ref, 'refs/heads/v') && endsWith(github.ref, '-branch')) || startsWith(github.ref, 'refs/tags/v')) | ||
id: publish | ||
uses: ./.github/workflows/template-publish-image | ||
with: | ||
image: docker.io/kubeflow/${{ 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/kubeflow/${{ inputs.component-name }} | ||
dockerfile: ${{ inputs.dockerfile }} | ||
platforms: ${{ inputs.platforms }} | ||
push: false |
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,24 @@ | ||
name: Publish Training Operator Core Images | ||
|
||
on: | ||
- push | ||
- pull_request | ||
|
||
jobs: | ||
core: | ||
name: Publish Image | ||
uses: ./.github/workflows/build-and-publish-images.yaml | ||
with: | ||
component-name: ${{ matrix.component-name }} | ||
platforms: linux/amd64,linux/arm64,linux/ppc64le | ||
dockerfile: ${{ matrix.dockerfile }} | ||
secrets: | ||
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} | ||
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- component-name: training-operator | ||
dockerfile: build/images/training-operator/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,55 @@ | ||
name: Publish Training Operator Example Images | ||
|
||
on: | ||
- push | ||
- pull_request | ||
|
||
jobs: | ||
example: | ||
name: Publish Image | ||
uses: ./.github/workflows/build-and-publish-images.yaml | ||
with: | ||
component-name: ${{ matrix.component-name }} | ||
# TODO (tenzen-y): Support linux/arm64 platform | ||
platforms: linux/amd64 | ||
dockerfile: ${{ matrix.dockerfile }} | ||
secrets: | ||
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} | ||
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- component-name: tf-dist-mnist-test | ||
dockerfile: examples/tensorflow/dist-mnist/Dockerfile | ||
- component-name: tf-distributed-worker | ||
dockerfile: examples/tensorflow/distribution_strategy/estimator-API/Dockerfile | ||
- component-name: tf-multi-worker-strategy | ||
dockerfile: examples/tensorflow/distribution_strategy/keras-API/Dockerfile | ||
- component-name: tf-mnist-with-summaries | ||
dockerfile: examples/tensorflow/mnist_with_summaries/Dockerfile | ||
- component-name: tf-smoke | ||
dockerfile: examples/tensorflow/tf_sample/Dockerfile | ||
- component-name: pytorch-dist-sendrecv-test | ||
dockerfile: examples/pytorch/smoke-dist/Dockerfile | ||
- component-name: pytorch-elastic-example-imagenet | ||
dockerfile: examples/pytorch/elastic/imagenet/Dockerfile | ||
- component-name: pytorch-elastic-example-echo | ||
dockerfile: examples/pytorch/elastic/echo/Dockerfile | ||
|
||
# TODO (tenzen-y): Fix the below broken Dockerfiles | ||
# - component-name: lightgbm-dist-py-test | ||
# dockerfile: examples/xgboost/lightgbm-dist/Dockerfile | ||
# - component-name: xgboost-dist-rabit-test | ||
# dockerfile: examples/xgboost/smoke-dist/Dockerfile | ||
# - component-name: xgboost-dist-iris | ||
# dockerfile: examples/xgboost/xgboost-dist | ||
# - component-name: mxnet-gpu | ||
# dockerfile: examples/mxnet/train/Dockerfile | ||
# - component-name: mxnet-auto-tuning | ||
# dockerfile: examples/mxnet/tune/Dockerfile | ||
# - component-name: pytorch-dist-mnist-mpi | ||
# dockerfile: examples/pytorch/mnist/Dockerfile-mpi | ||
# - component-name: pytorch-dist-mnist | ||
# dockerfile: examples/pytorch/mnist/Dockerfile |
This file was deleted.
Oops, something went wrong.
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
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
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
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
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
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
FROM pytorch/pytorch:1.0-cuda10.0-cudnn7-runtime | ||
|
||
RUN mkdir -p /opt/mlkube | ||
COPY dist_sendrecv.py /opt/mlkube/ | ||
COPY examples/pytorch/smoke-dist/dist_sendrecv.py /opt/mlkube/ | ||
ENTRYPOINT ["python", "/opt/mlkube/dist_sendrecv.py"] |
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
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
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
2 changes: 1 addition & 1 deletion
2
examples/tensorflow/distribution_strategy/estimator-API/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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM tensorflow/tensorflow:1.11.0 | ||
|
||
COPY keras_model_to_estimator.py / | ||
COPY examples/tensorflow/distribution_strategy/estimator-API/keras_model_to_estimator.py / | ||
ENTRYPOINT ["python", "/keras_model_to_estimator.py", "/tmp/tfkeras_example/"] |
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
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
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
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
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
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
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
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
FROM tensorflow/tensorflow:1.8.0 | ||
RUN pip install retrying | ||
RUN mkdir -p /opt/kubeflow | ||
COPY tf_smoke.py /opt/kubeflow/ | ||
COPY examples/tensorflow/tf_sample/tf_smoke.py /opt/kubeflow/ | ||
ENTRYPOINT ["python", "/opt/kubeflow/tf_smoke.py"] |