sonic-buildimage/platform/innovium/docker-syncd-invm-rpc/Dockerfile.j2
Ravindranath C K ea546c861c
[innovium]: Enable syncd container autorestart for Innovium platforms (#11497)
Why I did it
Enable syncd container autorestart for Innovium platforms

How I did it
Add critical_process file and sypervisord.conf entry

How to verify it
Tested with autorestart/test_container_autorestart.py::test_containers_autorestart

PASSED autorestart/test_container_autorestart.py::test_containers_autorestart[sonic-xxx-dut-sonic-xxx-dut|syncd]

Signed-off-by: rck-innovium rck@innovium.com
2022-07-27 10:01:50 -07:00

61 lines
1.6 KiB
Django/Jinja
Executable File

FROM docker-syncd-invm-{{DOCKER_USERNAME}}:{{DOCKER_USERTAG}}
## Make apt-get non-interactive
ENV DEBIAN_FRONTEND=noninteractive
COPY \
{% for deb in docker_syncd_invm_rpc_debs.split(' ') -%}
debs/{{ deb }}{{' '}}
{%- endfor -%}
debs/
RUN dpkg -P syncd
## Pre-install the fundamental packages
RUN apt-get update \
&& apt-get -y install \
net-tools \
python-pip \
build-essential \
libssl-dev \
libffi-dev \
python-dev \
libpython2.7 \
libjansson4 \
wget \
cmake \
libqt5core5a \
libqt5network5 \
libboost-atomic1.71.0
RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; } ; \
{% for deb in docker_syncd_invm_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 \
&& pip install cffi==1.7.0 \
&& pip install --upgrade cffi==1.7.0 \
&& pip install nnpy \
&& pip install numpy \
&& pip install scipy \
&& pip install setuptools \
&& 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"]