k8s.io/kubernetes@v1.29.3/test/images/node-perf/npb-is/Dockerfile (about)

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