diff --git a/test/images/node-perf/npb-ep/BASEIMAGE b/test/images/node-perf/npb-ep/BASEIMAGE index 8a8f5b8e5b0..fbe1ea05e77 100644 --- a/test/images/node-perf/npb-ep/BASEIMAGE +++ b/test/images/node-perf/npb-ep/BASEIMAGE @@ -1 +1,3 @@ -amd64=debian:stretch +amd64=debian:stretch-slim +arm64=arm64v8/debian:stretch-slim +ppc64le=ppc64le/debian:stretch-slim diff --git a/test/images/node-perf/npb-ep/Dockerfile b/test/images/node-perf/npb-ep/Dockerfile index a7ad6f6d361..d2b6b9f68ff 100644 --- a/test/images/node-perf/npb-ep/Dockerfile +++ b/test/images/node-perf/npb-ep/Dockerfile @@ -12,7 +12,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM BASEIMAGE +FROM BASEIMAGE as build_node_perf_npb_ep + +CROSS_BUILD_COPY qemu-QEMUARCH-static /usr/bin/ RUN apt-get update && apt-get install -y build-essential gfortran @@ -20,7 +22,21 @@ ADD http://www.nas.nasa.gov/assets/npb/NPB3.3.1.tar.gz . RUN tar xzf NPB3.3.1.tar.gz WORKDIR ./NPB3.3.1/NPB3.3-OMP -RUN cp config/NAS.samples/make.def.gcc_x86 config/make.def +RUN if [ $(arch) != "x86_64" ]; then \ + sed s/-mcmodel=medium//g config/NAS.samples/make.def.gcc_x86 > config/make.def; \ +else \ + cp config/NAS.samples/make.def.gcc_x86 config/make.def; \ +fi RUN make EP CLASS=D -ENTRYPOINT ./bin/ep.D.x +# Copying the required libraries (shared object files) to a convenient location so that it can be copied into the +# main container in the second build stage. +RUN mkdir -p /lib-copy && find /usr/lib -name "*.so.*" -exec cp {} /lib-copy \; + +FROM BASEIMAGE + +COPY --from=build_node_perf_npb_ep /NPB3.3.1/NPB3.3-OMP/bin/ep.D.x / +COPY --from=build_node_perf_npb_ep /lib-copy /lib-copy +ENV LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/lib-copy" + +ENTRYPOINT /ep.D.x diff --git a/test/images/node-perf/npb-is/BASEIMAGE b/test/images/node-perf/npb-is/BASEIMAGE index 8a8f5b8e5b0..fbe1ea05e77 100644 --- a/test/images/node-perf/npb-is/BASEIMAGE +++ b/test/images/node-perf/npb-is/BASEIMAGE @@ -1 +1,3 @@ -amd64=debian:stretch +amd64=debian:stretch-slim +arm64=arm64v8/debian:stretch-slim +ppc64le=ppc64le/debian:stretch-slim diff --git a/test/images/node-perf/npb-is/Dockerfile b/test/images/node-perf/npb-is/Dockerfile index a5752ff98fe..c956658481e 100644 --- a/test/images/node-perf/npb-is/Dockerfile +++ b/test/images/node-perf/npb-is/Dockerfile @@ -12,15 +12,33 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM BASEIMAGE +FROM BASEIMAGE as build_node_perf_npb_is -RUN apt-get update && apt-get install -y build-essential +CROSS_BUILD_COPY qemu-QEMUARCH-static /usr/bin/ + +RUN apt-get update && apt-get install -y build-essential gfortran ADD http://www.nas.nasa.gov/assets/npb/NPB3.3.1.tar.gz . RUN tar xzf NPB3.3.1.tar.gz WORKDIR ./NPB3.3.1/NPB3.3-OMP -RUN cp config/NAS.samples/make.def.gcc_x86 config/make.def + +# Create build config based on the architecture and build the workload. +RUN if [ $(arch) != "x86_64" ]; then \ + sed s/-mcmodel=medium//g config/NAS.samples/make.def.gcc_x86 > config/make.def; \ +else \ + cp config/NAS.samples/make.def.gcc_x86 config/make.def; \ +fi RUN make IS CLASS=D -ENTRYPOINT ./bin/is.D.x +# Copying the required libraries (shared object files) to a convenient location so that it can be copied into the +# main container in the second build stage. +RUN mkdir -p /lib-copy && find /usr/lib -name "*.so.*" -exec cp {} /lib-copy \; + +FROM BASEIMAGE + +COPY --from=build_node_perf_npb_is /NPB3.3.1/NPB3.3-OMP/bin/is.D.x / +COPY --from=build_node_perf_npb_is /lib-copy /lib-copy +ENV LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/lib-copy" + +ENTRYPOINT /is.D.x diff --git a/test/images/node-perf/tf-wide-deep/Dockerfile b/test/images/node-perf/tf-wide-deep/Dockerfile index a11be4fc762..f5ab2c5c8dd 100644 --- a/test/images/node-perf/tf-wide-deep/Dockerfile +++ b/test/images/node-perf/tf-wide-deep/Dockerfile @@ -14,11 +14,14 @@ FROM BASEIMAGE -RUN apt-get update && apt-get install -y git time +RUN apt-get update && apt-get install -y wget time RUN pip install tensorflow -RUN git clone https://github.com/tensorflow/models.git -WORKDIR $HOME/models/official/wide_deep -RUN git checkout tags/v1.9.0 -ENV PYTHONPATH $PYTHONPATH:$HOME/models + +RUN wget https://github.com/tensorflow/models/archive/v1.9.0.tar.gz \ +&& tar xzf v1.9.0.tar.gz \ +&& rm -f v1.9.0.tar.gz + +WORKDIR $HOME/models-1.9.0/official/wide_deep +ENV PYTHONPATH $PYTHONPATH:$HOME/models-1.9.0 ENTRYPOINT python ./wide_deep.py