revert the modified shell script (#28453)

TCChenlong-patch-1
iducn 4 years ago committed by GitHub
parent bd8dfe38ca
commit ba0fe0a812
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -13,6 +13,6 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
DIRNAME="$(dirname "$0")" DIRNAME=`dirname $0`
sh "$DIRNAME"/.common_test_util.sh source $DIRNAME/.common_test_util.sh
set_port "$@" set_port $@

@ -24,14 +24,12 @@
PYPATH="" PYPATH=""
set -x set -x
while getopts "d:" opt; do while getopts "d:" opt; do
case "$opt" in case $opt in
d) d)
PYPATH=$OPTARG PYPATH=$OPTARG
;; ;;
*)
;;
esac esac
done done
shift $(("$OPTIND" - 1)) shift $(($OPTIND - 1))
export PYTHONPATH=$PYPATH:$PYTHONPATH export PYTHONPATH=$PYPATH:$PYTHONPATH
"$@" $@

@ -1,5 +1,4 @@
#!/bin/bash
set -x set -x
cd "$(dirname "$0")" || exit cd `dirname $0`
rm -rf build/ data/ rm -rf build/ data/
set +x set +x

File diff suppressed because it is too large Load Diff

@ -1,12 +1,12 @@
#!/bin/sh #!/bin/sh
lib="$1" lib=$1
if [ "$#" -ne 1 ]; then echo "No input library"; exit 1 ; fi if [ $# -ne 1 ]; then echo "No input library"; exit -1 ; fi
num_paddle_syms=$(nm -D "${lib}" | grep -c paddle ) num_paddle_syms=$(nm -D ${lib} | grep paddle | wc -l)
num_google_syms=$(nm -D "${lib}" | grep google | grep -v paddle | grep -c "T " ) num_google_syms=$(nm -D ${lib} | grep google | grep -v paddle | grep "T " | wc -l)
if [ "$num_paddle_syms" -le 0 ]; then echo "Have no paddle symbols"; exit 1 ; fi if [ $num_paddle_syms -le 0 ]; then echo "Have no paddle symbols"; exit -1 ; fi
if [ "$num_google_syms" -ge 1 ]; then echo "Have some google symbols"; exit 1 ; fi if [ $num_google_syms -ge 1 ]; then echo "Have some google symbols"; exit -1 ; fi
exit 0 exit 0

@ -15,6 +15,6 @@
# limitations under the License. # limitations under the License.
set -x set -x
cd "$(dirname "$0")" || exit cd "$(dirname "$0")"
rm -rf build/ rm -rf build/
set +x set +x

@ -14,14 +14,14 @@ function download() {
download download
# build demo trainer # build demo trainer
paddle_install_dir="${PADDLE_ROOT}"/build/paddle_install_dir paddle_install_dir=${PADDLE_ROOT}/build/paddle_install_dir
mkdir -p build mkdir -p build
cd build || exit cd build
rm -rf ./* rm -rf *
cmake .. -DPADDLE_LIB="$paddle_install_dir" \ cmake .. -DPADDLE_LIB=$paddle_install_dir \
-DWITH_MKLDNN="$TURN_ON_MKL" \ -DWITH_MKLDNN=$TURN_ON_MKL \
-DWITH_MKL="$TURN_ON_MKL" -DWITH_MKL=$TURN_ON_MKL
make make
cd .. cd ..

@ -1,3 +1,3 @@
#!/bin/bash
set -exu set -exu
build/demo_trainer --flagfile="train.cfg" build/demo_trainer --flagfile="train.cfg"

@ -15,14 +15,14 @@
# limitations under the License. # limitations under the License.
function start_build_docker() { function start_build_docker() {
docker pull "$IMG" docker pull $IMG
apt_mirror='s#http://archive.ubuntu.com/ubuntu#mirror://mirrors.ubuntu.com/mirrors.txt#g' apt_mirror='s#http://archive.ubuntu.com/ubuntu#mirror://mirrors.ubuntu.com/mirrors.txt#g'
DOCKER_ENV=$(cat <<EOL DOCKER_ENV=$(cat <<EOL
-e FLAGS_fraction_of_gpu_memory_to_use=0.15 \ -e FLAGS_fraction_of_gpu_memory_to_use=0.15 \
-e CTEST_OUTPUT_ON_FAILURE=1 \ -e CTEST_OUTPUT_ON_FAILURE=1 \
-e CTEST_PARALLEL_LEVEL=1 \ -e CTEST_PARALLEL_LEVEL=1 \
-e APT_MIRROR="${apt_mirror}" \ -e APT_MIRROR=${apt_mirror} \
-e WITH_GPU=ON \ -e WITH_GPU=ON \
-e CUDA_ARCH_NAME=Auto \ -e CUDA_ARCH_NAME=Auto \
-e WITH_AVX=ON \ -e WITH_AVX=ON \
@ -39,24 +39,24 @@ EOL
) )
DOCKER_CMD="nvidia-docker" DOCKER_CMD="nvidia-docker"
if ! [ -x "$(command -v "${DOCKER_CMD}")" ]; then if ! [ -x "$(command -v ${DOCKER_CMD})" ]; then
DOCKER_CMD="docker" DOCKER_CMD="docker"
fi fi
if [ ! -d "${HOME}/.ccache" ]; then if [ ! -d "${HOME}/.ccache" ]; then
mkdir "${HOME}"/.ccache mkdir ${HOME}/.ccache
fi fi
set -ex set -ex
"${DOCKER_CMD}" run -it \ ${DOCKER_CMD} run -it \
"${DOCKER_ENV}" \ ${DOCKER_ENV} \
-e SCRIPT_NAME="$0" \ -e SCRIPT_NAME=$0 \
-e CONTENT_DEC_PASSWD="$CONTENT_DEC_PASSWD" \ -e CONTENT_DEC_PASSWD=$CONTENT_DEC_PASSWD \
-e TRAVIS_BRANCH="$TRAVIS_BRANCH" \ -e TRAVIS_BRANCH=$TRAVIS_BRANCH \
-e TRAVIS_PULL_REQUEST="$TRAVIS_PULL_REQUEST" \ -e TRAVIS_PULL_REQUEST=$TRAVIS_PULL_REQUEST \
-v "$PADDLE_ROOT":/paddle \ -v $PADDLE_ROOT:/paddle \
-v "${HOME}"/.ccache:/root/.ccache \ -v ${HOME}/.ccache:/root/.ccache \
-w /paddle \ -w /paddle \
"$IMG" \ $IMG \
paddle/scripts/paddle_build.sh "$@" paddle/scripts/paddle_build.sh $@
set +x set +x
} }
@ -65,7 +65,7 @@ function main() {
VERSION="latest-dev" VERSION="latest-dev"
PADDLE_ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}")/../../" && pwd )" PADDLE_ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}")/../../" && pwd )"
IMG=${DOCKER_REPO}:${VERSION} IMG=${DOCKER_REPO}:${VERSION}
start_build_docker "$@" start_build_docker $@
} }
main "$@" main $@

@ -1,6 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -ex set -ex
SYSTEM="$(uname -s)" SYSTEM=`uname -s`
rm -f protoc-3.11.3-linux-x86_64.* rm -f protoc-3.11.3-linux-x86_64.*
if [ "$SYSTEM" == "Linux" ]; then if [ "$SYSTEM" == "Linux" ]; then
wget --no-check-certificate https://github.com/protocolbuffers/protobuf/releases/download/v3.11.3/protoc-3.11.3-linux-x86_64.zip wget --no-check-certificate https://github.com/protocolbuffers/protobuf/releases/download/v3.11.3/protoc-3.11.3-linux-x86_64.zip
@ -28,5 +28,5 @@ if [ "$1" != "" ]; then
fi fi
fi fi
python spider.py --version=$version --url="$url" python spider.py --version=$version --url=$url
tar czf cudaErrorMessage.tar.gz cudaErrorMessage.pb tar czf cudaErrorMessage.tar.gz cudaErrorMessage.pb

@ -24,8 +24,8 @@ wget -q -O $DIR/$DEB $URL
cd $DIR && ar x $DEB && tar xf data.tar.xz cd $DIR && ar x $DEB && tar xf data.tar.xz
DEBS=$(find ./var/ -name "*.deb") DEBS=$(find ./var/ -name "*.deb")
for sub_deb in $DEBS; do for sub_deb in $DEBS; do
echo "$sub_deb" echo $sub_deb
ar x "$sub_deb" && tar xf data.tar.xz ar x $sub_deb && tar xf data.tar.xz
done done
mv -f usr/include/nccl.h /usr/local/include/ mv -f usr/include/nccl.h /usr/local/include/
mv -f usr/lib/x86_64-linux-gnu/libnccl* /usr/local/lib/ mv -f usr/lib/x86_64-linux-gnu/libnccl* /usr/local/lib/

@ -31,9 +31,9 @@
# <real API implement>\t<API recommend>,<API other alias name1>,<API other alias name2>,... # <real API implement>\t<API recommend>,<API other alias name1>,<API other alias name2>,...
PADDLE_ROOT="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")/.." PADDLE_ROOT="$(dirname $(readlink -f ${BASH_SOURCE[0]}))/.."
find "${PADDLE_ROOT}"/python/ -name '*.py' \ find ${PADDLE_ROOT}/python/ -name '*.py' \
| xargs grep -v '^#' \ | xargs grep -v '^#' \
| grep 'DEFINE_ALIAS' \ | grep 'DEFINE_ALIAS' \
| perl -ne ' | perl -ne '

@ -1,19 +1,4 @@
#!/bin/bash #!/bin/bash
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
VERSION=$(nvcc --version | grep release | grep -oEi "release ([0-9]+)\.([0-9])"| sed "s/release //") VERSION=$(nvcc --version | grep release | grep -oEi "release ([0-9]+)\.([0-9])"| sed "s/release //")
if [ "$VERSION" == "10.0" ]; then if [ "$VERSION" == "10.0" ]; then
DEB="nccl-repo-ubuntu1604-2.4.7-ga-cuda10.0_1-1_amd64.deb" DEB="nccl-repo-ubuntu1604-2.4.7-ga-cuda10.0_1-1_amd64.deb"
@ -39,10 +24,10 @@ wget -q -O $DIR/$DEB $URL
cd $DIR && ar x $DEB && tar xf data.tar.xz cd $DIR && ar x $DEB && tar xf data.tar.xz
DEBS=$(find ./var/ -name "*.deb") DEBS=$(find ./var/ -name "*.deb")
for sub_deb in $DEBS; do for sub_deb in $DEBS; do
echo "$sub_deb" echo $sub_deb
ar x "$sub_deb" && tar xf data.tar.xz ar x $sub_deb && tar xf data.tar.xz
done done
mv -f usr/include/nccl.h /usr/local/include/ mv -f usr/include/nccl.h /usr/local/include/
mv -f usr/lib/x86_64-linux-gnu/libnccl* /usr/local/lib/ mv -f usr/lib/x86_64-linux-gnu/libnccl* /usr/local/lib/
rm /usr/include/nccl.h rm /usr/include/nccl.h
rm -rf "$DIR" rm -rf $DIR

Loading…
Cancel
Save