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

[docker-base-buster][docker-config-engine-buster] No longer install Python 2 #6162

Merged
merged 17 commits into from
Dec 26, 2020
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Add quotes around pip version
jleveque committed Dec 24, 2020
commit 2728f3ffb9ceab791aa5313bdf78e49e40b8cf58
2 changes: 1 addition & 1 deletion dockers/docker-base/Dockerfile.j2
Original file line number Diff line number Diff line change
@@ -52,7 +52,7 @@ COPY ["etc/rsyslog.conf", "/etc/rsyslog.conf"]
COPY ["etc/rsyslog.d/*", "/etc/rsyslog.d/"]
COPY ["root/.vimrc", "/root/.vimrc"]

RUN pip install --upgrade pip<21
RUN pip install --upgrade 'pip<21'
RUN apt-get purge -y python-pip
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure why to touch it.

Copy link
Contributor Author

@jleveque jleveque Dec 12, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In January, pip version 21 will be released, which will drop support for Python 2. Therefore, we need to ensure we install a version < 21 for Python 2 purposes.


# Some Python packages require setuptools (or pkg_resources, which is supplied by setuptools)
2 changes: 1 addition & 1 deletion dockers/docker-platform-monitor/Dockerfile.j2
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@ RUN apt-get update && \

# TODO: Remove these lines once we no longer need Python 2
RUN apt-get install -f -y python-dev python-pip
RUN pip2 install --upgrade pip<21
RUN pip2 install --upgrade 'pip<21'
RUN apt-get purge -y python-pip

# On Arista devices, the sonic_platform wheel is not installed in the container.
2 changes: 1 addition & 1 deletion platform/vs/docker-sonic-vs/Dockerfile.j2
Original file line number Diff line number Diff line change
@@ -73,7 +73,7 @@ RUN dpkg -i redis-tools_6.0.6-1~bpo10+1_amd64.deb redis-server_6.0.6-1~bpo10+1_a
RUN rm redis-tools_6.0.6-1~bpo10+1_amd64.deb redis-server_6.0.6-1~bpo10+1_amd64.deb
{% endif %}

RUN pip2 install --upgrade pip<21
RUN pip2 install --upgrade 'pip<21'
RUN apt-get purge -y python-pip
RUN pip2 install setuptools==40.8.0
RUN pip2 install wheel==0.33.6
2 changes: 1 addition & 1 deletion sonic-slave-buster/Dockerfile.j2
Original file line number Diff line number Diff line change
@@ -370,7 +370,7 @@ RUN export VERSION=1.14.2 \
&& rm go$VERSION.linux-*.tar.gz

RUN pip3 install --upgrade pip
RUN pip2 install --upgrade pip<21
RUN pip2 install --upgrade 'pip<21'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure why need this

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In January, pip version 21 will be released, which will drop support for Python 2. Therefore, we need to ensure we install a version < 21 for Python 2 purposes.

RUN apt-get purge -y python-pip python3-pip

# For building Python packages
2 changes: 1 addition & 1 deletion sonic-slave-stretch/Dockerfile.j2
Original file line number Diff line number Diff line change
@@ -339,7 +339,7 @@ RUN export VERSION=1.14.2 \
&& rm go$VERSION.linux-*.tar.gz

RUN pip3 install --upgrade pip
RUN pip2 install --upgrade pip<21
RUN pip2 install --upgrade 'pip<21'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure why need this

Copy link
Contributor Author

@jleveque jleveque Dec 12, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In January, pip version 21 will be released, which will drop support for Python 2. Therefore, we need to ensure we install a version < 21 for Python 2 purposes.

RUN apt-get purge -y python-pip python3-pip

# For p4 build