Skip to content

Commit

Permalink
Removed arm64 build for p4
Browse files Browse the repository at this point in the history
  • Loading branch information
whatever4711 committed Apr 3, 2024
1 parent dbd0f1d commit b9600b1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 72 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pr-build-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ jobs:
with:
context: ./singlestage_images/
file: ./singlestage_images/${{ matrix.singlestage_images }}.dockerfile
platforms: linux/amd64,linux/arm64
platforms: linux/amd64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ jobs:
with:
context: ./singlestage_images/
file: ./singlestage_images/${{ matrix.singlestage_images }}.dockerfile
platforms: linux/amd64,linux/arm64
platforms: linux/amd64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
Expand Down
75 changes: 5 additions & 70 deletions singlestage_images/p4.dockerfile
Original file line number Diff line number Diff line change
@@ -1,76 +1,11 @@
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/

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 --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

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 cd behavioral-model/tools && make install && \
cd / && mv behavioral-model/tools . && \
rm -Rf behavioral-model/
RUN echo 'deb https://download.opensuse.org/repositories/home:/p4lang/xUbuntu_22.04/ /' > /etc/apt/sources.list.d/home:p4lang.list
RUN curl -fsSL https://download.opensuse.org/repositories/home:p4lang/xUbuntu_22.04/Release.key | gpg --dearmor | tee /etc/apt/trusted.gpg.d/home_p4lang.gpg > /dev/null
RUN apt-get update && apt-get install -y p4lang-p4c p4lang-bmv2 && \
apt clean && \
rm -rf /tmp/* /var/lib/apt/lists/* /var/tmp/

RUN python3 -m pip install --no-cache-dir p4runtime
# git clone https://github.com/p4lang/tutorials.git && \
Expand Down

0 comments on commit b9600b1

Please sign in to comment.