mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 13:37:30 +00:00
- Added multi-arch support.
- Used multi-stage builds.
This commit is contained in:
parent
297170e0bf
commit
c8cc7b1c26
@ -1 +1,3 @@
|
|||||||
amd64=debian:stretch
|
amd64=debian:stretch-slim
|
||||||
|
arm64=arm64v8/debian:stretch-slim
|
||||||
|
ppc64le=ppc64le/debian:stretch-slim
|
||||||
|
@ -12,7 +12,9 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# 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
|
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
|
RUN tar xzf NPB3.3.1.tar.gz
|
||||||
|
|
||||||
WORKDIR ./NPB3.3.1/NPB3.3-OMP
|
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
|
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
|
||||||
|
@ -1 +1,3 @@
|
|||||||
amd64=debian:stretch
|
amd64=debian:stretch-slim
|
||||||
|
arm64=arm64v8/debian:stretch-slim
|
||||||
|
ppc64le=ppc64le/debian:stretch-slim
|
||||||
|
@ -12,15 +12,33 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# 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 .
|
ADD http://www.nas.nasa.gov/assets/npb/NPB3.3.1.tar.gz .
|
||||||
RUN tar xzf NPB3.3.1.tar.gz
|
RUN tar xzf NPB3.3.1.tar.gz
|
||||||
|
|
||||||
WORKDIR ./NPB3.3.1/NPB3.3-OMP
|
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
|
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
|
||||||
|
@ -14,11 +14,14 @@
|
|||||||
|
|
||||||
FROM BASEIMAGE
|
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 pip install tensorflow
|
||||||
RUN git clone https://github.com/tensorflow/models.git
|
|
||||||
WORKDIR $HOME/models/official/wide_deep
|
RUN wget https://github.com/tensorflow/models/archive/v1.9.0.tar.gz \
|
||||||
RUN git checkout tags/v1.9.0
|
&& tar xzf v1.9.0.tar.gz \
|
||||||
ENV PYTHONPATH $PYTHONPATH:$HOME/models
|
&& 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
|
ENTRYPOINT python ./wide_deep.py
|
||||||
|
Loading…
Reference in New Issue
Block a user