mirror of
https://github.com/intel/intel-device-plugins-for-kubernetes.git
synced 2025-06-03 03:59:37 +00:00

- Removed Sphynx from the list of bundles as it brings python-basic3, which triggers this exception: Step 9/18 : RUN cd /usr/src/opae/opae-sdk-${OPAE_RElEASE} && patch -p1 < 0001-OPAE-in-containers-don-t-enumerate-missing-device.patch && mkdir build && cd build && cmake .. -DBUILD_ASE=0 -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_SKIP_RPATH=true && make xfpga nlb0 nlb3 ... -- Found Sphinx: /usr/sbin/sphinx-build -- Found PythonInterp: /usr/sbin/python (found suitable version "3.8.1", minimum required is "2.7") -- Found Perl: /usr/sbin/perl (found version "5.28.2") -- Found PythonInterp: /usr/sbin/python (found version "3.8.1") Traceback (most recent call last): File "/usr/src/opae/opae-sdk-1.3.2-1/build/platforms/scripts/afu_platform_config_main/do_zip.py", line 8, in <module> wr_buf.write('#!/usr/bin/env python' + os.linesep) TypeError: a bytes-like object is required, not 'str' Traceback (most recent call last): File "/usr/src/opae/opae-sdk-1.3.2-1/build/platforms/scripts/afu_platform_info_main/do_zip.py", line 8, in <module> wr_buf.write('#!/usr/bin/env python' + os.linesep) TypeError: a bytes-like object is required, not 'str' Traceback (most recent call last): File "/usr/src/opae/opae-sdk-1.3.2-1/build/tools/extra/packager/packager_main/do_zip.py", line 8, in <module> wr_buf.write('#!/usr/bin/env python' + os.linesep) TypeError: a bytes-like object is required, not 'str' Traceback (most recent call last): File "/usr/src/opae/opae-sdk-1.3.2-1/build/tools/extra/packager/afu_json_mgr_main/do_zip.py", line 8, in <module> wr_buf.write('#!/usr/bin/env python' + os.linesep) TypeError: a bytes-like object is required, not 'str' Traceback (most recent call last): File "/usr/src/opae/opae-sdk-1.3.2-1/build/tools/extra/fpgadiag/fpgalpbk_main/do_zip.py", line 8, in <module> wr_buf.write('#!/usr/bin/env python' + os.linesep) TypeError: a bytes-like object is required, not 'str' Traceback (most recent call last): File "/usr/src/opae/opae-sdk-1.3.2-1/build/tools/extra/fpgadiag/mactest_main/do_zip.py", line 8, in <module> wr_buf.write('#!/usr/bin/env python' + os.linesep) TypeError: a bytes-like object is required, not 'str' Traceback (most recent call last): File "/usr/src/opae/opae-sdk-1.3.2-1/build/tools/extra/fpgadiag/fpgastats_main/do_zip.py", line 8, in <module> wr_buf.write('#!/usr/bin/env python' + os.linesep) TypeError: a bytes-like object is required, not 'str'
59 lines
2.1 KiB
Docker
59 lines
2.1 KiB
Docker
# CLEAR_LINUX_BASE and CLEAR_LINUX_VERSION can be used to make the build
|
|
# reproducible by choosing an image by its hash and installing an OS version
|
|
# with --version=:
|
|
# CLEAR_LINUX_BASE=clearlinux@sha256:b8e5d3b2576eb6d868f8d52e401f678c873264d349e469637f98ee2adf7b33d4
|
|
# CLEAR_LINUX_VERSION="--version=29970"
|
|
#
|
|
# This is used on release branches before tagging a stable version.
|
|
# The master branch defaults to using the latest Clear Linux.
|
|
ARG CLEAR_LINUX_BASE=clearlinux:latest
|
|
|
|
FROM ${CLEAR_LINUX_BASE} as builder
|
|
|
|
ARG CLEAR_LINUX_VERSION=
|
|
|
|
RUN swupd update --no-boot-update ${CLEAR_LINUX_VERSION} && \
|
|
swupd bundle-add wget c-basic devpkg-json-c devpkg-util-linux devpkg-hwloc doxygen patch
|
|
# Fetch dependencies and source code
|
|
ARG OPAE_RElEASE=1.3.2-1
|
|
|
|
# workaround for a swupd failure discussed in https://github.com/clearlinux/distribution/issues/831
|
|
RUN ldconfig
|
|
RUN mkdir -p /usr/src/opae && \
|
|
cd /usr/src/opae && \
|
|
wget https://github.com/OPAE/opae-sdk/archive/${OPAE_RElEASE}.tar.gz && \
|
|
tar xf *.tar.gz
|
|
|
|
# Build OPAE
|
|
ADD 0001-OPAE-in-containers-don-t-enumerate-missing-device.patch /usr/src/opae/opae-sdk-${OPAE_RElEASE}
|
|
RUN cd /usr/src/opae/opae-sdk-${OPAE_RElEASE} && \
|
|
patch -p1 < 0001-OPAE-in-containers-don-t-enumerate-missing-device.patch && \
|
|
mkdir build && \
|
|
cd build && \
|
|
cmake .. -DBUILD_ASE=0 -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_SKIP_RPATH=true && \
|
|
make xfpga nlb0 nlb3
|
|
|
|
# Install clean os-core and libstdcpp bundle in target directory
|
|
RUN mkdir /install_root \
|
|
&& swupd os-install \
|
|
${CLEAR_LINUX_VERSION} \
|
|
--path /install_root --statedir /swupd-state \
|
|
--bundles=os-core,libstdcpp --no-boot-update \
|
|
&& rm -rf /install_root/var/lib/swupd/*
|
|
|
|
# Minimal result image
|
|
FROM scratch as final
|
|
ENV PATH="/usr/local/bin/:${PATH}"
|
|
COPY --from=builder /install_root /
|
|
|
|
# OPAE
|
|
# nlb0 and nlb3 examples
|
|
COPY --from=builder /usr/src/opae/opae-sdk-*/build/bin/nlb* /usr/local/bin/
|
|
# libxfpga.so, libopae-c*.so*
|
|
COPY --from=builder /usr/src/opae/opae-sdk-*/build/lib/lib*.so* /usr/local/lib64/
|
|
|
|
RUN echo /usr/local/lib64/ >> /etc/ld.so.conf && ldconfig
|
|
|
|
COPY test_fpga.sh /usr/local/bin/
|
|
ENTRYPOINT ["/usr/local/bin/test_fpga.sh"]
|