[PTF-SAIv2]Add ptf docker for sai-ptf (saiv2) (#9729)
* [PTF-SAIv2]Add ptf dockre for sai-ptf (saiv2) Base on current ptf docker create a new docker for sai-ptf(saiv2) upgrade related package use the latest ptf and install it test done: NOJESSIE=1 NOSTRETCH=1 NOBULLSEYE=1 ENABLE_SYNCD_RPC=y make target/docker-ptf-sai.gz BLDENV=buster make -f Makefile.work target/docker-ptf-sai.gz * upgrade the thrift to 014
This commit is contained in:
parent
bec35267cb
commit
2210c82ef8
40
dockers/docker-ptf-sai/Dockerfile.j2
Normal file
40
dockers/docker-ptf-sai/Dockerfile.j2
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
{% from "dockers/dockerfile-macros.j2" import install_debian_packages, install_python_wheels, copy_files %}
|
||||||
|
FROM docker-ptf
|
||||||
|
|
||||||
|
# Make apt-get non-interactive
|
||||||
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
# Set the apt source, update package cache and install necessary packages
|
||||||
|
RUN apt-get update \
|
||||||
|
&& apt-get upgrade -y \
|
||||||
|
&& apt-get dist-upgrade -y \
|
||||||
|
&& apt-get install -y \
|
||||||
|
python3-pip
|
||||||
|
|
||||||
|
RUN pip3 install crc16 \
|
||||||
|
netifaces \
|
||||||
|
getmac \
|
||||||
|
packet_helper \
|
||||||
|
psutil \
|
||||||
|
scapy==2.4.4 \
|
||||||
|
scapy_helper \
|
||||||
|
pysubnettree
|
||||||
|
|
||||||
|
COPY \
|
||||||
|
{% for deb in docker_ptf_sai_debs.split(' ') -%}
|
||||||
|
debs/{{ deb }}{{' '}}
|
||||||
|
{%- endfor -%}
|
||||||
|
debs/
|
||||||
|
|
||||||
|
RUN dpkg -i \
|
||||||
|
{% for deb in docker_ptf_sai_debs.split(' ') -%}
|
||||||
|
debs/{{ deb }}{{' '}}
|
||||||
|
{%- endfor %}
|
||||||
|
|
||||||
|
# Remove old ptf package
|
||||||
|
RUN dpkg -r python-ptf
|
||||||
|
|
||||||
|
# Install new ptf package
|
||||||
|
RUN git clone https://github.com/p4lang/ptf.git \
|
||||||
|
&& cd ptf \
|
||||||
|
&& python3.7 setup.py install --single-version-externally-managed --record /tmp/ptf_install.txt
|
8
platform/vs/docker-ptf-sai.dep
Normal file
8
platform/vs/docker-ptf-sai.dep
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
DPATH := $($(DOCKER_PTF_SAI)_PATH)
|
||||||
|
DEP_FILES := $(SONIC_COMMON_FILES_LIST) platform/vs/docker-ptf-sai.mk platform/vs/docker-ptf-sai.dep
|
||||||
|
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
|
||||||
|
DEP_FILES += $(shell git ls-files $(DPATH))
|
||||||
|
|
||||||
|
$(DOCKER_PTF_SAI)_CACHE_MODE := GIT_CONTENT_SHA
|
||||||
|
$(DOCKER_PTF_SAI)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST)
|
||||||
|
$(DOCKER_PTF_SAI)_DEP_FILES := $(DEP_FILES)
|
9
platform/vs/docker-ptf-sai.mk
Normal file
9
platform/vs/docker-ptf-sai.mk
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
# docker image for docker-ptf-sai
|
||||||
|
|
||||||
|
DOCKER_PTF_SAI = docker-ptf-sai.gz
|
||||||
|
DOCKER_PTF_BASE = docker-ptf.gz
|
||||||
|
$(DOCKER_PTF_SAI)_PATH = $(DOCKERS_PATH)/docker-ptf-sai
|
||||||
|
$(DOCKER_PTF_SAI)_DEPENDS += $(LIBTHRIFT_2) $(PYTHON3_THRIFT_2)
|
||||||
|
$(DOCKER_PTF_SAI)_LOAD_DOCKERS += $(DOCKER_PTF_BASE)
|
||||||
|
SONIC_DOCKER_IMAGES += $(DOCKER_PTF_SAI)
|
||||||
|
SONIC_BUSTER_DOCKERS += $(DOCKER_PTF_SAI)
|
@ -4,6 +4,7 @@ include $(PLATFORM_PATH)/docker-sonic-vs.dep
|
|||||||
include $(PLATFORM_PATH)/docker-syncd-vs.dep
|
include $(PLATFORM_PATH)/docker-syncd-vs.dep
|
||||||
include $(PLATFORM_PATH)/docker-gbsyncd-vs.dep
|
include $(PLATFORM_PATH)/docker-gbsyncd-vs.dep
|
||||||
include $(PLATFORM_PATH)/docker-ptf.dep
|
include $(PLATFORM_PATH)/docker-ptf.dep
|
||||||
|
include $(PLATFORM_PATH)/docker-ptf-sai.dep
|
||||||
include $(PLATFORM_PATH)/libsaithrift-dev.dep
|
include $(PLATFORM_PATH)/libsaithrift-dev.dep
|
||||||
include $(PLATFORM_PATH)/one-image.dep
|
include $(PLATFORM_PATH)/one-image.dep
|
||||||
include $(PLATFORM_PATH)/onie.dep
|
include $(PLATFORM_PATH)/onie.dep
|
||||||
|
@ -4,6 +4,7 @@ include $(PLATFORM_PATH)/docker-sonic-vs.mk
|
|||||||
include $(PLATFORM_PATH)/docker-syncd-vs.mk
|
include $(PLATFORM_PATH)/docker-syncd-vs.mk
|
||||||
include $(PLATFORM_PATH)/docker-gbsyncd-vs.mk
|
include $(PLATFORM_PATH)/docker-gbsyncd-vs.mk
|
||||||
include $(PLATFORM_PATH)/docker-ptf.mk
|
include $(PLATFORM_PATH)/docker-ptf.mk
|
||||||
|
include $(PLATFORM_PATH)/docker-ptf-sai.mk
|
||||||
include $(PLATFORM_PATH)/libsaithrift-dev.mk
|
include $(PLATFORM_PATH)/libsaithrift-dev.mk
|
||||||
include $(PLATFORM_PATH)/one-image.mk
|
include $(PLATFORM_PATH)/one-image.mk
|
||||||
include $(PLATFORM_PATH)/onie.mk
|
include $(PLATFORM_PATH)/onie.mk
|
||||||
|
Loading…
Reference in New Issue
Block a user