diff --git a/.teamcity/Dockerfile b/.teamcity/Dockerfile index da98d19c4d4754529c98e86d10bafaec822babb5..35306268a22f91c80a1432b2b4fdfdd9c5ad97f1 100644 --- a/.teamcity/Dockerfile +++ b/.teamcity/Dockerfile @@ -15,12 +15,6 @@ # A dev image based on paddle production image -FROM parl/parl-test:1.1-cuda9.0-cudnn7-docs +FROM parl/parl-test:cuda9.0-cudnn7-v1 COPY ./requirements.txt /root/ - -# Requirements for python2 -RUN pip install -i https://pypi.tuna.tsinghua.edu.cn/simple -r /root/requirements.txt - -# Requirements for python3 -RUN pip3.6 install -i https://pypi.tuna.tsinghua.edu.cn/simple -r /root/requirements.txt diff --git a/.teamcity/build.sh b/.teamcity/build.sh index 726777619c94699555294c813c183822f06b84f7..1382e68fc08a4e29c1df5f1f3d549190ee6f8d53 100755 --- a/.teamcity/build.sh +++ b/.teamcity/build.sh @@ -21,6 +21,8 @@ function init() { NONE='\033[0m' REPO_ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}")/../" && pwd )" + source ~/.bashrc + export PATH="/root/miniconda3/bin:$PATH" } function print_usage() { @@ -56,7 +58,8 @@ function check_style() { } function run_test_with_gpu() { - export FLAGS_fraction_of_gpu_memory_to_use=0.5 + unset CUDA_VISIBLE_DEVICES + export FLAGS_fraction_of_gpu_memory_to_use=0.05 mkdir -p ${REPO_ROOT}/build cd ${REPO_ROOT}/build @@ -66,7 +69,8 @@ function run_test_with_gpu() { Running unit tests with GPU... ======================================== EOF - ctest --output-on-failure + ctest --output-on-failure -j10 + cd ${REPO_ROOT} rm -rf ${REPO_ROOT}/build } @@ -75,13 +79,22 @@ function run_test_with_cpu() { mkdir -p ${REPO_ROOT}/build cd ${REPO_ROOT}/build - cmake .. + if [ $# -eq 1 ];then + cmake .. + else + cmake .. -DIS_TESTING_SERIALLY=ON + fi cat <