Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Python3 venv in Python3-only sonic-mgmt-docker #17337

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion dockers/docker-sonic-mgmt/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ 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.
Expand Down Expand Up @@ -341,12 +342,13 @@ RUN python3 -m pip install aiohttp \

# Deactivating a virtualenv
ENV PATH="$BACKUP_OF_PATH"
{% endif %}

USER root
WORKDIR /azp
COPY start.sh \
0001-Fix-getattr-AttributeError-in-multi-thread-scenario.patch \
./
./
RUN chmod +x start.sh \
&& ln -sf /usr/bin/python3 /usr/bin/python \
&& ln -sf `which pip3` /usr/bin/pip \
Expand Down