提交 1a00d6c7 编写于 作者: B bjjwwang

modify some sh

上级 08b5ffbf
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
set -ex set -ex
if [ -f "/etc/redhat-release" ];then if [ -f "/etc/redhat-release" ];then
lib_so_3=/usr/lib64/libgfortran.so.3
lib_so_5=/usr/lib64/libgfortran.so.5 lib_so_5=/usr/lib64/libgfortran.so.5
lib_so_6=/usr/lib64/libstdc++.so.6 lib_so_6=/usr/lib64/libstdc++.so.6
lib_path=/usr/lib64 lib_path=/usr/lib64
...@@ -44,4 +45,20 @@ if [ "$1" == "gcc82" ]; then ...@@ -44,4 +45,20 @@ if [ "$1" == "gcc82" ]; then
ln -s /usr/local/gcc-8.2/lib64/libgfortran.so.5 ${lib_so_5} && \ ln -s /usr/local/gcc-8.2/lib64/libgfortran.so.5 ${lib_so_5} && \
ln -s /usr/local/gcc-8.2/lib64/libstdc++.so.6 ${lib_so_6} && \ ln -s /usr/local/gcc-8.2/lib64/libstdc++.so.6 ${lib_so_6} && \
cp /usr/local/gcc-8.2/lib64/libstdc++.so.6.0.25 ${lib_path} cp /usr/local/gcc-8.2/lib64/libstdc++.so.6.0.25 ${lib_path}
elif [ "$1" == "gcc54" ]; then
wget -q https://paddle-ci.gz.bcebos.com/gcc-5.4.0.tar.gz
tar -xvf gcc-5.4.0.tar.gz
cd gcc-5.4.0 && \
unset LIBRARY_PATH CPATH C_INCLUDE_PATH PKG_CONFIG_PATH CPLUS_INCLUDE_PATH INCLUDE && \
./contrib/download_prerequisites && \
cd .. && mkdir temp_gcc54 && cd temp_gcc54 && \
../gcc-5.4.0/configure --prefix=/usr/local/gcc-5.4 --enable-threads=posix --disable-checking --disable-multilib && \
make -j8 && make install
cd .. && rm -rf temp_gcc54
rm -rf gcc-5.4.0 gcc-5.4.0.tar.gz
cp ${lib_so_6} ${lib_so_6}.bak && rm -f ${lib_so_6} &&
ln -s /usr/local/gcc-5.4/lib64/libgfortran.so.3 ${lib_so_3} && \
ln -s /usr/local/gcc-5.4/lib64/libstdc++.so.6 ${lib_so_6} && \
cp /usr/local/gcc-5.4/lib64/libstdc++.so.6.0.21 ${lib_path}
fi fi
...@@ -37,4 +37,13 @@ elif [[ "$VERSION" == "3.7" ]];then ...@@ -37,4 +37,13 @@ elif [[ "$VERSION" == "3.7" ]];then
make -j8 > /dev/null && make altinstall > /dev/null && ldconfig make -j8 > /dev/null && make altinstall > /dev/null && ldconfig
cd .. && rm -rf Python-3.7.0* cd .. && rm -rf Python-3.7.0*
python3.7 -m pip install -U pip python3.7 -m pip install -U pip
elif [[ "$VERSION" == "3.8" ]];then
wget -q https://www.python.org/ftp/python/3.8.0/Python-3.8.0.tgz && \
tar -xzf Python-3.8.0.tgz && cd Python-3.8.0 && \
CFLAGS="-Wformat" ./configure --prefix=/usr/local/ --enable-shared > /dev/null && \
make -j8 > /dev/null && make altinstall > /dev/null && ldconfig
cd .. && rm -rf Python-3.8.0*
python3.8 -m pip install -U pip
fi fi
...@@ -18,17 +18,55 @@ SERVING_VERSION=$1 ...@@ -18,17 +18,55 @@ SERVING_VERSION=$1
PADDLE_VERSION=$2 PADDLE_VERSION=$2
RUN_ENV=$3 # cpu/10.1 10.2 RUN_ENV=$3 # cpu/10.1 10.2
PYTHON_VERSION=$4 PYTHON_VERSION=$4
serving_release=
client_release="paddle-serving-client==$SERVING_VERSION" client_release="paddle-serving-client==$SERVING_VERSION"
app_release="paddle-serving-app==0.3.1" app_release="paddle-serving-app==0.3.1"
if [[ $PYTHON_VERSION == "3.6" ]];then
CPYTHON="36"
elif [[ $PYTHON_VERSION == "3.7" ]];then
CPYTHON="37"
elif [[ $PYTHON_VERSION == "3.8" ]];then
CPYTHON="38"
fi
if [[ $SERVING_VERSION == "0.5.0" ]]; then
if [[ "$RUN_ENV" == "cpu" ]];then
server_release="paddle-serving-server==$SERVING_VERSION"
serving_bin="https://paddle-serving.bj.bcebos.com/bin/serving-cpu-noavx-openblas-${SERVING_VERSION}.tar.gz"
elif [[ "$RUN_ENV" == "cuda10.1" ]];then
server_release="paddle-serving-server-gpu==$SERVING_VERSION.post101"
serving_bin="https://paddle-serving.bj.bcebos.com/bin/serving-gpu-101-${SERVING_VERSION}.tar.gz"
elif [[ "$RUN_ENV" == "cuda10.2" ]];then
server_release="paddle-serving-server-gpu==$SERVING_VERSION.post102"
serving_bin="https://paddle-serving.bj.bcebos.com/bin/serving-gpu-102-${SERVING_VERSION}.tar.gz"
fi
client_release="paddle-serving-client==$SERVING_VERSION"
app_release="paddle-serving-app==0.3.1"
elif [[ $SERVING_VERSION == "0.6.0" ]]; then
if [[ "$RUN_ENV" == "cpu" ]];then
server_release="https://paddle-serving.bj.bcebos.com/test-dev/whl/paddle_serving_server-$SERVING_VERSION-py3-none-any.whl"
serving_bin="https://paddle-serving.bj.bcebos.com/test-dev/bin/serving-cpu-avx-openblas-$SERVING_VERSION.tar.gz"
elif [[ "$RUN_ENV" == "cuda10.1" ]];then
server_release="https://paddle-serving.bj.bcebos.com/test-dev/whl/paddle_serving_server_gpu-$SERVING_VERSION.post101-py3-none-any.whl"
serving_bin="https://paddle-serving.bj.bcebos.com/test-dev/bin/serving-gpu-101-$SERVING_VERSION.tar.gz"
elif [[ "$RUN_ENV" == "cuda10.2" ]];then
server_release="https://paddle-serving.bj.bcebos.com/test-dev/whl/paddle_serving_server_gpu-$SERVING_VERSION.post102-py3-none-any.whl"
serving_bin="https://paddle-serving.bj.bcebos.com/test-dev/bin/serving-gpu-102-$SERVING_VERSION.tar.gz"
fi
client_release="https://paddle-serving.bj.bcebos.com/test-dev/whl/paddle_serving_client-$SERVING_VERSION-cp$CPYTHON-none-any.whl"
app_release="https://paddle-serving.bj.bcebos.com/test-dev/whl/paddle_serving_app-$SERVING_VERSION-py3-none-any.whl"
fi
if [[ "$RUN_ENV" == "cpu" ]];then if [[ "$RUN_ENV" == "cpu" ]];then
server_release="paddle-serving-server==$SERVING_VERSION" server_release="paddle-serving-server==$SERVING_VERSION"
python$PYTHON_VERSION -m pip install $client_release $app_release $server_release python$PYTHON_VERSION -m pip install $client_release $app_release $server_release
python$PYTHON_VERSION -m pip install paddlepaddle==${PADDLE_VERSION} python$PYTHON_VERSION -m pip install paddlepaddle==${PADDLE_VERSION}
cd /usr/local/ cd /usr/local/
wget https://paddle-serving.bj.bcebos.com/bin/serving-cpu-noavx-openblas-${SERVING_VERSION}.tar.gz wget $serving_bin
tar xf serving-cpu-noavx-openblas-${SERVING_VERSION}.tar.gz tar xf serving-cpu-noavx-openblas-${SERVING_VERSION}.tar.gz
echo "export SERVING_BIN=$PWD/serving-cpu-noavx-openblas-${SERVING_VERSION}/serving">>/root/.bashrc mv $PWD/serving-cpu-noavx-openblas-${SERVING_VERSION} $PWD/serving_bin
echo "export SERVING_BIN=$PWD/serving_bin/serving">>/root/.bashrc
rm -rf serving-cpu-noavx-openblas-${SERVING_VERSION}.tar.gz rm -rf serving-cpu-noavx-openblas-${SERVING_VERSION}.tar.gz
cd - cd -
elif [[ "$RUN_ENV" == "cuda10.1" ]];then elif [[ "$RUN_ENV" == "cuda10.1" ]];then
...@@ -36,9 +74,10 @@ elif [[ "$RUN_ENV" == "cuda10.1" ]];then ...@@ -36,9 +74,10 @@ elif [[ "$RUN_ENV" == "cuda10.1" ]];then
python$PYTHON_VERSION -m pip install $client_release $app_release $server_release python$PYTHON_VERSION -m pip install $client_release $app_release $server_release
python$PYTHON_VERSION -m pip install paddlepaddle-gpu==${PADDLE_VERSION} python$PYTHON_VERSION -m pip install paddlepaddle-gpu==${PADDLE_VERSION}
cd /usr/local/ cd /usr/local/
wget https://paddle-serving.bj.bcebos.com/bin/serving-gpu-101-${SERVING_VERSION}.tar.gz wget $serving_bin
tar xf serving-gpu-101-${SERVING_VERSION}.tar.gz tar xf serving-gpu-101-${SERVING_VERSION}.tar.gz
echo "export SERVING_BIN=$PWD/serving-gpu-101-${SERVING_VERSION}/serving">>/root/.bashrc mv $PWD/serving-gpu-101-${SERVING_VERSION} $PWD/serving_bin
echo "export SERVING_BIN=$PWD/serving_bin/serving">>/root/.bashrc
rm -rf serving-gpu-101-${SERVING_VERSION}.tar.gz rm -rf serving-gpu-101-${SERVING_VERSION}.tar.gz
cd - cd -
elif [[ "$RUN_ENV" == "cuda10.2" ]];then elif [[ "$RUN_ENV" == "cuda10.2" ]];then
...@@ -46,9 +85,10 @@ elif [[ "$RUN_ENV" == "cuda10.2" ]];then ...@@ -46,9 +85,10 @@ elif [[ "$RUN_ENV" == "cuda10.2" ]];then
python$PYTHON_VERSION -m pip install $client_release $app_release $server_release python$PYTHON_VERSION -m pip install $client_release $app_release $server_release
python$PYTHON_VERSION -m pip install paddlepaddle-gpu==${PADDLE_VERSION} python$PYTHON_VERSION -m pip install paddlepaddle-gpu==${PADDLE_VERSION}
cd /usr/local/ cd /usr/local/
wget https://paddle-serving.bj.bcebos.com/bin/serving-gpu-102-${SERVING_VERSION}.tar.gz wget $serving_bin
tar xf serving-gpu-102-${SERVING_VERSION}.tar.gz tar xf serving-gpu-102-${SERVING_VERSION}.tar.gz
echo "export SERVING_BIN=$PWD/serving-gpu-102-${SERVING_VERSION}/serving">>/root/.bashrc mv $PWD/serving-gpu-102-${SERVING_VERSION} $PWD/serving_bin
echo "export SERVING_BIN=$PWD/serving_bin/serving">>/root/.bashrc
rm -rf serving-gpu-102-${SERVING_VERSION}.tar.gz rm -rf serving-gpu-102-${SERVING_VERSION}.tar.gz
cd - cd -
fi fi
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册