k8s.io/kubernetes@v1.29.3/test/images/node-perf/npb-ep/Dockerfile (about) 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 15 ARG BASEIMAGE 16 FROM $BASEIMAGE as build_node_perf_npb_ep 17 18 CROSS_BUILD_COPY qemu-QEMUARCH-static /usr/bin/ 19 20 RUN apt-get update && apt-get install -y build-essential gfortran 21 22 ADD http://www.nas.nasa.gov/assets/npb/NPB3.3.1.tar.gz . 23 RUN tar xzf NPB3.3.1.tar.gz 24 25 WORKDIR ./NPB3.3.1/NPB3.3-OMP 26 RUN if [ $(arch) != "x86_64" ]; then \ 27 sed s/-mcmodel=medium//g config/NAS.samples/make.def.gcc_x86 > config/make.def; \ 28 else \ 29 cp config/NAS.samples/make.def.gcc_x86 config/make.def; \ 30 fi 31 RUN make EP CLASS=D 32 33 # Copying the required libraries (shared object files) to a convenient location so that it can be copied into the 34 # main container in the second build stage. 35 RUN mkdir -p /lib-copy && find /usr/lib -name "*.so.*" -exec cp {} /lib-copy \; 36 37 FROM $BASEIMAGE 38 39 COPY --from=build_node_perf_npb_ep /NPB3.3.1/NPB3.3-OMP/bin/ep.D.x / 40 COPY --from=build_node_perf_npb_ep /lib-copy /lib-copy 41 ENV LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/lib-copy" 42 43 ENTRYPOINT /ep.D.x