2016-07-26 14:01:58 -05:00
|
|
|
FROM docker-syncd-mlnx
|
|
|
|
|
|
|
|
## Make apt-get non-interactive
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
|
2016-09-09 19:53:41 -05:00
|
|
|
COPY deps /deps
|
|
|
|
|
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 \
|
2016-11-01 19:00:54 -05:00
|
|
|
supervisor \
|
2016-07-26 14:01:58 -05:00
|
|
|
&& 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 \
|
|
|
|
&& dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; } \
|
|
|
|
&& dpkg -r syncd \
|
|
|
|
&& dpkg_apt /deps/syncd_*.deb \
|
2016-11-29 19:07:50 -06:00
|
|
|
&& dpkg_apt /deps/libthrift-0.9.3_*.deb \
|
2016-09-09 19:53:41 -05:00
|
|
|
&& apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y \
|
|
|
|
&& rm -rf /deps
|
2016-07-26 14:01:58 -05:00
|
|
|
|
2016-09-09 19:53:41 -05:00
|
|
|
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
|
|
|
COPY ptf_nn_agent.conf /etc/supervisor/conf.d/ptf_nn_agent.conf
|
2016-07-26 14:01:58 -05:00
|
|
|
|
|
|
|
ENTRYPOINT service rsyslog start \
|
2016-11-10 20:29:44 -06:00
|
|
|
&& sysctl -w net.core.rmem_max=509430500 \
|
2016-07-26 14:01:58 -05:00
|
|
|
&& service syncd start \
|
2016-09-09 19:53:41 -05:00
|
|
|
&& /usr/bin/supervisord
|