2016-07-26 14:01:58 -05:00
|
|
|
FROM docker-syncd-mlnx
|
|
|
|
|
|
|
|
## Make apt-get non-interactive
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
|
2017-03-24 20:36:56 -05:00
|
|
|
COPY \
|
|
|
|
{% for deb in docker_syncd_mlnx_rpc_debs.split(' ') -%}
|
|
|
|
debs/{{ deb }}{{' '}}
|
|
|
|
{%- endfor -%}
|
|
|
|
debs/
|
|
|
|
|
2017-04-17 19:27:42 -05:00
|
|
|
RUN dpkg -P syncd
|
2017-03-24 20:36:56 -05:00
|
|
|
|
|
|
|
RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; } ; \
|
|
|
|
{% for deb in docker_syncd_mlnx_rpc_debs.split(' ') -%}
|
2017-04-17 19:27:42 -05:00
|
|
|
dpkg_apt debs/{{ deb }}{{'; '}}
|
2017-03-24 20:36:56 -05:00
|
|
|
{%- endfor %}
|
2016-09-09 19:53:41 -05:00
|
|
|
|
2016-07-26 14:01:58 -05:00
|
|
|
## 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 \
|
|
|
|
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 \
|
2016-09-09 19:53:41 -05:00
|
|
|
&& rm -f 1.0.0.tar.gz \
|
2016-09-15 18:14:34 -05:00
|
|
|
&& pip install cffi==1.7.0 \
|
|
|
|
&& pip install --upgrade cffi==1.7.0 \
|
2016-07-26 14:01:58 -05:00
|
|
|
&& pip install nnpy \
|
|
|
|
&& mkdir -p /opt \
|
|
|
|
&& cd /opt \
|
2016-09-09 19:53:41 -05:00
|
|
|
&& 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 \
|
2017-04-20 16:37:09 -05:00
|
|
|
&& rm -rf /root/deps
|
2016-07-26 14:01:58 -05:00
|
|
|
|
2017-05-08 17:43:31 -05:00
|
|
|
COPY ["ptf_nn_agent.conf", "/etc/supervisor/conf.d/"]
|
|
|
|
|
|
|
|
ENTRYPOINT ["/usr/bin/supervisord"]
|