Skip to content

Commit 4988456

Browse files
authored
cherry pick fix py-cpuinfo mac random fail (#18416)
* fix py-cpuinfo mac random fail * differentiate version on windows test=release/1.5
1 parent 5b540a1 commit 4988456

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,17 +92,17 @@ RUN localedef -i en_US -f UTF-8 en_US.UTF-8
9292
# specify sphinx version as 1.5.6 and remove -U option for [pip install -U
9393
# sphinx-rtd-theme] since -U option will cause sphinx being updated to newest
9494
# version(1.7.1 for now), which causes building documentation failed.
95-
RUN pip3 --no-cache-dir install -U wheel py-cpuinfo==5.0.0 && \
95+
RUN pip3 --no-cache-dir install -U wheel py-cpuinfo==4.0.0 && \
9696
pip3 --no-cache-dir install -U docopt PyYAML sphinx==1.5.6 && \
9797
pip3 --no-cache-dir install sphinx-rtd-theme==0.1.9 recommonmark && \
98-
pip3.6 --no-cache-dir install -U wheel py-cpuinfo==5.0.0 && \
98+
pip3.6 --no-cache-dir install -U wheel py-cpuinfo==4.0.0 && \
9999
pip3.6 --no-cache-dir install -U docopt PyYAML sphinx==1.5.6 && \
100100
pip3.6 --no-cache-dir install sphinx-rtd-theme==0.1.9 recommonmark && \
101-
pip3.7 --no-cache-dir install -U wheel py-cpuinfo==5.0.0 && \
101+
pip3.7 --no-cache-dir install -U wheel py-cpuinfo==4.0.0 && \
102102
pip3.7 --no-cache-dir install -U docopt PyYAML sphinx==1.5.6 && \
103103
pip3.7 --no-cache-dir install sphinx-rtd-theme==0.1.9 recommonmark && \
104104
easy_install -U pip && \
105-
pip --no-cache-dir install -U pip setuptools wheel py-cpuinfo==5.0.0 && \
105+
pip --no-cache-dir install -U pip setuptools wheel py-cpuinfo==4.0.0 && \
106106
pip --no-cache-dir install -U docopt PyYAML sphinx==1.5.6 && \
107107
pip --no-cache-dir install sphinx-rtd-theme==0.1.9 recommonmark
108108

paddle/scripts/Dockerfile.tmp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,17 +92,17 @@ RUN localedef -i en_US -f UTF-8 en_US.UTF-8
9292
# specify sphinx version as 1.5.6 and remove -U option for [pip install -U
9393
# sphinx-rtd-theme] since -U option will cause sphinx being updated to newest
9494
# version(1.7.1 for now), which causes building documentation failed.
95-
RUN pip3 --no-cache-dir install -U wheel py-cpuinfo==5.0.0 && \
95+
RUN pip3 --no-cache-dir install -U wheel py-cpuinfo==4.0.0 && \
9696
pip3 --no-cache-dir install -U docopt PyYAML sphinx==1.5.6 && \
9797
pip3 --no-cache-dir install sphinx-rtd-theme==0.1.9 recommonmark && \
98-
pip3.6 --no-cache-dir install -U wheel py-cpuinfo==5.0.0 && \
98+
pip3.6 --no-cache-dir install -U wheel py-cpuinfo==4.0.0 && \
9999
pip3.6 --no-cache-dir install -U docopt PyYAML sphinx==1.5.6 && \
100100
pip3.6 --no-cache-dir install sphinx-rtd-theme==0.1.9 recommonmark && \
101-
pip3.7 --no-cache-dir install -U wheel py-cpuinfo==5.0.0 && \
101+
pip3.7 --no-cache-dir install -U wheel py-cpuinfo==4.0.0 && \
102102
pip3.7 --no-cache-dir install -U docopt PyYAML sphinx==1.5.6 && \
103103
pip3.7 --no-cache-dir install sphinx-rtd-theme==0.1.9 recommonmark && \
104104
easy_install -U pip && \
105-
pip --no-cache-dir install -U pip setuptools wheel py-cpuinfo==5.0.0 && \
105+
pip --no-cache-dir install -U pip setuptools wheel py-cpuinfo==4.0.0 && \
106106
pip --no-cache-dir install -U docopt PyYAML sphinx==1.5.6 && \
107107
pip --no-cache-dir install sphinx-rtd-theme==0.1.9 recommonmark
108108

python/requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,5 @@ funcsigs
1616
pyyaml
1717
decorator
1818
prettytable
19-
py-cpuinfo==5.0.0
19+
py-cpuinfo==5.0.0 ; platform_system=="Windows"
20+
py-cpuinfo==4.0.0 ; platform_system!="Windows"

0 commit comments

Comments
 (0)