Skip to content

Commit 978454f

Browse files
authored
[CodeStyle] Clean trailing whitespace in dockerfiles and some shell scripts (part3) (#64855)
1 parent 271a645 commit 978454f

File tree

17 files changed

+85
-85
lines changed

17 files changed

+85
-85
lines changed

paddle/fluid/inference/api/demo_ci/clean.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
2-
#
2+
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
55
# You may obtain a copy of the License at
6-
#
6+
#
77
# http://www.apache.org/licenses/LICENSE-2.0
8-
#
8+
#
99
# Unless required by applicable law or agreed to in writing, software
1010
# distributed under the License is distributed on an "AS IS" BASIS,
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

paddle/fluid/inference/api/demo_ci/run.sh

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#!/bin/bash
22

33
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
4-
#
4+
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.
77
# You may obtain a copy of the License at
8-
#
8+
#
99
# http://www.apache.org/licenses/LICENSE-2.0
10-
#
10+
#
1111
# Unless required by applicable law or agreed to in writing, software
1212
# distributed under the License is distributed on an "AS IS" BASIS,
1313
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -184,7 +184,7 @@ for WITH_STATIC_LIB in ON OFF; do
184184
fi
185185
done
186186
done
187-
187+
188188
# --------tensorrt mobilenet on windows------
189189
if [ $USE_TENSORRT == ON -a $TEST_GPU_CPU == ON ]; then
190190
rm -rf *
@@ -203,7 +203,7 @@ for WITH_STATIC_LIB in ON OFF; do
203203
./trt_mobilenet_demo.exe \
204204
--modeldir=$DATA_DIR/mobilenet/model \
205205
--data=$DATA_DIR/mobilenet/data.txt \
206-
--refer=$DATA_DIR/mobilenet/result.txt
206+
--refer=$DATA_DIR/mobilenet/result.txt
207207
if [ $? -ne 0 ]; then
208208
echo "trt_mobilenet_demo runs failed." >> ${current_dir}/test_summary.txt
209209
EXIT_CODE=1
@@ -268,7 +268,7 @@ for WITH_STATIC_LIB in ON OFF; do
268268
./trt_mobilenet_demo \
269269
--modeldir=$DATA_DIR/mobilenet/model \
270270
--data=$DATA_DIR/mobilenet/data.txt \
271-
--refer=$DATA_DIR/mobilenet/result.txt
271+
--refer=$DATA_DIR/mobilenet/result.txt
272272
if [ $? -ne 0 ]; then
273273
echo "trt_mobilenet_demo runs failed " >> ${current_dir}/test_summary.txt
274274
EXIT_CODE=1

paddle/fluid/inference/check_symbol.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#!/bin/sh
22

33
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
4-
#
4+
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.
77
# You may obtain a copy of the License at
8-
#
8+
#
99
# http://www.apache.org/licenses/LICENSE-2.0
10-
#
10+
#
1111
# Unless required by applicable law or agreed to in writing, software
1212
# distributed under the License is distributed on an "AS IS" BASIS,
1313
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

paddle/fluid/inference/experimental/javaapi/test.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#!/bin/bash
22

33
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
4-
#
4+
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.
77
# You may obtain a copy of the License at
8-
#
8+
#
99
# http://www.apache.org/licenses/LICENSE-2.0
10-
#
10+
#
1111
# Unless required by applicable law or agreed to in writing, software
1212
# distributed under the License is distributed on an "AS IS" BASIS,
1313
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

paddle/fluid/inference/goapi/test.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#!/bin/bash
22

33
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
4-
#
4+
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.
77
# You may obtain a copy of the License at
8-
#
8+
#
99
# http://www.apache.org/licenses/LICENSE-2.0
10-
#
10+
#
1111
# Unless required by applicable law or agreed to in writing, software
1212
# distributed under the License is distributed on an "AS IS" BASIS,
1313
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -17,7 +17,7 @@
1717
# 1. download the mobilenetv1 model to test config and predictor
1818
if [ ! -d mobilenetv1 ]; then
1919
wget https://paddle-inference-dist.bj.bcebos.com/Paddle-Inference-Demo/mobilenetv1.tgz
20-
tar xzf mobilenetv1.tgz
20+
tar xzf mobilenetv1.tgz
2121
fi
2222

2323
# 2. set LD_LIBRARY_PATH

paddle/phi/kernels/fusion/cutlass/conv2d/compile.sh

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
2-
#
2+
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
55
# You may obtain a copy of the License at
6-
#
6+
#
77
# http://www.apache.org/licenses/LICENSE-2.0
8-
#
8+
#
99
# Unless required by applicable law or agreed to in writing, software
1010
# distributed under the License is distributed on an "AS IS" BASIS,
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -20,22 +20,22 @@ fi
2020

2121
libname="$build_directory/libCutlassConv2d.so"
2222
if [ -e "$libname" ]; then
23-
exit 0
23+
exit 0
2424
fi
2525

2626
default_python_exe_path="/usr/bin/python"
2727
default_cuda_root_path="/usr/local/cuda"
2828
default_gpu_cc="80"
2929
default_cmake_command="cmake"
30-
31-
python_exe_path="${1:-$default_python_exe_path}"
32-
cuda_root_path="${2:-$default_cuda_root_path}"
30+
31+
python_exe_path="${1:-$default_python_exe_path}"
32+
cuda_root_path="${2:-$default_cuda_root_path}"
3333
gpu_cc="${3:-$default_gpu_cc}"
34-
cmake_command="${4:-$default_cmake_command}"
34+
cmake_command="${4:-$default_cmake_command}"
3535

36-
case "$gpu_cc" in
37-
75|80|86|89) ;;
38-
*) exit 0 ;;
36+
case "$gpu_cc" in
37+
75|80|86|89) ;;
38+
*) exit 0 ;;
3939
esac
4040

4141
cutlass_repo_directory="cutlass"

paddle/phi/kernels/fusion/cutlass/gemm_epilogue/compile.sh

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
2-
#
2+
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
55
# You may obtain a copy of the License at
6-
#
6+
#
77
# http://www.apache.org/licenses/LICENSE-2.0
8-
#
8+
#
99
# Unless required by applicable law or agreed to in writing, software
1010
# distributed under the License is distributed on an "AS IS" BASIS,
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -20,22 +20,22 @@ fi
2020

2121
libname="$build_directory/libCutlassGemmEpilogue.so"
2222
if [ -e "$libname" ]; then
23-
exit 0
23+
exit 0
2424
fi
2525

2626
default_python_exe_path="/usr/bin/python"
2727
default_cuda_root_path="/usr/local/cuda"
2828
default_gpu_cc="80"
2929
default_cmake_command="cmake"
30-
31-
python_exe_path="${1:-$default_python_exe_path}"
32-
cuda_root_path="${2:-$default_cuda_root_path}"
30+
31+
python_exe_path="${1:-$default_python_exe_path}"
32+
cuda_root_path="${2:-$default_cuda_root_path}"
3333
gpu_cc="${3:-$default_gpu_cc}"
34-
cmake_command="${4:-$default_cmake_command}"
34+
cmake_command="${4:-$default_cmake_command}"
3535

36-
case "$gpu_cc" in
37-
80|86|89) ;;
38-
*) exit 0 ;;
36+
case "$gpu_cc" in
37+
80|86|89) ;;
38+
*) exit 0 ;;
3939
esac
4040

4141
cutlass_repo_directory="cutlass"

paddle/phi/kernels/xpu/plugin/build.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#!/bin/bash
22

33
# Copyright (c) 2023 PaddlePaddle Authors. All Rights Reserved.
4-
#
4+
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.
77
# You may obtain a copy of the License at
8-
#
8+
#
99
# http://www.apache.org/licenses/LICENSE-2.0
10-
#
10+
#
1111
# Unless required by applicable law or agreed to in writing, software
1212
# distributed under the License is distributed on an "AS IS" BASIS,
1313
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

paddle/phi/kernels/xpu/plugin/example/build.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#!/bin/bash
22

33
# Copyright (c) 2023 PaddlePaddle Authors. All Rights Reserved.
4-
#
4+
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.
77
# You may obtain a copy of the License at
8-
#
8+
#
99
# http://www.apache.org/licenses/LICENSE-2.0
10-
#
10+
#
1111
# Unless required by applicable law or agreed to in writing, software
1212
# distributed under the License is distributed on an "AS IS" BASIS,
1313
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

paddle/phi/kernels/xpu/plugin/example/run.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#!/bin/bash
22

33
# Copyright (c) 2023 PaddlePaddle Authors. All Rights Reserved.
4-
#
4+
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.
77
# You may obtain a copy of the License at
8-
#
8+
#
99
# http://www.apache.org/licenses/LICENSE-2.0
10-
#
10+
#
1111
# Unless required by applicable law or agreed to in writing, software
1212
# distributed under the License is distributed on an "AS IS" BASIS,
1313
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

paddle/scripts/musl_build/Dockerfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
2-
#
2+
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
55
# You may obtain a copy of the License at
6-
#
6+
#
77
# http://www.apache.org/licenses/LICENSE-2.0
8-
#
8+
#
99
# Unless required by applicable law or agreed to in writing, software
1010
# distributed under the License is distributed on an "AS IS" BASIS,
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

r/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ RUN echo "channels:" >> ~/.condarc && \
3030
echo " simpleitk: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud" >> ~/.condarc && \
3131
echo "show_channel_urls: true" >> ~/.condarc && \
3232
echo "channel_priority: strict" >> ~/.condarc
33-
33+
3434
# Install R
3535
RUN conda install -y r -c conda-forge
3636

@@ -44,4 +44,4 @@ RUN Rscript -e 'install.packages("reticulate", repos="https://cran.rstudio.com")
4444
COPY example example
4545
RUN cd example && \
4646
curl -O https://paddle-inference-dist.cdn.bcebos.com/mobilenet-test-model-data.tar.gz && \
47-
tar -zxvf mobilenet-test-model-data.tar.gz && rm mobilenet-test-model-data.tar.gz
47+
tar -zxvf mobilenet-test-model-data.tar.gz && rm mobilenet-test-model-data.tar.gz

tools/cinn/docker/Dockerfile

+6-6
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ ENV HOME /root
1616
RUN apt-get update && \
1717
apt-get install -y software-properties-common && add-apt-repository ppa:deadsnakes/ppa && \
1818
apt-get update && \
19-
apt-get install -y curl wget vim git unzip unrar tar xz-utils bzip2 gzip \
19+
apt-get install -y curl wget vim git unzip unrar tar xz-utils bzip2 gzip \
2020
coreutils ntp language-pack-zh-hans python-qt4 libsm6 libxext6 libxrender-dev
2121

2222

2323
# Downgrade gcc&&g++
24-
WORKDIR /usr/bin
24+
WORKDIR /usr/bin
2525
RUN apt-get update --fix-missing
2626
COPY script_build /script_build
2727
RUN bash /script_build/install_gcc.sh gcc82 && rm -rf /script_build && \
@@ -30,7 +30,7 @@ RUN bash /script_build/install_gcc.sh gcc82 && rm -rf /script_build && \
3030
ln -s /usr/local/gcc-8.2/bin/g++ /usr/local/bin/g++ && \
3131
ln -s /usr/local/gcc-8.2/bin/gcc /usr/bin/gcc && \
3232
ln -s /usr/local/gcc-8.2/bin/g++ /usr/bin/g++
33-
ENV PATH=/usr/local/gcc-8.2/bin:$PATH
33+
ENV PATH=/usr/local/gcc-8.2/bin:$PATH
3434

3535
RUN apt-get update && \
3636
apt-get install -y python3.6 python3.6-dev python3.6-venv && \
@@ -43,8 +43,8 @@ RUN wget -q https://cmake.org/files/v3.20/cmake-3.20.0-linux-x86_64.tar.gz && ta
4343
ENV PATH=/home/cmake-3.20.0-linux-x86_64/bin:$PATH
4444

4545
# remove them when apt-get support 2.27 and higher version
46-
RUN wget -q https://ftp.gnu.org/gnu/binutils/binutils-2.33.1.tar.gz && \
47-
tar -xzf binutils-2.33.1.tar.gz && \
46+
RUN wget -q https://ftp.gnu.org/gnu/binutils/binutils-2.33.1.tar.gz && \
47+
tar -xzf binutils-2.33.1.tar.gz && \
4848
cd binutils-2.33.1 && \
4949
./configure && make -j && make install && cd .. && rm -rf binutils-2.33.1 binutils-2.33.1.tar.gz
5050

@@ -99,7 +99,7 @@ RUN wget https://paddle-ci.gz.bcebos.com/ccache-3.7.9.tar.gz && \
9999
make -j8 && make install && \
100100
ln -s /usr/local/ccache-3.7.9/bin/ccache /usr/local/bin/ccache
101101

102-
# For CINN environment
102+
# For CINN environment
103103
RUN apt update --fix-missing && \
104104
apt install autoconf autogen libtool zlib1g-dev sudo libginac-dev clang cmake -y && \
105105
apt remove python3-six python-six -y && \

tools/cinn/docker/Dockerfile.ci

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Use SHA to specify the docker image to prevent the use of old cache images
2-
FROM registry.baidubce.com/paddlepaddle/paddle:latest-dev-cuda11.8-cudnn8.6-trt8.5-gcc82
2+
FROM registry.baidubce.com/paddlepaddle/paddle:latest-dev-cuda11.8-cudnn8.6-trt8.5-gcc82
33

44
# NVIDIA update GPG key on 04/29/2022. Fetch the public key for CI machine
55
# Reference: https://developer.nvidia.com/blog/updating-the-cuda-linux-gpg-repository-key/

tools/dockerfile/Dockerfile.centos

+4-4
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ ENV PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
1616
RUN yum install -y bzip2 gettext-devel sqlite-devel zlib-devel openssl-devel pcre-devel vim tk-devel tkinter libtool xz graphviz wget curl-devel patch
1717
COPY build_scripts /build_scripts
1818
RUN bash build_scripts/build.sh
19-
#RUN bash build_scripts/install_nccl2.sh
20-
RUN bash build_scripts/install_trt.sh
19+
#RUN bash build_scripts/install_nccl2.sh
20+
RUN bash build_scripts/install_trt.sh
2121
RUN rm -rf build_scripts
2222
RUN ln -s /usr/local/ssl/include/openssl /usr/include
2323

@@ -26,7 +26,7 @@ RUN wget -q https://paddle-ci.gz.bcebos.com/git-2.17.1.tar.gz && \
2626
tar -xvf git-2.17.1.tar.gz && \
2727
cd git-2.17.1 && \
2828
./configure --with-openssl --prefix=/usr/local && \
29-
make -j8 && make install
29+
make -j8 && make install
3030

3131
ENV SSL_CERT_FILE=/opt/_internal/certs.pem
3232
ENV GOROOT=/usr/local/go GOPATH=/root/gopath
@@ -43,7 +43,7 @@ RUN wget --no-check-certificate -qO- https://paddle-ci.gz.bcebos.com/go1.15.12.l
4343

4444

4545
# protobuf 3.6.1
46-
RUN cd /opt && wget -q --no-check-certificate https://paddle-ci.cdn.bcebos.com/protobuf-cpp-3.6.1.tar.gz && \
46+
RUN cd /opt && wget -q --no-check-certificate https://paddle-ci.cdn.bcebos.com/protobuf-cpp-3.6.1.tar.gz && \
4747
tar xzf protobuf-cpp-3.6.1.tar.gz && \
4848
cd protobuf-3.6.1 && ./configure && make -j4 && make install && cd .. && rm -f protobuf-cpp-3.6.1.tar.gz
4949

tools/dockerfile/Dockerfile.ipu

+8-8
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ RUN apt-get update && apt-get install -y rdma-core librdmacm1
2727

2828
# Downgrade gcc&&g++
2929
WORKDIR /usr/bin
30-
COPY tools/dockerfile/build_scripts /build_scripts
31-
RUN bash /build_scripts/install_gcc.sh gcc82 && rm -rf /build_scripts
32-
RUN cp gcc gcc.bak && cp g++ g++.bak && rm gcc && rm g++
33-
RUN ln -s /usr/local/gcc-8.2/bin/gcc /usr/local/bin/gcc
34-
RUN ln -s /usr/local/gcc-8.2/bin/g++ /usr/local/bin/g++
35-
RUN ln -s /usr/local/gcc-8.2/bin/gcc /usr/bin/gcc
36-
RUN ln -s /usr/local/gcc-8.2/bin/g++ /usr/bin/g++
37-
ENV PATH=/usr/local/gcc-8.2/bin:$PATH
30+
COPY tools/dockerfile/build_scripts /build_scripts
31+
RUN bash /build_scripts/install_gcc.sh gcc82 && rm -rf /build_scripts
32+
RUN cp gcc gcc.bak && cp g++ g++.bak && rm gcc && rm g++
33+
RUN ln -s /usr/local/gcc-8.2/bin/gcc /usr/local/bin/gcc
34+
RUN ln -s /usr/local/gcc-8.2/bin/g++ /usr/local/bin/g++
35+
RUN ln -s /usr/local/gcc-8.2/bin/gcc /usr/bin/gcc
36+
RUN ln -s /usr/local/gcc-8.2/bin/g++ /usr/bin/g++
37+
ENV PATH=/usr/local/gcc-8.2/bin:$PATH
3838

3939
# install cmake
4040
WORKDIR /home

0 commit comments

Comments
 (0)