Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[docker-ptf]: Fix issue with Py3 environment (sonic-net#19138)
This PR fixes a bug in the docker-ptf Dockerfile when executed with SONIC_PTF_ENV_PY_VER=py3 option. Why I did it Without this fix the docker-ptf image pushes all the required py3 packages into a virtual environment and prevents it from starting up. How I did it Fixed the jinja condition to initialize virtualenv only for mixed case. How to verify it Build, load and run the docker image Build with - make SONIC_PTF_ENV_PY_VER=py3 SONIC_BUILD_JOBS=4 BUILD_MULTIASIC_KVM=y INCLUDE_DHCP_SERVER=y target/docker-ptf.gz Load and run the image - docker load -i target/docker-ptf.gz Run with - docker run -it --entrypoint bash docker-ptf:latest Verified the packages are installed properly. * Fixes incorrect condition that makes Py3 packages go into a virtual environment when docker-ptf is built with 'py3'. When package is built with 'py3' the packages do not need to be in a virtualenv.
- Loading branch information