Skip to content

Commit

Permalink
Update tf job examples to tf v2 (kubeflow#2270)
Browse files Browse the repository at this point in the history
* mnist with summaries updaetd to TF v2

Signed-off-by: yelias <[email protected]>

* tf_sample updaetd to TF v2

Signed-off-by: yelias <[email protected]>

* Add mnist_utils and update dist-mnist

Signed-off-by: yelias <[email protected]>

* Add mnist_utils and update dist-mnist

Signed-off-by: yelias <[email protected]>

* Remove old example - estimator-API, this example has been replaced by distribution_strategy

Signed-off-by: yelias <[email protected]>

* Small fix

Signed-off-by: yelias <[email protected]>

* Remove unsupported powerPC dockerfiles

Signed-off-by: yelias <[email protected]>

* Fix typo in copyright

Signed-off-by: yelias <[email protected]>

---------

Signed-off-by: yelias <[email protected]>
Co-authored-by: yelias <[email protected]>
  • Loading branch information
YosiElias and yelias authored Nov 4, 2024
1 parent 9e46f9d commit 95be3c0
Show file tree
Hide file tree
Showing 23 changed files with 397 additions and 784 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/publish-example-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,9 @@ jobs:
- component-name: tf-dist-mnist-test
platforms: linux/amd64,linux/arm64
dockerfile: examples/tensorflow/dist-mnist/Dockerfile
- component-name: tf-distributed-worker
platforms: linux/amd64,linux/arm64
dockerfile: examples/tensorflow/distribution_strategy/estimator-API/Dockerfile
- component-name: tf-multi-worker-strategy
platforms: linux/amd64,linux/arm64
dockerfile: examples/tensorflow/distribution_strategy/keras-API/Dockerfile
dockerfile: examples/tensorflow/distribution_strategy/Dockerfile
- component-name: tf-mnist-with-summaries
platforms: linux/amd64,linux/arm64
dockerfile: examples/tensorflow/mnist_with_summaries/Dockerfile
Expand Down
8 changes: 7 additions & 1 deletion examples/tensorflow/dist-mnist/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,13 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM tensorflow/tensorflow:1.5.0
FROM tensorflow/tensorflow:2.17.0

# Using keras-2.17 because of bug on keras-3.4.1
# which used by default by TF-2.17 (https://github.com/tensorflow/tensorflow/issues/72388)
ENV TF_USE_LEGACY_KERAS 1
RUN pip install tf_keras

ADD examples/tensorflow/dist-mnist/ /var/tf_dist_mnist
ADD examples/tensorflow/mnist_utils.py /var/tf_dist_mnist
ENTRYPOINT ["python", "/var/tf_dist_mnist/dist_mnist.py"]
18 changes: 0 additions & 18 deletions examples/tensorflow/dist-mnist/Dockerfile.ppc64le

This file was deleted.

5 changes: 0 additions & 5 deletions examples/tensorflow/dist-mnist/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,9 @@ To build this image on x86_64:
```shell
docker build -f Dockerfile -t kubeflow/tf-dist-mnist-test:1.0 ./
```
To build this image on ppc64le:
```shell
docker build -f Dockerfile.ppc64le -t kubeflow123/tf-dist-mnist-test:1.0 ./
```

**Create TFJob YAML**

```
kubectl create -f ./tf_job_mnist.yaml
```
* If on ppc64le, please update tf_job_mnist.yaml to use the image of ppc64le firstly.
Loading

0 comments on commit 95be3c0

Please sign in to comment.