-
Notifications
You must be signed in to change notification settings - Fork 706
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 CI to build example images #1731
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"] |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
These images could not build or failed to run.
We need to fix these images in other PRs.