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
# limitations under the License.
DIRNAME="$(dirname "$0")"
sh "$DIRNAME"/.common_test_util.sh
set_port "$@"
DIRNAME=`dirname $0`
source $DIRNAME/.common_test_util.sh
set_port $@

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

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

File diff suppressed because it is too large Load Diff

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

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

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

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

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

@ -1,6 +1,6 @@
#!/usr/bin/env bash
set -ex
SYSTEM="$(uname -s)"
SYSTEM=`uname -s`
rm -f protoc-3.11.3-linux-x86_64.*
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
@ -28,5 +28,5 @@ if [ "$1" != "" ]; then
fi
fi
python spider.py --version=$version --url="$url"
python spider.py --version=$version --url=$url
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
DEBS=$(find ./var/ -name "*.deb")
for sub_deb in $DEBS; do
echo "$sub_deb"
ar x "$sub_deb" && tar xf data.tar.xz
echo $sub_deb
ar x $sub_deb && tar xf data.tar.xz
done
mv -f usr/include/nccl.h /usr/local/include/
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>,...
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 '^#' \
| grep 'DEFINE_ALIAS' \
| perl -ne '

@ -1,19 +1,4 @@
#!/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 //")
if [ "$VERSION" == "10.0" ]; then
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
DEBS=$(find ./var/ -name "*.deb")
for sub_deb in $DEBS; do
echo "$sub_deb"
ar x "$sub_deb" && tar xf data.tar.xz
echo $sub_deb
ar x $sub_deb && tar xf data.tar.xz
done
mv -f usr/include/nccl.h /usr/local/include/
mv -f usr/lib/x86_64-linux-gnu/libnccl* /usr/local/lib/
rm /usr/include/nccl.h
rm -rf "$DIR"
rm -rf $DIR

Loading…
Cancel
Save