[docker-sonic-vs/Dockerfile.j2]: Install new YANG PKGs in VS docker. (#4684)

Changes:
. Install new YANG PKGs in VS docker.
. Install fixed version on other PY PKGs.

Signed-off-by: Praveen Chaudhary pchaudhary@linkedin.com
This commit is contained in:
Praveen Chaudhary 2020-06-22 15:38:36 -07:00 committed by GitHub
parent b48d274f69
commit c6dcd7d9a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 1 deletions

View File

@ -13,6 +13,9 @@ $(DOCKER_SONIC_VS)_DEPENDS += $(SWSS) \
$(DOCKER_SONIC_VS)_PYTHON_DEBS += $(SONIC_UTILS) $(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) ifeq ($(INSTALL_DEBUG_TOOLS), y)
$(DOCKER_SONIC_VS)_DEPENDS += $(SWSS_DBG) \ $(DOCKER_SONIC_VS)_DEPENDS += $(SWSS_DBG) \
$(LIBSWSSCOMMON_DBG) \ $(LIBSWSSCOMMON_DBG) \

View File

@ -44,7 +44,8 @@ RUN apt-get install -y net-tools \
tcpdump \ tcpdump \
python-scapy \ python-scapy \
conntrack \ conntrack \
iptables iptables \
python3-pip
RUN pip install setuptools RUN pip install setuptools
RUN pip install py2_ipaddress RUN pip install py2_ipaddress
@ -76,6 +77,23 @@ RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return
{%- endfor %} {%- endfor %}
{%- endif %} {%- 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 # Clean up
RUN apt-get clean -y RUN apt-get clean -y
RUN apt-get autoclean -y RUN apt-get autoclean -y