2020-08-06 05:16:11 -05:00
|
|
|
FROM docker-syncd-centec
|
|
|
|
|
|
|
|
## Make apt-get non-interactive
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
|
|
|
|
COPY \
|
|
|
|
{% for deb in docker_syncd_centec_rpc_debs.split(' ') -%}
|
|
|
|
debs/{{ deb }}{{' '}}
|
|
|
|
{%- endfor -%}
|
|
|
|
debs/
|
|
|
|
|
|
|
|
RUN apt-get purge -y syncd
|
|
|
|
|
|
|
|
RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; } ; \
|
|
|
|
{% for deb in docker_syncd_centec_rpc_debs.split(' ') -%}
|
|
|
|
dpkg_apt debs/{{ deb }}{{'; '}}
|
|
|
|
{%- endfor %}
|
|
|
|
|
|
|
|
## Pre-install the fundamental packages
|
|
|
|
RUN apt-get update \
|
|
|
|
&& apt-get -y install \
|
|
|
|
net-tools \
|
|
|
|
python-pip \
|
2021-01-31 01:11:33 -06:00
|
|
|
python-setuptools \
|
2020-08-06 05:16:11 -05:00
|
|
|
build-essential \
|
|
|
|
libssl-dev \
|
|
|
|
libffi-dev \
|
|
|
|
python-dev \
|
|
|
|
wget \
|
|
|
|
cmake \
|
|
|
|
&& 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 \
|
2021-01-31 01:11:33 -06:00
|
|
|
&& pip2 install cffi==1.7.0 \
|
|
|
|
&& pip2 install --upgrade cffi==1.7.0 \
|
|
|
|
&& pip2 install wheel \
|
|
|
|
&& pip2 install nnpy \
|
2020-08-06 05:16:11 -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"]
|