-
Notifications
You must be signed in to change notification settings - Fork 444
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Use IPDK-container to speed-up the DPDK-PTF CI #4212
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
FROM ghcr.io/ipdk-io/ipdk-ubuntu2004-x86_64:ipdk_v23.07 | ||
|
||
# Prep | ||
ENV IPDK_INSTALL_DIR=/root/ipdk_install | ||
ENV PATH="${PATH}:/root/.local/bin" | ||
WORKDIR /root | ||
RUN rm -rf p4* | ||
COPY ./p4c /root/p4c | ||
COPY ./p4sde /root/p4sde | ||
COPY ./.ccache /root/.ccache | ||
RUN apt-get update && apt-get install rsync git ccache libhugetlbfs-bin -y | ||
|
||
# Update GCC to 11 -> GCC-9 cause config problem, remove after base OS is updated to 22.04 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It might be better to wait for a Ubuntu 22.04 docker version. @jafingerhut There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am guessing you are asking whether someone at Intel might publish a docker image with IPDK software already compiled and installed, rather than following instructions like these? https://github.com/ipdk-io/ipdk/blob/main/build/networking/README_DOCKER.md If so, let me know and I can try pinging a couple of people to find out if they have any intention of supporting such a thing. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah apologize, let me clarify: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry, my docker-fu is still weak, so asking to clarify. You are running these tests on a base OS that is Ubuntu 22.04, and a docker image created using Ubuntu 20.04 does not work there, and you would prefer a docker image that was built specifically for a base OS of Ubuntu 22.04? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The docker image is built using a base OS that is Ubuntu 22.04, but the docker image itself is 20.04. That is normally fine, but the p4-dpdk-target itself is built with Ubuntu 22.04. To get it to work on Ubuntu 20.04 requires a bunch of workarounds. It would be nice to remove this confounding factor. We thought we fixed the nondeterministic failures but that is sadly still not the case. |
||
RUN sudo apt install build-essential manpages-dev software-properties-common -y | ||
RUN sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y | ||
RUN sudo apt update && sudo apt install gcc-11 g++-11 -y | ||
RUN sudo update-alternatives --remove-all cpp | ||
RUN sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 90 --slave /usr/bin/g++ g++ /usr/bin/g++-9 --slave /usr/bin/gcov gcov /usr/bin/gcov-9 --slave /usr/bin/gcc-ar gcc-ar /usr/bin/gcc-ar-9 --slave /usr/bin/gcc-ranlib gcc-ranlib /usr/bin/gcc-ranlib-9 --slave /usr/bin/cpp cpp /usr/bin/cpp-9 \ | ||
&& sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 110 --slave /usr/bin/g++ g++ /usr/bin/g++-11 --slave /usr/bin/gcov gcov /usr/bin/gcov-11 --slave /usr/bin/gcc-ar gcc-ar /usr/bin/gcc-ar-11 --slave /usr/bin/gcc-ranlib gcc-ranlib /usr/bin/gcc-ranlib-11 --slave /usr/bin/cpp cpp /usr/bin/cpp-11; | ||
|
||
# p4sde (tdi requires gcc-11) | ||
WORKDIR /root/p4sde | ||
RUN pip3 install distro && python3 ./tools/setup/install_dep.py | ||
RUN ./autogen.sh && ./configure --prefix=$IPDK_INSTALL_DIR \ | ||
&& make -j4 && make install | ||
|
||
# infrap4d deps | ||
WORKDIR /root | ||
RUN sudo apt install libatomic1 libnl-route-3-dev openssl -y | ||
RUN rsync -avh ./networking-recipe/deps_install/* $IPDK_INSTALL_DIR \ | ||
&& rsync -avh ./networking-recipe/install/* $IPDK_INSTALL_DIR | ||
|
||
# P4C | ||
ENV CMAKE_UNITY_BUILD="ON" | ||
ENV ENABLE_TEST_TOOLS="ON" | ||
ENV INSTALL_DPDK="ON" | ||
ENV INSTALL_BMV2="ON" | ||
ENV INSTALL_EBPF="OFF" | ||
ENV IMAGE_TYPE="test" | ||
ENV CTEST_PARALLEL_LEVEL="4" | ||
ENV CMAKE_FLAGS="-DENABLE_P4TC=OFF -DENABLE_BMV2=OFF -DENABLE_EBPF=OFF -DENABLE_UBPF=OFF -DENABLE_GTESTS=OFF -DENABLE_P4TEST=OFF -DENABLE_P4C_GRAPHS=OFF -DIPDK_INSTALL_DIR=$IPDK_INSTALL_DIR " | ||
WORKDIR /root/p4c | ||
RUN apt-get install python3-dev -y # Required by packges in ci-build, remove after base OS is updated to 22.04 | ||
Hoooao marked this conversation as resolved.
Show resolved
Hide resolved
|
||
RUN tools/ci-build.sh | ||
|
||
# Disable github aciton default THP setting | ||
# CMD ["sudo", "hugeadm", "--thp-madvise "] | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tools
might be a strange folder for this file. Maybe create adocker
folder?