From df70bd304bea4bccc6cc3679e342b9532ac2b3a3 Mon Sep 17 00:00:00 2001 From: ShiyanWangMS Date: Wed, 21 Feb 2024 16:39:17 +0800 Subject: [PATCH] Remove Python3 venv from sonic-mgmt-docker build file (#18130) Why I did it This is sonic-mgmt-docker Python3 migration. How I did it Remove Python3 venv from sonic-mgmt-docker How to verify it Compile docker and verify the Python3 venv is NOT there. --- dockers/docker-sonic-mgmt/Dockerfile.j2 | 85 ------------------------- 1 file changed, 85 deletions(-) diff --git a/dockers/docker-sonic-mgmt/Dockerfile.j2 b/dockers/docker-sonic-mgmt/Dockerfile.j2 index c544ef8b07..e5cbf9b1f3 100755 --- a/dockers/docker-sonic-mgmt/Dockerfile.j2 +++ b/dockers/docker-sonic-mgmt/Dockerfile.j2 @@ -265,91 +265,6 @@ WORKDIR /var/$user # Add az symlink for backwards compatibility RUN mkdir bin && ln -s /usr/bin/az bin/az -{% if legacy == 'y' or legacy == '1' %} -RUN python3 -m venv --system-site-packages env-python3 - -# Activating a virtualenv. The virtualenv automatically works for RUN, ENV and CMD. -ENV VIRTUAL_ENV=env-python3 -ARG BACKUP_OF_PATH="$PATH" -ENV PATH="$VIRTUAL_ENV/bin:$PATH" - -ENV LANG=C.UTF-8 LC_ALL=C.UTF-8 PYTHONIOENCODING=UTF-8 - -RUN python3 -m pip install --upgrade pip setuptools wheel -RUN python3 -m pip install aiohttp \ - allure-pytest==2.8.22 \ - ansible==2.9.27 \ - azure-storage-blob==12.9.0 \ - azure-kusto-data \ - azure-kusto-ingest \ - defusedxml \ - celery[redis]==5.2.7 \ - cffi \ - contextlib2==0.6.0.post1 \ - cryptography==41.0.2 \ - ctypesgen \ - dpkt \ - dpugen==0.1.1 \ - "future>=0.16.0" \ - gitpython \ - ipaddr \ - ipython==8.12.2 \ - ixload \ - ixnetwork-restpy==1.0.64 \ - ixnetwork-open-traffic-generator==0.0.79 \ - jinja2==2.10.1 \ - jsonpatch \ - lxml \ - markupsafe==2.0.1 \ - mock \ - msrest==0.6.21 \ - natsort \ - ncclient \ - netaddr \ - netmiko==2.4.2 \ - nnpy \ - pandas \ - paramiko==2.7.2 \ - passlib \ - pexpect \ - prettytable \ - psutil \ - ptf \ - pyasn1==0.4.8 \ - pycryptodome==3.9.8 \ - pyfiglet \ - pylint==1.8.1 \ - pyro4 \ - pysnmp==4.4.12 \ - pysubnettree \ - pytest-ansible \ - pytest-html \ - pytest-repeat \ - pytest-xdist==1.28.0 \ - python-dateutil \ - pytest==7.1.3 \ - PyYAML \ - redis \ - requests \ - retry \ - rpyc \ - scandir \ - scapy==2.5.0 \ - setuptools-rust \ - six \ - snappi==0.9.1 \ - snappi-convergence==0.4.1 \ - snappi-ixnetwork==0.9.1 \ - sshconf==0.2.5 \ - tabulate \ - textfsm==1.1.2 \ - thrift==0.11.0 \ - virtualenv - -# Deactivating a virtualenv -ENV PATH="$BACKUP_OF_PATH" -{% endif %} - USER root WORKDIR /azp COPY start.sh \