Skip to content

Commit

Permalink
[setup-container.sh] Fix 'pip install' dependency issue (#6398)
Browse files Browse the repository at this point in the history
Running the `setup-container.sh` script to setup sonic-mgmt container needs
to install some packages on the fly using `pip`. We need to ensure that the
pip package itself is up to date to avoid potential dependency issue while
installing other packages using `pip install`.

This change added extra step to upgrade the pip package firstly before
installing other packages using `pip install`.

Signed-off-by: Xin Wang <[email protected]>
  • Loading branch information
wangxin authored Oct 1, 2022
1 parent 5c3520d commit 6890ed5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions setup-container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ WORKDIR ${HOME}
# Setup python3 virtual env
RUN if [ '{{ USER_NAME }}' != 'AzDevOps' ] && [ -d /var/AzDevOps/env-python3 ]; then \
/bin/bash -c 'python3 -m venv ${HOME}/env-python3'; \
/bin/bash -c '${HOME}/env-python3/bin/pip install pip --upgrade'; \
/bin/bash -c '${HOME}/env-python3/bin/pip install wheel'; \
/bin/bash -c '${HOME}/env-python3/bin/pip install $(/var/AzDevOps/env-python3/bin/pip freeze)'; \
fi
Expand Down

0 comments on commit 6890ed5

Please sign in to comment.