File tree 5 files changed +59
-0
lines changed
5 files changed +59
-0
lines changed Original file line number Diff line number Diff line change
1
+ {% from "dockers/dockerfile-macros.j2" import install_debian_packages , install_python_wheels , copy_files %}
2
+ FROM docker-ptf
3
+
4
+ # Make apt-get non-interactive
5
+ ENV DEBIAN_FRONTEND=noninteractive
6
+
7
+ # Set the apt source, update package cache and install necessary packages
8
+ RUN apt-get update \
9
+ && apt-get upgrade -y \
10
+ && apt-get dist-upgrade -y \
11
+ && apt-get install -y \
12
+ python3-pip
13
+
14
+ RUN pip3 install crc16 \
15
+ netifaces \
16
+ getmac \
17
+ packet_helper \
18
+ psutil \
19
+ scapy==2.4.4 \
20
+ scapy_helper \
21
+ pysubnettree
22
+
23
+ COPY \
24
+ {% for deb in docker_ptf_sai_debs .split (' ' ) -%}
25
+ debs/{{ deb }}{{' '}}
26
+ {% - endfor -%}
27
+ debs/
28
+
29
+ RUN dpkg -i \
30
+ {% for deb in docker_ptf_sai_debs .split (' ' ) -%}
31
+ debs/{{ deb }}{{' '}}
32
+ {% - endfor %}
33
+
34
+ # Remove old ptf package
35
+ RUN dpkg -r python-ptf
36
+
37
+ # Install new ptf package
38
+ RUN git clone https://github.com/p4lang/ptf.git \
39
+ && cd ptf \
40
+ && python3.7 setup.py install --single-version-externally-managed --record /tmp/ptf_install.txt
Original file line number Diff line number Diff line change
1
+ DPATH := $($(DOCKER_PTF_SAI)_PATH)
2
+ DEP_FILES := $(SONIC_COMMON_FILES_LIST) platform/vs/docker-ptf-sai.mk platform/vs/docker-ptf-sai.dep
3
+ DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST)
4
+ DEP_FILES += $(shell git ls-files $(DPATH))
5
+
6
+ $(DOCKER_PTF_SAI)_CACHE_MODE := GIT_CONTENT_SHA
7
+ $(DOCKER_PTF_SAI)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST)
8
+ $(DOCKER_PTF_SAI)_DEP_FILES := $(DEP_FILES)
Original file line number Diff line number Diff line change
1
+ # docker image for docker-ptf-sai
2
+
3
+ DOCKER_PTF_SAI = docker-ptf-sai.gz
4
+ DOCKER_PTF_BASE = docker-ptf.gz
5
+ $(DOCKER_PTF_SAI)_PATH = $(DOCKERS_PATH ) /docker-ptf-sai
6
+ $(DOCKER_PTF_SAI)_DEPENDS += $(LIBTHRIFT_2 ) $(PYTHON3_THRIFT_2 )
7
+ $(DOCKER_PTF_SAI)_LOAD_DOCKERS += $(DOCKER_PTF_BASE )
8
+ SONIC_DOCKER_IMAGES += $(DOCKER_PTF_SAI )
9
+ SONIC_BUSTER_DOCKERS += $(DOCKER_PTF_SAI )
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ include $(PLATFORM_PATH)/docker-sonic-vs.dep
4
4
include $(PLATFORM_PATH)/docker-syncd-vs.dep
5
5
include $(PLATFORM_PATH)/docker-gbsyncd-vs.dep
6
6
include $(PLATFORM_PATH)/docker-ptf.dep
7
+ include $(PLATFORM_PATH)/docker-ptf-sai.dep
7
8
include $(PLATFORM_PATH)/libsaithrift-dev.dep
8
9
include $(PLATFORM_PATH)/one-image.dep
9
10
include $(PLATFORM_PATH)/onie.dep
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ include $(PLATFORM_PATH)/docker-sonic-vs.mk
4
4
include $(PLATFORM_PATH ) /docker-syncd-vs.mk
5
5
include $(PLATFORM_PATH ) /docker-gbsyncd-vs.mk
6
6
include $(PLATFORM_PATH ) /docker-ptf.mk
7
+ include $(PLATFORM_PATH ) /docker-ptf-sai.mk
7
8
include $(PLATFORM_PATH ) /libsaithrift-dev.mk
8
9
include $(PLATFORM_PATH ) /one-image.mk
9
10
include $(PLATFORM_PATH ) /onie.mk
You can’t perform that action at this time.
0 commit comments