File tree Expand file tree Collapse file tree 3 files changed +54
-8
lines changed
examples/v1beta1/trial-images/mxnet-mnist Expand file tree Collapse file tree 3 files changed +54
-8
lines changed Original file line number Diff line number Diff line change 1
1
FROM python:3.9-slim
2
2
3
- ADD examples/v1beta1/trial-images/mxnet-mnist /opt/mxnet-mnist
3
+ ARG TARGETARCH
4
+ ENV LD_LIBRARY_PATH "${LD_LIBRARY_PATH}:/opt/arm/armpl_22.0.2_gcc-11.2/lib"
5
+
6
+ COPY examples/v1beta1/trial-images/mxnet-mnist /opt/mxnet-mnist
4
7
5
8
WORKDIR /opt/mxnet-mnist
6
9
7
10
RUN apt-get -y update \
8
- && apt-get -y install libgomp1 libquadmath0 \
9
- && apt-get clean \
10
- && rm -rf /var/lib/apt/lists/*
11
+ && apt-get -y install libgomp1 \
12
+ && if [ "${TARGETARCH}" = "arm64" ]; then \
13
+ apt-get -y install wget; \
14
+ elif [ "${TARGETARCH}" = "amd64" ]; then \
15
+ apt-get -y install libquadmath0; \
16
+ fi \
17
+ && apt-get clean \
18
+ && rm -rf /var/lib/apt/lists/*
11
19
12
- RUN pip install mxnet==1.9.0
20
+ RUN if [ "${TARGETARCH}" = "arm64" ]; then \
21
+ /opt/mxnet-mnist/install-arm-performance-libraries.sh; \
22
+ fi
23
+ RUN pip install mxnet==1.9.1
13
24
RUN chgrp -R 0 /opt/mxnet-mnist \
14
25
&& chmod -R g+rwX /opt/mxnet-mnist
15
26
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ # Copyright 2022 The Kubeflow Authors.
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ set -o errexit
18
+ set -o nounset
19
+ set -o pipefail
20
+ cd " $( dirname " $0 " ) "
21
+
22
+ # Download Arm Performance Libraries for Ubuntu 20.04
23
+ # Ref: https://developer.arm.com/downloads/-/arm-performance-libraries
24
+ echo " Downloading Arm Performance Libraries for Ubuntu 20.04..."
25
+ wget -qO - \
26
+ " https://developer.arm.com/-/media/Files/downloads/hpc/arm-performance-libraries/22-0-2/Ubuntu20.04/arm-performance-libraries_22.0.2_Ubuntu-20.04_gcc-11.2.tar?rev=577d3dbcff7847b9af57399b2978f9a6&revision=577d3dbc-ff78-47b9-af57-399b2978f9a6" \
27
+ | tar -xf -
28
+
29
+ # Install Arm Performance Libraries
30
+ echo " Installing Arm Performance Libraries for Ubuntu 20.04..."
31
+ ./arm-performance-libraries_22.0.2_Ubuntu-20.04/arm-performance-libraries_22.0.2_Ubuntu-20.04.sh -a
32
+
33
+ # Clean up
34
+ echo " Removing installer..."
35
+ rm -rf ./arm-performance-libraries_22.0.2_Ubuntu-20.04
Original file line number Diff line number Diff line change @@ -120,9 +120,6 @@ echo -e "\nBuilding training container images..."
120
120
if [ ! " $ARCH " = " amd64" ]; then
121
121
echo -e " \nSome training container images are supported only amd64."
122
122
else
123
- echo -e " \nBuilding mxnet mnist training container example...\n"
124
- docker buildx build --platform linux/amd64 -t " ${REGISTRY} /mxnet-mnist:${TAG} " -f examples/${VERSION} /trial-images/mxnet-mnist/Dockerfile .
125
-
126
123
echo -e " \nBuilding PyTorch mnist training container example with CPU support...\n"
127
124
docker buildx build --platform linux/amd64 -t " ${REGISTRY} /pytorch-mnist-cpu:${TAG} " -f examples/${VERSION} /trial-images/pytorch-mnist/Dockerfile.cpu .
128
125
142
139
docker buildx build --platform linux/amd64 -t " ${REGISTRY} /simple-pbt:${TAG} " -f examples/${VERSION} /trial-images/simple-pbt/Dockerfile .
143
140
fi
144
141
142
+ echo -e " \nBuilding mxnet mnist training container example...\n"
143
+ docker buildx build --platform " linux/$ARCH " -t " ${REGISTRY} /mxnet-mnist:${TAG} " -f examples/${VERSION} /trial-images/mxnet-mnist/Dockerfile .
144
+
145
145
echo -e " \nBuilding Tensorflow with summaries mnist training container example...\n"
146
146
docker buildx build --platform " linux/$ARCH " -t " ${REGISTRY} /tf-mnist-with-summaries:${TAG} " -f examples/${VERSION} /trial-images/tf-mnist-with-summaries/Dockerfile .
147
147
You can’t perform that action at this time.
0 commit comments