Skip to content

Commit 269e005

Browse files
swgu98maxiaolong001
authored andcommitted
[CI] dockerfile compile_requirement (PaddlePaddle#73423)
1 parent 8be6b81 commit 269e005

File tree

6 files changed

+23
-25
lines changed

6 files changed

+23
-25
lines changed

.github/workflows/_CE-Framework.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ jobs:
176176
pip config set global.cache-dir "$CACHE_DIR/pip"
177177
pip config set global.index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
178178
python -m pip install pip --upgrade
179-
pip install /paddlepaddle_gpu-0.0.0-cp310-cp310-linux_x86_64.whl
179+
pip install /paddlepaddle_gpu-0.0.0-cp310-cp310-linux_x86_64.whl --no-index --no-deps
180180
pip install -r /PaddleTest/inference/python_api_test/requirements.txt
181181
'
182182
@@ -275,7 +275,7 @@ jobs:
275275
pip config set global.cache-dir "${CFS_DIR}/.cache/pip"
276276
pip config set global.index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
277277
pip install sympy
278-
pip install /paddlepaddle_gpu-0.0.0-cp310-cp310-linux_x86_64.whl
278+
pip install /paddlepaddle_gpu-0.0.0-cp310-cp310-linux_x86_64.whl --no-index --no-deps
279279
'
280280
281281
- name: Check

ci/utils.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1219,9 +1219,9 @@ function generate_api_spec() {
12191219
pip install -r $REQUIREMENTS_PATH
12201220

12211221
if [ -d "${PADDLE_ROOT}/build/python/dist/" ]; then
1222-
pip install ${PADDLE_ROOT}/build/python/dist/*whl
1222+
pip install ${PADDLE_ROOT}/build/python/dist/*whl --no-index --no-deps
12231223
elif [ -d "${PADDLE_ROOT}/dist/" ];then
1224-
pip install ${PADDLE_ROOT}/dist/*whl
1224+
pip install ${PADDLE_ROOT}/dist/*whl --no-index --no-deps
12251225
mkdir ${PADDLE_ROOT}/build/python/dist/ && mv ${PADDLE_ROOT}/dist/*whl ${PADDLE_ROOT}/build/python/dist/
12261226
fi
12271227
spec_path=${PADDLE_ROOT}/paddle/fluid/API_${spec_kind}.spec

paddle/scripts/compile_requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ wheel==0.45.1 ; sys_platform == 'win32'
44
pyyaml ; sys_platform == 'win32'
55
wget ; sys_platform == 'win32'
66
jinja2 ; sys_platform == 'linux'
7+
pybind11_stubgen ; sys_platform == 'linux'

paddle/scripts/paddle_build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1219,9 +1219,9 @@ function generate_api_spec() {
12191219
pip install -r $REQUIREMENTS_PATH
12201220

12211221
if [ -d "${PADDLE_ROOT}/build/python/dist/" ]; then
1222-
pip install ${PADDLE_ROOT}/build/python/dist/*whl
1222+
pip install ${PADDLE_ROOT}/build/python/dist/*whl --no-index --no-deps
12231223
elif [ -d "${PADDLE_ROOT}/dist/" ];then
1224-
pip install ${PADDLE_ROOT}/dist/*whl
1224+
pip install ${PADDLE_ROOT}/dist/*whl --no-index --no-deps
12251225
mkdir ${PADDLE_ROOT}/build/python/dist/ && mv ${PADDLE_ROOT}/dist/*whl ${PADDLE_ROOT}/build/python/dist/
12261226
fi
12271227
spec_path=${PADDLE_ROOT}/paddle/fluid/API_${spec_kind}.spec

tools/dockerfile/Dockerfile.ubuntu20

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,7 @@ RUN wget -q https://cmake.org/files/v3.18/cmake-3.18.0-Linux-x86_64.tar.gz && ta
6060
ENV PATH=/home/cmake-3.18.0-Linux-x86_64/bin:$PATH
6161

6262
RUN apt-get update && \
63-
apt-get install -y python3.8 python3.8-dev python3.8-distutils \
64-
python3.9 python3.9-dev python3.9-distutils \
63+
apt-get install -y python3.9 python3.9-dev python3.9-distutils \
6564
python3.10 python3.10-dev python3.10-distutils \
6665
python3.11 python3.11-dev python3.11-distutils \
6766
python3.12 python3.12-dev \
@@ -72,8 +71,7 @@ RUN rm /usr/bin/python && ln -s /usr/bin/python3.9 /usr/bin/python && \
7271

7372
WORKDIR /home
7473
RUN wget -q https://bootstrap.pypa.io/get-pip.py
75-
RUN python3.8 get-pip.py && \
76-
python3.9 get-pip.py && \
74+
RUN python3.9 get-pip.py && \
7775
python3.10 get-pip.py && \
7876
python3.11 get-pip.py && \
7977
python3.12 get-pip.py
@@ -82,8 +80,7 @@ RUN python3.13t get-pip.py && \
8280
mv /usr/local/bin/pip3.13 /usr/local/bin/pip3.13t && \
8381
python3.13 get-pip.py
8482

85-
RUN python3.8 -m pip install setuptools==69.5.1 && \
86-
python3.9 -m pip install setuptools==69.5.1 && \
83+
RUN python3.9 -m pip install setuptools==69.5.1 && \
8784
python3.10 -m pip install setuptools==69.5.1 && \
8885
python3.11 -m pip install setuptools==69.5.1 && \
8986
python3.12 -m pip install --break-system-packages setuptools==69.5.1 && \
@@ -118,9 +115,7 @@ RUN localedef -i en_US -f UTF-8 en_US.UTF-8
118115
RUN rm -f /usr/local/bin/pip && ln -s /usr/local/bin/pip3.9 /usr/local/bin/pip && \
119116
rm -f /usr/local/bin/pip3 && ln -s /usr/local/bin/pip3.9 /usr/local/bin/pip3
120117

121-
RUN pip3.8 --no-cache-dir install ipython==5.3.0 && \
122-
pip3.8 --no-cache-dir install ipykernel==4.6.0 wheel && \
123-
pip3.9 --no-cache-dir install ipython==5.3.0 && \
118+
RUN pip3.9 --no-cache-dir install ipython==5.3.0 && \
124119
pip3.9 --no-cache-dir install ipykernel==4.6.0 wheel && \
125120
pip3.10 --no-cache-dir install ipython==5.3.0 && \
126121
pip3.10 --no-cache-dir install ipykernel==4.6.0 wheel && \
@@ -134,17 +129,14 @@ RUN pip3.8 --no-cache-dir install ipython==5.3.0 && \
134129
python3.13 -m pip --no-cache-dir install ipykernel==4.6.0 wheel
135130

136131
# For PaddleTest CE
137-
RUN pip3.8 --no-cache-dir install pytest && \
138-
pip3.9 --no-cache-dir install pytest && \
132+
RUN pip3.9 --no-cache-dir install pytest && \
139133
pip3.10 --no-cache-dir install pytest && \
140134
pip3.11 --no-cache-dir install pytest && \
141135
pip3.12 --no-cache-dir install pytest && \
142136
python3.13 -m pip --no-cache-dir install pytest && \
143137
python3.13t -m pip --no-cache-dir install pytest
144138

145-
RUN pip3.8 --no-cache-dir install pre-commit==2.17.0 && \
146-
pip3.8 --no-cache-dir install cpplint==1.6.0 clang-format==13.0.0 && \
147-
pip3.9 --no-cache-dir install pre-commit==2.17.0 && \
139+
RUN pip3.9 --no-cache-dir install pre-commit==2.17.0 && \
148140
pip3.9 --no-cache-dir install cpplint==1.6.0 clang-format==13.0.0 && \
149141
pip3.10 --no-cache-dir install pre-commit==2.17.0 && \
150142
pip3.10 --no-cache-dir install cpplint==1.6.0 clang-format==13.0.0 && \
@@ -155,19 +147,25 @@ RUN pip3.8 --no-cache-dir install pre-commit==2.17.0 && \
155147

156148
COPY ./python/requirements.txt /root/
157149
COPY ./python/unittest_py/requirements.txt /home/
150+
COPY ./paddle/scripts/compile_requirements.txt /home/
158151

159-
RUN pip3.8 --no-cache-dir install -r /root/requirements.txt && \
160-
pip3.9 --no-cache-dir install -r /root/requirements.txt && \
152+
RUN pip3.9 --no-cache-dir install -r /root/requirements.txt && \
161153
pip3.9 --no-cache-dir install -r /home/requirements.txt && \
154+
pip3.9 --no-cache-dir install -r /home/compile_requirements.txt && \
162155
pip3.10 --no-cache-dir install -r /root/requirements.txt && \
163156
pip3.10 --no-cache-dir install -r /home/requirements.txt && \
157+
pip3.10 --no-cache-dir install -r /home/compile_requirements.txt && \
164158
pip3.11 --no-cache-dir install -r /root/requirements.txt && \
165159
pip3.11 --no-cache-dir install -r /home/requirements.txt && \
160+
pip3.11 --no-cache-dir install -r /home/compile_requirements.txt && \
166161
pip3.12 --no-cache-dir install -r /root/requirements.txt && \
167162
pip3.12 --no-cache-dir install -r /home/requirements.txt && \
163+
pip3.12 --no-cache-dir install -r /home/compile_requirements.txt && \
168164
python3.13 -m pip --no-cache-dir install -r /root/requirements.txt && \
169165
python3.13 -m pip --no-cache-dir install -r /home/requirements.txt && \
170-
python3.13t -m pip --no-cache-dir install -r /root/requirements.txt
166+
python3.13 -m pip --no-cache-dir install -r /home/compile_requirements.txt && \
167+
python3.13t -m pip --no-cache-dir install -r /root/requirements.txt && \
168+
python3.13t -m pip --no-cache-dir install -r /home/compile_requirements.txt
171169
# python3.13t -m pip --no-cache-dir install -r /home/requirements.txt
172170

173171

tools/dockerfile/ci_dockerfile.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ function make_ubuntu20_cu123_dockerfile(){
111111
cd git-2.17.1 \&\& \
112112
./configure --with-openssl --with-curl --prefix=/usr/local \&\& \
113113
make -j8 \&\& make install " ${dockerfile_name}
114-
sed -i "${dockerfile_line}i RUN pip install wheel \&\& pip3 install PyGithub wheel distro \&\& pip3.8 install distro" ${dockerfile_name}
114+
sed -i "${dockerfile_line}i RUN pip install wheel \&\& pip3 install PyGithub wheel distro" ${dockerfile_name}
115115
sed -i 's# && rm /etc/apt/sources.list.d/nvidia-ml.list##g' ${dockerfile_name}
116116
sed -i 's#RUN bash /build_scripts/install_trt.sh#RUN bash /build_scripts/install_trt.sh trt8616#g' ${dockerfile_name}
117117
sed -i 's#RUN bash /build_scripts/install_cudnn.sh cudnn841#RUN bash /build_scripts/install_cudnn.sh cudnn900 #g' ${dockerfile_name}
@@ -132,7 +132,6 @@ function make_ubuntu20_cu123_dockerfile(){
132132
cd /home \&\& rm -rf PaddleNLP" ${dockerfile_name}
133133
}
134134

135-
136135
function main() {
137136
make_cpu_dockerfile
138137
make_ce_framework_dockerfile

0 commit comments

Comments
 (0)