Dockerfile 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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_is
  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. # Create build config based on the architecture and build the workload.
  21. RUN if [ $(arch) != "x86_64" ]; then \
  22. sed s/-mcmodel=medium//g config/NAS.samples/make.def.gcc_x86 > config/make.def; \
  23. else \
  24. cp config/NAS.samples/make.def.gcc_x86 config/make.def; \
  25. fi
  26. RUN make IS CLASS=D
  27. # Copying the required libraries (shared object files) to a convenient location so that it can be copied into the
  28. # main container in the second build stage.
  29. RUN mkdir -p /lib-copy && find /usr/lib -name "*.so.*" -exec cp {} /lib-copy \;
  30. FROM BASEIMAGE
  31. COPY --from=build_node_perf_npb_is /NPB3.3.1/NPB3.3-OMP/bin/is.D.x /
  32. COPY --from=build_node_perf_npb_is /lib-copy /lib-copy
  33. ENV LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/lib-copy"
  34. ENTRYPOINT /is.D.x