Skip to content

Commit

Permalink
Updated chip-cert-bins Dockerfile (#33448)
Browse files Browse the repository at this point in the history
  • Loading branch information
rquidute authored and pull[bot] committed Jul 29, 2024
1 parent 8dd901b commit 695eca8
Showing 1 changed file with 10 additions and 14 deletions.
24 changes: 10 additions & 14 deletions integrations/docker/images/chip-cert-bins/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ RUN set -x \
wget \
git-lfs \
zlib1g-dev \
&& rm -rf /var/lib/apt/lists/ \
&& git lfs install \
&& : # last line

Expand Down Expand Up @@ -119,13 +118,12 @@ RUN case ${TARGETPLATFORM} in \

# Python 3 and PIP
RUN set -x \
&& DEBIAN_FRONTEND=noninteractive apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y libgirepository1.0-dev \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y software-properties-common \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y \
libgirepository1.0-dev \
software-properties-common \
&& add-apt-repository universe \
&& curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py \
&& python3 get-pip.py \
&& rm -rf /var/lib/apt/lists/ \
&& : # last line

RUN set -x \
Expand All @@ -148,9 +146,9 @@ RUN set -x \
&& git clone https://github.com/google/bloaty.git \
&& mkdir -p bloaty/build \
&& cd bloaty/build \
&& cmake ../ \
&& make -j8 \
&& make install \
&& cmake -G Ninja ../ \
&& ninja \
&& ninja install \
&& cd ../.. \
&& rm -rf bloaty \
&& : # last line
Expand Down Expand Up @@ -194,7 +192,6 @@ RUN case ${TARGETPLATFORM} in \
--target linux-x64-lit-icd-ipv6only \
--target linux-x64-energy-management-ipv6only \
--target linux-x64-microwave-oven-ipv6only \
--target linux-x64-rvc-ipv6only \
build \
&& mv out/linux-x64-chip-tool-ipv6only-platform-mdns/chip-tool out/chip-tool \
&& mv out/linux-x64-shell-ipv6only-platform-mdns/chip-shell out/chip-shell \
Expand All @@ -214,7 +211,6 @@ RUN case ${TARGETPLATFORM} in \
&& mv out/linux-x64-lit-icd-ipv6only/lit-icd-app out/lit-icd-app \
&& mv out/linux-x64-energy-management-ipv6only/chip-energy-management-app out/chip-energy-management-app \
&& mv out/linux-x64-microwave-oven-ipv6only/chip-microwave-oven-app out/chip-microwave-oven-app \
&& mv out/linux-x64-rvc-ipv6only/chip-rvc-app out/chip-rvc-app \
;; \
"linux/arm64")\
set -x \
Expand Down Expand Up @@ -257,7 +253,6 @@ RUN case ${TARGETPLATFORM} in \
&& mv out/linux-arm64-lit-icd-ipv6only/lit-icd-app out/lit-icd-app \
&& mv out/linux-arm64-energy-management-ipv6only/chip-energy-management-app out/chip-energy-management-app \
&& mv out/linux-arm64-microwave-oven-ipv6only/chip-microwave-oven-app out/chip-microwave-oven-app \
&& mv out/linux-arm64-rvc-ipv6only/chip-rvc-app out/chip-rvc-app \
;; \
*) ;; \
esac
Expand Down Expand Up @@ -290,18 +285,19 @@ COPY --from=chip-build-cert-bins /root/connectedhomeip/out/chip-app1 chip-app1
COPY --from=chip-build-cert-bins /root/connectedhomeip/out/lit-icd-app lit-icd-app
COPY --from=chip-build-cert-bins /root/connectedhomeip/out/chip-energy-management-app chip-energy-management-app
COPY --from=chip-build-cert-bins /root/connectedhomeip/out/chip-microwave-oven-app chip-microwave-oven-app
COPY --from=chip-build-cert-bins /root/connectedhomeip/out/chip-rvc-app chip-rvc-app

# Stage 3.1: Setup the Matter Python environment
COPY --from=chip-build-cert-bins /root/connectedhomeip/out/python_lib python_lib
COPY --from=chip-build-cert-bins /root/connectedhomeip/out/python_env python_env
COPY --from=chip-build-cert-bins /root/connectedhomeip/src/python_testing python_testing/scripts/sdk
COPY --from=chip-build-cert-bins /root/connectedhomeip/data_model python_testing/data_model
COPY --from=chip-build-cert-bins /root/connectedhomeip/src/python_testing python_testing

COPY --from=chip-build-cert-bins /root/connectedhomeip/scripts/tests/requirements.txt /tmp/requirements.txt
RUN pip install -r /tmp/requirements.txt && rm /tmp/requirements.txt

COPY --from=chip-build-cert-bins /root/connectedhomeip/src/python_testing/requirements.txt /tmp/requirements.txt
RUN pip install -r /tmp/requirements.txt && rm /tmp/requirements.txt

# PIP requires MASON package compilation, which seems to require a JDK
RUN set -x && DEBIAN_FRONTEND=noninteractive apt-get install -fy openjdk-8-jdk

RUN pip install --no-cache-dir python_lib/controller/python/chip*.whl

0 comments on commit 695eca8

Please sign in to comment.