Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build/docker/build-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ fi

BUILD_ARGS="${BUILD_ARGS} --build-arg FINAL_BASE=gcr.io/distroless/static"
if [ -z "${BUILDER}" -o "${BUILDER}" = 'docker' -o "${BUILDER}" = 'podman' ] ; then
DOCKER_BUILDKIT=0 ${BUILDER} build --pull -t ${IMG}:${TAG} ${BUILD_ARGS} -f ${DOCKERFILE} .
${BUILDER} build --pull -t ${IMG}:${TAG} ${BUILD_ARGS} -f ${DOCKERFILE} .
elif [ "${BUILDER}" = 'buildah' ] ; then
BUILDAH_RUNTIME=runc buildah bud --pull-always -t ${IMG}:${TAG} ${BUILD_ARGS} -f ${DOCKERFILE} .
else
Expand Down
3 changes: 1 addition & 2 deletions build/docker/intel-dlb-initcontainer.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ RUN curl -SL https://github.com/landley/toybox/archive/refs/tags/$TOYBOX_VERSION
&& rm toybox.tar.gz \
&& cd toybox-$TOYBOX_VERSION \
&& KCONFIG_CONFIG=${DIR}/build/docker/toybox-config-$(echo ${FINAL_BASE} | xargs basename -s :latest) LDFLAGS="--static" CC=musl-gcc PREFIX=$ROOT/usr/bin V=2 make toybox install_flat \
&& cd $ROOT && ln -fs usr/bin bin && cd - \
&& install -D LICENSE $ROOT/licenses/toybox \
&& cp -r /usr/share/doc/musl $ROOT/licenses/
###
Expand All @@ -61,4 +60,4 @@ LABEL version='devel'
LABEL release='1'
COPY --from=builder /install_root /
COPY demo/dlb-init.sh /usr/local/bin/
ENTRYPOINT [ "/bin/bash", "/usr/local/bin/dlb-init.sh"]
ENTRYPOINT ["/usr/local/bin/dlb-init.sh"]
3 changes: 1 addition & 2 deletions build/docker/intel-fpga-initcontainer.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ RUN curl -SL https://github.com/landley/toybox/archive/refs/tags/$TOYBOX_VERSION
&& rm toybox.tar.gz \
&& cd toybox-$TOYBOX_VERSION \
&& KCONFIG_CONFIG=${DIR}/build/docker/toybox-config-$(echo ${FINAL_BASE} | xargs basename -s :latest) LDFLAGS="--static" CC=musl-gcc PREFIX=$ROOT/usr/bin V=2 make toybox install_flat \
&& cd $ROOT && ln -fs usr/bin bin && cd - \
&& install -D LICENSE $ROOT/licenses/toybox \
&& cp -r /usr/share/doc/musl $ROOT/licenses/
###
Expand All @@ -97,4 +96,4 @@ LABEL name='intel-fpga-initcontainer'
LABEL summary='Intel® FPGA programming CRI hook for Kubernetes'
LABEL description='The FPGA prestart CRI-O hook performs discovery of the requested FPGA function bitstream and programs FPGA devices based on the environment variables in the workload description'
COPY --from=builder /install_root /
ENTRYPOINT [ "/bin/sh", "-c", "cp -a /usr/local/fpga-sw/* /opt/intel/fpga-sw/ && ln -sf /opt/intel/fpga-sw/intel-fpga-crihook.json /etc/containers/oci/hooks.d/" ]
ENTRYPOINT [ "/usr/bin/sh", "-c", "cp -a /usr/local/fpga-sw/* /opt/intel/fpga-sw/ && ln -sf /opt/intel/fpga-sw/intel-fpga-crihook.json /etc/containers/oci/hooks.d/" ]
3 changes: 1 addition & 2 deletions build/docker/intel-gpu-initcontainer.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ RUN curl -SL https://github.com/landley/toybox/archive/refs/tags/$TOYBOX_VERSION
&& rm toybox.tar.gz \
&& cd toybox-$TOYBOX_VERSION \
&& KCONFIG_CONFIG=${DIR}/build/docker/toybox-config-$(echo ${FINAL_BASE} | xargs basename -s :latest) LDFLAGS="--static" CC=musl-gcc PREFIX=$ROOT/usr/bin V=2 make toybox install_flat \
&& cd $ROOT && ln -fs usr/bin bin && cd - \
&& install -D LICENSE $ROOT/licenses/toybox \
&& cp -r /usr/share/doc/musl $ROOT/licenses/
###
Expand All @@ -80,4 +79,4 @@ LABEL name='intel-gpu-initcontainer'
LABEL summary='Intel® GPU NFD hook for Kubernetes'
LABEL description='The GPU fractional resources, such as GPU memory is registered as a kubernetes extended resource using node-feature-discovery (NFD). A custom NFD source hook is installed as part of GPU device plugin operator deployment and NFD is configured to register the GPU memory extended resource reported by the hook'
COPY --from=builder /install_root /
ENTRYPOINT [ "/bin/sh", "-c", "cp -a /usr/local/bin/gpu-sw/intel-gpu-nfdhook /etc/kubernetes/node-feature-discovery/source.d/" ]
ENTRYPOINT [ "/usr/bin/sh", "-c", "cp -a /usr/local/bin/gpu-sw/intel-gpu-nfdhook /etc/kubernetes/node-feature-discovery/source.d/" ]
2 changes: 1 addition & 1 deletion build/docker/intel-idxd-config-initcontainer.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ COPY demo/dsa.conf /idxd-init/
COPY demo/iaa.conf /idxd-init/
RUN mkdir /idxd-init/scratch
WORKDIR /idxd-init
ENTRYPOINT ["bash", "/usr/local/bin/idxd-init.sh"]
ENTRYPOINT ["/usr/local/bin/idxd-init.sh"]
3 changes: 1 addition & 2 deletions build/docker/intel-qat-initcontainer.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ RUN curl -SL https://github.com/landley/toybox/archive/refs/tags/$TOYBOX_VERSION
&& rm toybox.tar.gz \
&& cd toybox-$TOYBOX_VERSION \
&& KCONFIG_CONFIG=${DIR}/build/docker/toybox-config-$(echo ${FINAL_BASE} | xargs basename -s :latest) LDFLAGS="--static" CC=musl-gcc PREFIX=$ROOT/usr/bin V=2 make toybox install_flat \
&& cd $ROOT && ln -fs usr/bin bin && cd - \
&& install -D LICENSE $ROOT/licenses/toybox \
&& cp -r /usr/share/doc/musl $ROOT/licenses/
###
Expand All @@ -65,4 +64,4 @@ LABEL description='Intel QAT initcontainer initializes devices'
COPY --from=builder /install_root /
COPY demo/qat-init.sh /usr/local/bin/
WORKDIR /qat-init
ENTRYPOINT [ "/bin/bash", "/usr/local/bin/qat-init.sh"]
ENTRYPOINT ["/usr/local/bin/qat-init.sh"]
3 changes: 1 addition & 2 deletions build/docker/intel-sgx-initcontainer.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ RUN curl -SL https://github.com/landley/toybox/archive/refs/tags/$TOYBOX_VERSION
&& rm toybox.tar.gz \
&& cd toybox-$TOYBOX_VERSION \
&& KCONFIG_CONFIG=${DIR}/build/docker/toybox-config-$(echo ${FINAL_BASE} | xargs basename -s :latest) LDFLAGS="--static" CC=musl-gcc PREFIX=$ROOT/usr/bin V=2 make toybox install_flat \
&& cd $ROOT && ln -fs usr/bin bin && cd - \
&& install -D LICENSE $ROOT/licenses/toybox \
&& cp -r /usr/share/doc/musl $ROOT/licenses/
###
Expand All @@ -80,4 +79,4 @@ LABEL name='intel-sgx-initcontainer'
LABEL summary='Intel® SGX NFD hook for Kubernetes'
LABEL description='The SGX EPC memory available on each node is registered as a Kubernetes extended resource using node-feature-discovery (NFD). A custom NFD source hook is installed as part of SGX device plugin operator deployment and NFD is configured to register the SGX EPC memory extended resource reported by the hook'
COPY --from=builder /install_root /
ENTRYPOINT [ "/bin/sh", "-c", "cp -a /usr/local/bin/sgx-sw/intel-sgx-epchook /etc/kubernetes/node-feature-discovery/source.d/" ]
ENTRYPOINT [ "/usr/bin/sh", "-c", "cp -a /usr/local/bin/sgx-sw/intel-sgx-epchook /etc/kubernetes/node-feature-discovery/source.d/" ]
2 changes: 1 addition & 1 deletion build/docker/lib/nfdhook_end.docker
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
#define string(s) #s

COPY --from=builder /install_root /
ENTRYPOINT [ "/bin/sh", "-c", xstring(_ENTRYPOINT_) ]
ENTRYPOINT [ "/usr/bin/sh", "-c", xstring(_ENTRYPOINT_) ]
1 change: 0 additions & 1 deletion build/docker/lib/toybox_build.docker
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ RUN curl -SL https://github.com/landley/toybox/archive/refs/tags/$TOYBOX_VERSION
&& rm toybox.tar.gz \N
&& cd toybox-$TOYBOX_VERSION \N
&& KCONFIG_CONFIG=${DIR}/build/docker/toybox-config-$(echo ${FINAL_BASE} | xargs basename -s :latest) LDFLAGS="--static" CC=musl-gcc PREFIX=$ROOT/usr/bin V=2 make toybox install_flat \N
&& cd $ROOT && ln -fs usr/bin bin && cd - \N
&& install -D LICENSE $ROOT/licenses/toybox \N
&& cp -r /usr/share/doc/musl $ROOT/licenses/
###
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ FROM ${FINAL_BASE}
COPY --from=builder /install_root /

COPY demo/dlb-init.sh /usr/local/bin/
ENTRYPOINT [ "/bin/bash", "/usr/local/bin/dlb-init.sh"]
ENTRYPOINT ["/usr/local/bin/dlb-init.sh"]
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,4 @@ LABEL description='The FPGA prestart CRI-O hook performs discovery of the reques

COPY --from=builder /install_root /

ENTRYPOINT [ "/bin/sh", "-c", "cp -a /usr/local/fpga-sw/* /opt/intel/fpga-sw/ && ln -sf /opt/intel/fpga-sw/intel-fpga-crihook.json /etc/containers/oci/hooks.d/" ]

ENTRYPOINT [ "/usr/bin/sh", "-c", "cp -a /usr/local/fpga-sw/* /opt/intel/fpga-sw/ && ln -sf /opt/intel/fpga-sw/intel-fpga-crihook.json /etc/containers/oci/hooks.d/" ]
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ COPY demo/iaa.conf /idxd-init/
RUN mkdir /idxd-init/scratch

WORKDIR /idxd-init
ENTRYPOINT ["bash", "/usr/local/bin/idxd-init.sh"]
ENTRYPOINT ["/usr/local/bin/idxd-init.sh"]
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ COPY demo/qat-init.sh /usr/local/bin/

WORKDIR /qat-init

ENTRYPOINT [ "/bin/bash", "/usr/local/bin/qat-init.sh"]
ENTRYPOINT ["/usr/local/bin/qat-init.sh"]
4 changes: 2 additions & 2 deletions build/docker/toybox-config-static
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
# ToyBox version: KCONFIG_VERSION
# Sat Aug 5 15:52:20 2023
# Thu Dec 7 19:38:32 2023
#
# CONFIG_TOYBOX_ON_ANDROID is not set
CONFIG_TOYBOX_FORK=y
Expand Down Expand Up @@ -30,7 +30,7 @@ CONFIG_CUT=y
# CONFIG_DIRNAME is not set
# CONFIG_DU is not set
CONFIG_ECHO=y
# CONFIG_ENV is not set
CONFIG_ENV=y
# CONFIG_EXPAND is not set
# CONFIG_FALSE is not set
# CONFIG_FILE is not set
Expand Down
4 changes: 3 additions & 1 deletion demo/dlb-init.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/bin/sh -eu
#!/usr/bin/env bash

set -u

enable_and_configure_vfs() {
devpath=$1
Expand Down
2 changes: 1 addition & 1 deletion demo/qat-init.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
# This script is based on qatlib's qat_init.sh
NODE_NAME="${NODE_NAME:-}"
ENABLED_QAT_PF_PCIIDS=${ENABLED_QAT_PF_PCIIDS:-37c8 4940 4942 4944}
Expand Down