Dockerfile 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. # Copyright 2018 The Kubernetes Authors.
  2. #
  3. # Licensed under the Apache License, Version 2.0 (the "License");
  4. # you may not use this file except in compliance with the License.
  5. # You may obtain a copy of the License at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an "AS IS" BASIS,
  11. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. # See the License for the specific language governing permissions and
  13. # limitations under the License.
  14. FROM BASEIMAGE as build_node_perf_npb_ep
  15. CROSS_BUILD_COPY qemu-QEMUARCH-static /usr/bin/
  16. RUN apt-get update && apt-get install -y build-essential gfortran
  17. ADD http://www.nas.nasa.gov/assets/npb/NPB3.3.1.tar.gz .
  18. RUN tar xzf NPB3.3.1.tar.gz
  19. WORKDIR ./NPB3.3.1/NPB3.3-OMP
  20. RUN if [ $(arch) != "x86_64" ]; then \
  21. sed s/-mcmodel=medium//g config/NAS.samples/make.def.gcc_x86 > config/make.def; \
  22. else \
  23. cp config/NAS.samples/make.def.gcc_x86 config/make.def; \
  24. fi
  25. RUN make EP CLASS=D
  26. # Copying the required libraries (shared object files) to a convenient location so that it can be copied into the
  27. # main container in the second build stage.
  28. RUN mkdir -p /lib-copy && find /usr/lib -name "*.so.*" -exec cp {} /lib-copy \;
  29. FROM BASEIMAGE
  30. COPY --from=build_node_perf_npb_ep /NPB3.3.1/NPB3.3-OMP/bin/ep.D.x /
  31. COPY --from=build_node_perf_npb_ep /lib-copy /lib-copy
  32. ENV LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/lib-copy"
  33. ENTRYPOINT /ep.D.x