Skip to content

Commit

Permalink
[Nokia] Add protobuf and grpc C++ and python lib to support Nokia IXR…
Browse files Browse the repository at this point in the history
…7250E platform (#8366)

Nokia IXR7250E platform requires grpcio, grpcio-tools python library, and libprotobuf-dev, libgrpc++ library

Modified the build_debian.sh install libprotobuf-dev and libgrpc++ to support nokia ndk
Modified the sonic_debian_extension.j2 to install the grpcio and grpcio-tools in the host
Modified the docker-platform-monitor/Dockerfile.js to install grpcio and grpcio-tools for the pmon container.

Image running success.
  • Loading branch information
mlok-nokia authored and yxieca committed Apr 8, 2022
1 parent bca1ab6 commit 032d5ea
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
2 changes: 2 additions & 0 deletions build_debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,8 @@ sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y in
python3-distutils \
python3-pip \
cron \
libprotobuf17 \
libgrpc++ \
haveged \
jq

Expand Down
7 changes: 6 additions & 1 deletion dockers/docker-platform-monitor/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,12 @@ RUN pip2 install 'setuptools==40.8.0'
# NOTE: Only install enum34 for Python 2, as our version of Python 3 is 3.7, which
# contains 'enum' as part of the standard library. Installing enum34 there will
# cause conflicts.
RUN pip2 install enum34
RUN pip2 install enum34 \
grpcio==1.39.0 \
grpcio-tools==1.39.0

RUN pip3 install grpcio==1.39.0 \
grpcio-tools==1.39.0

# Barefoot platform vendors' sonic_platform packages import the Python 'thrift' library
RUN pip2 install thrift==0.13.0
Expand Down
6 changes: 6 additions & 0 deletions files/build_templates/sonic_debian_extension.j2
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,12 @@ sudo rm -rf $FILESYSTEM_ROOT/$REDIS_DUMP_LOAD_PY2_WHEEL_NAME
# Install Python module for psutil
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip3 install psutil

# Install Python module for grpcio and grpcio-toole
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip install "grpcio==1.39.0"
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip install "grpcio-tools==1.39.0"
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip3 install "grpcio==1.39.0"
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip3 install "grpcio-tools==1.39.0"

# Install SwSS SDK Python 3 package
# Note: the scripts will be overwritten by corresponding Python 2 package
SWSSSDK_PY3_WHEEL_NAME=$(basename {{swsssdk_py3_wheel_path}})
Expand Down

0 comments on commit 032d5ea

Please sign in to comment.