From 7bcf3db30e9f9322d05149f214941f5b0515d877 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20Gro=C3=9Fmann?= Date: Fri, 5 Apr 2024 12:09:09 +0200 Subject: [PATCH] Complete build --- .github/workflows/build-archs.yml | 8 ++-- bmv.dockerfile | 32 +++++++------- grpc.dockerfile | 28 ++++++------- p4.dockerfile | 70 +++++++++++++++---------------- 4 files changed, 68 insertions(+), 70 deletions(-) diff --git a/.github/workflows/build-archs.yml b/.github/workflows/build-archs.yml index 5eecc7d..da13628 100644 --- a/.github/workflows/build-archs.yml +++ b/.github/workflows/build-archs.yml @@ -51,9 +51,7 @@ jobs: with: context: . file: p4.dockerfile - platforms: linux/amd64,linux/arm/v7,linux/arm64 - build-args: | - image=unibaktr/alpine + platforms: linux/amd64,linux/arm64 push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} @@ -96,7 +94,7 @@ jobs: with: context: . file: grpc.dockerfile - platforms: linux/amd64,linux/arm/v7,linux/arm64 + platforms: linux/amd64,linux/arm64 build-args: | image=${{ env.REGISTRY }}/${{ env.REPO }}/p4:${{ env.BRANCH_NAME }} push: true @@ -141,7 +139,7 @@ jobs: with: context: . file: grpc.dockerfile - platforms: linux/amd64,linux/arm/v7,linux/arm64 + platforms: linux/amd64,linux/arm64 build-args: | image=${{ env.REGISTRY }}/${{ env.REPO }}/grpc:${{ env.BRANCH_NAME }} push: true diff --git a/bmv.dockerfile b/bmv.dockerfile index c97b346..e585f37 100644 --- a/bmv.dockerfile +++ b/bmv.dockerfile @@ -2,20 +2,20 @@ ARG image=unibaktr/ubuntu FROM $image WORKDIR / -# RUN git clone https://github.com/p4lang/behavioral-model && \ -# cd behavioral-model && \ -# sed -i 's/sudo//g' ci/install-thrift.sh && bash ci/install-thrift.sh && \ -# sed -i 's/sudo//g' ci/install-nanomsg.sh && bash ci/install-nanomsg.sh && \ -# ldconfig && \ -# sed -i 's/sudo//g' ci/install-nnpy.sh && bash ci/install-nnpy.sh && \ -# ./autogen.sh && \ -# ./configure --with-pi && \ -# make -j$(nproc) && \ -# make install && ldconfig +RUN git clone https://github.com/p4lang/behavioral-model && \ + cd behavioral-model && \ + sed -i 's/sudo//g' ci/install-thrift.sh && bash ci/install-thrift.sh && \ + sed -i 's/sudo//g' ci/install-nanomsg.sh && bash ci/install-nanomsg.sh && \ + ldconfig && \ + sed -i 's/sudo//g' ci/install-nnpy.sh && bash ci/install-nnpy.sh && \ + ./autogen.sh && \ + ./configure --with-pi && \ + make -j$(nproc) && \ + make install && ldconfig -# RUN cd behavioral-model/tools && make install && \ -# cd / && mv behavioral-model/tools . && \ -# rm -Rf behavioral-model/ -# -# RUN python3 -m pip install --no-cache-dir p4runtime -# git clone https://github.com/p4lang/tutorials.git && \ +RUN cd behavioral-model/tools && make install && \ + cd / && mv behavioral-model/tools . && \ + rm -Rf behavioral-model/ + +RUN python3 -m pip install --no-cache-dir p4runtime +# git clone https://github.com/p4lang/tutorials.git diff --git a/grpc.dockerfile b/grpc.dockerfile index 5c120e7..fd4c41c 100644 --- a/grpc.dockerfile +++ b/grpc.dockerfile @@ -2,17 +2,17 @@ ARG image=unibaktr/ubuntu FROM $image WORKDIR /tmp -# RUN git clone --depth=1 -b v1.43.2 https://github.com/google/grpc.git && \ -# cd grpc && \ -# git submodule update --init --recursive && \ -# mkdir -p cmake/build && cd cmake/build && \ -# cmake ../.. && make -j$(nproc) && \ -# make install && ldconfig && \ -# cd ../.. && rm -Rf grpc && \ -# git clone https://github.com/p4lang/PI && \ -# cd PI && \ -# git submodule update --init && \ -# ./autogen.sh && \ -# ./configure --with-proto && make -j$(nproc) && \ -# make install && ldconfig && \ -# cd .. && rm -Rf PI +RUN git clone --depth=1 -b v1.43.2 https://github.com/google/grpc.git && \ + cd grpc && \ + git submodule update --init --recursive && \ + mkdir -p cmake/build && cd cmake/build && \ + cmake ../.. && make -j$(nproc) && \ + make install && ldconfig && \ + cd ../.. && rm -Rf grpc && \ + git clone https://github.com/p4lang/PI && \ + cd PI && \ + git submodule update --init && \ + ./autogen.sh && \ + ./configure --with-proto && make -j$(nproc) && \ + make install && ldconfig && \ + cd .. && rm -Rf PI diff --git a/p4.dockerfile b/p4.dockerfile index 0b2523e..5e25f27 100644 --- a/p4.dockerfile +++ b/p4.dockerfile @@ -1,41 +1,41 @@ ARG image=unibaktr/ubuntu FROM $image -# RUN apt update && \ -# apt install -y \ -# automake \ -# bison \ -# cmake \ -# g++ \ -# flex \ -# git \ -# libgc-dev \ -# libgmp-dev \ -# libpcap-dev \ -# libboost-dev \ -# libboost-test-dev \ -# libboost-program-options-dev \ -# libboost-system-dev \ -# libboost-filesystem-dev \ -# libboost-thread-dev \ -# libboost-iostreams-dev \ -# libboost-graph-dev \ -# libevent-dev \ -# libjudy-dev \ -# libprotobuf-dev \ -# libssl-dev \ -# libtool \ -# llvm \ -# protobuf-compiler \ -# wget && \ -# apt clean && \ -# rm -rf /tmp/* /var/lib/apt/lists/* /var/tmp/ +RUN apt update && \ + apt install -y \ + automake \ + bison \ + cmake \ + g++ \ + flex \ + git \ + libgc-dev \ + libgmp-dev \ + libpcap-dev \ + libboost-dev \ + libboost-test-dev \ + libboost-program-options-dev \ + libboost-system-dev \ + libboost-filesystem-dev \ + libboost-thread-dev \ + libboost-iostreams-dev \ + libboost-graph-dev \ + libevent-dev \ + libjudy-dev \ + libprotobuf-dev \ + libssl-dev \ + libtool \ + llvm \ + protobuf-compiler \ + wget && \ + apt clean && \ + rm -rf /tmp/* /var/lib/apt/lists/* /var/tmp/ WORKDIR /tmp -# RUN git clone --recursive https://github.com/p4lang/p4c.git && \ -# cd p4c && mkdir build && cd build && \ -# cmake .. && \ -# make -j$(nproc) && \ -# make install && ldconfig && \ -# cd .. && rm -Rf p4c/ +RUN git clone --recursive https://github.com/p4lang/p4c.git && \ + cd p4c && mkdir build && cd build && \ + cmake .. && \ + make -j$(nproc) && \ + make install && ldconfig && \ + cd .. && rm -Rf p4c/