sonic-buildimage/platform/barefoot/docker-syncd-bfn-rpc/Dockerfile.j2
Dmytro Lytvynenko 0f50835c11
[BFN] Upgrade syncd container to deb11 (#11374)
* draft upgrade to deb11 of syncd and syncd-rpc

* upgrade to python3

* revert workaround with libsaithrift

* Provide urls for sai and platform debs

* Downgrade python3 to python2

* Remove saithrift-patches

* Upgrade modules

* remove unnecessary lib

* remove more unnecessary modules

* Update sdk reference

* remove unnecessary packages from syncd-rpc
2022-08-19 16:02:01 -07:00

54 lines
1.5 KiB
Django/Jinja

FROM docker-syncd-bfn-{{DOCKER_USERNAME}}:{{DOCKER_USERTAG}}
## Make apt-get non-interactive
ENV DEBIAN_FRONTEND=noninteractive
COPY \
{% for deb in docker_syncd_bfn_rpc_debs.split(' ') -%}
debs/{{ deb }}{{' '}}
{%- endfor -%}
debs/
RUN apt-get purge -y syncd
## Pre-install the fundamental packages
RUN apt-get update \
&& apt-get -y install \
wget \
cmake \
libqt5core5a \
libqt5network5 \
python3-setuptools \
python3-pip \
python-is-python3 \
libboost-atomic1.74.0
RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; } ; \
{% for deb in docker_syncd_bfn_rpc_debs.split(' ') -%}
dpkg_apt debs/{{ deb }}{{'; '}}
{%- endfor %}
RUN wget https://github.com/nanomsg/nanomsg/archive/1.0.0.tar.gz \
&& tar xvfz 1.0.0.tar.gz \
&& cd nanomsg-1.0.0 \
&& mkdir -p build \
&& cmake . \
&& make install \
&& ldconfig \
&& cd .. \
&& rm -fr nanomsg-1.0.0 \
&& rm -f 1.0.0.tar.gz \
&& pip3 install cffi==1.7.0 \
&& pip3 install --upgrade cffi==1.7.0 \
&& pip3 install wheel \
&& pip3 install nnpy \
&& mkdir -p /opt \
&& cd /opt \
&& wget https://raw.githubusercontent.com/p4lang/ptf/master/ptf_nn/ptf_nn_agent.py \
&& apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y \
&& rm -rf /root/deps
COPY ["ptf_nn_agent.conf", "/etc/supervisor/conf.d/"]
ENTRYPOINT ["/usr/local/bin/supervisord"]