From a21babef114b06ce9eeb2ff6fd83e907e381a051 Mon Sep 17 00:00:00 2001 From: Eran Dahan Date: Wed, 24 Feb 2021 19:49:58 +0200 Subject: [PATCH] [Docker] Added support for python2 (#6753) - Why I did it Mellanox SDK APIs support python 2 at the moment. - How I did it Mellanox SDK APIs support python 2 at the moment. - How to verify it Add python 2 to Mellanox syncd only. - Which release branch to backport (provide reason below if selected) docker exec -t syncd /bin/bash -c "sx_api_dbg_generate_dump.py /home/sx_api_dbg_dump" You can see that it will work and generate /home/sx_api_dbg_dump Signed-off-by: allas --- platform/mellanox/docker-syncd-mlnx/Dockerfile.j2 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/platform/mellanox/docker-syncd-mlnx/Dockerfile.j2 b/platform/mellanox/docker-syncd-mlnx/Dockerfile.j2 index 5c9ac6c1c1..c862106c2b 100755 --- a/platform/mellanox/docker-syncd-mlnx/Dockerfile.j2 +++ b/platform/mellanox/docker-syncd-mlnx/Dockerfile.j2 @@ -11,7 +11,13 @@ ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update && \ apt-get install -y \ - libxml2 + libxml2 \ + python-pip \ + python-dev \ + python-setuptools + +RUN pip2 install --upgrade pip +RUN apt-get purge -y python-pip {% if docker_syncd_mlnx_debs.strip() -%} # Copy locally-built Debian package dependencies