2022-04-27 19:39:37 -05:00
|
|
|
FROM docker-syncd-invm-{{DOCKER_USERNAME}}:{{DOCKER_USERTAG}}
|
2019-08-14 12:40:55 -05:00
|
|
|
|
|
|
|
## Make apt-get non-interactive
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
|
|
|
|
COPY \
|
|
|
|
{% for deb in docker_syncd_invm_rpc_debs.split(' ') -%}
|
|
|
|
debs/{{ deb }}{{' '}}
|
|
|
|
{%- endfor -%}
|
|
|
|
debs/
|
|
|
|
|
2023-03-27 12:29:31 -05:00
|
|
|
RUN apt-get purge -y syncd
|
2019-08-14 12:40:55 -05:00
|
|
|
|
|
|
|
## Pre-install the fundamental packages
|
|
|
|
RUN apt-get update \
|
|
|
|
&& apt-get -y install \
|
|
|
|
net-tools \
|
|
|
|
python-pip \
|
2023-03-27 12:29:31 -05:00
|
|
|
python-setuptools \
|
2019-08-14 12:40:55 -05:00
|
|
|
build-essential \
|
|
|
|
libssl-dev \
|
|
|
|
libffi-dev \
|
|
|
|
python-dev \
|
|
|
|
libjansson4 \
|
2023-03-27 12:29:31 -05:00
|
|
|
libyaml-dev \
|
2019-08-14 12:40:55 -05:00
|
|
|
wget \
|
|
|
|
cmake \
|
2021-02-10 04:26:31 -06:00
|
|
|
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 \
|
2019-08-14 12:40:55 -05:00
|
|
|
&& 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 \
|
2022-07-27 12:01:50 -05:00
|
|
|
&& pip install numpy \
|
|
|
|
&& pip install scipy \
|
|
|
|
&& pip install setuptools \
|
2019-08-14 12:40:55 -05:00
|
|
|
&& 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/"]
|
|
|
|
|
2020-11-22 23:18:44 -06:00
|
|
|
ENTRYPOINT ["/usr/local/bin/supervisord"]
|