Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions platform/vs/docker-sonic-vs.mk
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ $(DOCKER_SONIC_VS)_DEPENDS += $(SWSS) \

$(DOCKER_SONIC_VS)_PYTHON_DEBS += $(SONIC_UTILS)

$(DOCKER_SONIC_VS)_PYTHON_WHEELS += $(SONIC_YANG_MODELS_PY3)
$(DOCKER_SONIC_VS)_PYTHON_WHEELS += $(SONIC_YANG_MGMT_PY)

ifeq ($(INSTALL_DEBUG_TOOLS), y)
$(DOCKER_SONIC_VS)_DEPENDS += $(SWSS_DBG) \
$(LIBSWSSCOMMON_DBG) \
Expand Down
20 changes: 19 additions & 1 deletion platform/vs/docker-sonic-vs/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ RUN apt-get install -y net-tools \
tcpdump \
python-scapy \
conntrack \
iptables
iptables \
python3-pip

RUN pip install setuptools
RUN pip install py2_ipaddress
Expand Down Expand Up @@ -77,6 +78,23 @@ RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return
{%- endfor %}
{%- endif %}

{% if docker_sonic_vs_whls.strip() %}
# copy all whl PKGs first,
{% for whl in docker_sonic_vs_whls.split(' ') -%}
COPY python-wheels/{{ whl }} python-wheels/
{% endfor %}

# install PKGs after copying all PKGs to avoid dependency failure
# use py3 to find python3 package, which is forced by wheel as of now
{%- for whl in docker_sonic_vs_whls.split(' ') %}
{%- if 'py3' in whl %}
RUN pip3 install python-wheels/{{ whl }}
{% else -%}
RUN pip install python-wheels/{{ whl }}
{%- endif %}
{%- endfor %}
{% endif %}

# Clean up
RUN apt-get clean -y
RUN apt-get autoclean -y
Expand Down