From 3c19d80ad6f4bf942a7e6f09e69f5fc7211f23b6 Mon Sep 17 00:00:00 2001 From: risemeup1 <62429225+risemeup1@users.noreply.github.com> Date: Sat, 9 Sep 2023 21:16:01 +0800 Subject: [PATCH] Fix Openssl bug (#56555) * Revert "Revert "Fix openssl1.1.1 problem (#56366)" (#56545)" This reverts commit 7452d53e1595581116c58645bd76ca952c240f8b. * fix openssl bug * Update paddle_coverage.sh --- cmake/external/brpc.cmake | 2 +- tools/coverage/paddle_coverage.sh | 20 ++++++++++---------- tools/dockerfile/ci_dockerfile.sh | 10 +++++++++- 3 files changed, 20 insertions(+), 12 deletions(-) diff --git a/cmake/external/brpc.cmake b/cmake/external/brpc.cmake index 3c9f2b6962048..d647e9116b586 100755 --- a/cmake/external/brpc.cmake +++ b/cmake/external/brpc.cmake @@ -13,7 +13,7 @@ # limitations under the License. include(ExternalProject) - +set(OPENSSL_USE_STATIC_LIBS ON) find_package(OpenSSL REQUIRED) message(STATUS "ssl:" ${OPENSSL_SSL_LIBRARY}) diff --git a/tools/coverage/paddle_coverage.sh b/tools/coverage/paddle_coverage.sh index 7f2b80a9a2427..ee2a38f5da851 100644 --- a/tools/coverage/paddle_coverage.sh +++ b/tools/coverage/paddle_coverage.sh @@ -33,7 +33,7 @@ make install cd /paddle/build -python3.7 ${PADDLE_ROOT}/tools/coverage/gcda_clean.py ${GIT_PR_ID} || exit 101 +python ${PADDLE_ROOT}/tools/coverage/gcda_clean.py ${GIT_PR_ID} || exit 101 lcov --capture -d ./ -o coverage.info --rc lcov_branch_coverage=0 @@ -125,9 +125,9 @@ fi function gen_diff_html_report() { if [ "${GIT_PR_ID}" != "" ]; then - COVERAGE_DIFF_PATTERN="`python3.7 ${PADDLE_ROOT}/tools/coverage/pull_request.py files ${GIT_PR_ID}`" + COVERAGE_DIFF_PATTERN="`python ${PADDLE_ROOT}/tools/coverage/pull_request.py files ${GIT_PR_ID}`" - python3.7 ${PADDLE_ROOT}/tools/coverage/pull_request.py diff ${GIT_PR_ID} > git-diff.out + python ${PADDLE_ROOT}/tools/coverage/pull_request.py diff ${GIT_PR_ID} > git-diff.out fi lcov --extract coverage-full.info \ @@ -135,7 +135,7 @@ function gen_diff_html_report() { -o coverage-diff.info \ --rc lcov_branch_coverage=0 - python3.7 ${PADDLE_ROOT}/tools/coverage/coverage_diff.py coverage-diff.info git-diff.out > coverage-diff.tmp + python ${PADDLE_ROOT}/tools/coverage/coverage_diff.py coverage-diff.info git-diff.out > coverage-diff.tmp mv -f coverage-diff.tmp coverage-diff.info @@ -154,7 +154,7 @@ coverage combine `$(ls python-coverage.data.*)` || NO_PYTHON_COVERAGE_DATA=1 sed -i 's/mnt\/paddle/paddle/g' python-coverage.xml -`$(python3.7 ${PADDLE_ROOT}/tools/coverage/python_coverage.py > python-coverage.info)` || [[ "${NO_PYTHON_COVERAGE_DATA}" == "1" ]] +`$(python ${PADDLE_ROOT}/tools/coverage/python_coverage.py > python-coverage.info)` || [[ "${NO_PYTHON_COVERAGE_DATA}" == "1" ]] # python full html report # @@ -180,9 +180,9 @@ gen_python_full_html_report || true function gen_python_diff_html_report() { if [ "${GIT_PR_ID}" != "" ]; then - COVERAGE_DIFF_PATTERN="`python3.7 ${PADDLE_ROOT}/tools/coverage/pull_request.py files ${GIT_PR_ID}`" + COVERAGE_DIFF_PATTERN="`python ${PADDLE_ROOT}/tools/coverage/pull_request.py files ${GIT_PR_ID}`" - python3.7 ${PADDLE_ROOT}/tools/coverage/pull_request.py diff ${GIT_PR_ID} > python-git-diff.out + python ${PADDLE_ROOT}/tools/coverage/pull_request.py diff ${GIT_PR_ID} > python-git-diff.out fi lcov --extract python-coverage-full.info \ @@ -190,7 +190,7 @@ function gen_python_diff_html_report() { -o python-coverage-diff.info \ --rc lcov_branch_coverage=0 - python3.7 ${PADDLE_ROOT}/tools/coverage/coverage_diff.py python-coverage-diff.info python-git-diff.out > python-coverage-diff.tmp + python ${PADDLE_ROOT}/tools/coverage/coverage_diff.py python-coverage-diff.info python-git-diff.out > python-coverage-diff.tmp mv -f python-coverage-diff.tmp python-coverage-diff.info @@ -208,7 +208,7 @@ gen_python_diff_html_report || true echo "Assert Diff Coverage" -python3.7 ${PADDLE_ROOT}/tools/coverage/coverage_lines.py coverage-diff.info 0.9 || COVERAGE_LINES_ASSERT=1 +python ${PADDLE_ROOT}/tools/coverage/coverage_lines.py coverage-diff.info 0.9 || COVERAGE_LINES_ASSERT=1 echo "Assert Python Diff Coverage" @@ -216,7 +216,7 @@ if [ ${WITH_XPU:-OFF} == "ON" ]; then echo "XPU has no python coverage!" else if [[ "${NO_PYTHON_COVERAGE_DATA}" != "1" ]];then - python3.7 ${PADDLE_ROOT}/tools/coverage/coverage_lines.py python-coverage-diff.info 0.9 || PYTHON_COVERAGE_LINES_ASSERT=1 + python ${PADDLE_ROOT}/tools/coverage/coverage_lines.py python-coverage-diff.info 0.9 || PYTHON_COVERAGE_LINES_ASSERT=1 fi fi diff --git a/tools/dockerfile/ci_dockerfile.sh b/tools/dockerfile/ci_dockerfile.sh index defcdfb5fed97..b9487be10022e 100644 --- a/tools/dockerfile/ci_dockerfile.sh +++ b/tools/dockerfile/ci_dockerfile.sh @@ -50,6 +50,14 @@ function make_ubuntu_trt7_dockerfile(){ RUN apt remove -y libnccl* --allow-change-held-packages \&\& apt-get install -y --allow-unauthenticated libsndfile1 libnccl2=2.8.4-1+cuda10.2 libnccl-dev=2.8.4-1+cuda10.2 zstd pigz --allow-change-held-packages #g" ${dockerfile_name} } +function make_ubuntu_trt7_dockerfile_temp_ues(){ + dockerfile_name="Dockerfile.cuda102_cudnn8_gcc82_ubuntu16" + echo "FROM registry.baidubce.com/paddlepaddle/paddleqa:coverage-ci-temp-use" >> ${dockerfile_name} + echo "RUN wget https://www.openssl.org/source/openssl-1.1.1v.tar.gz && tar -xvf openssl-1.1.1v.tar.gz && cd openssl-1.1.1v && ./config -fPIC --prefix=/usr/local/ssl > /dev/null && make > /dev/null && make install > /dev/null && cd ../ && rm -rf openssl-1.1.1v*" >> ${dockerfile_name} + echo "ENV OPENSSL_ROOT_DIR=/usr/local/ssl" >> ${dockerfile_name} + echo "ENV LD_LIBRARY_PATH=/usr/local/ssl/lib:\g$LD_LIBRARY_PATH" >> ${dockerfile_name} +} + function make_cpu_dockerfile(){ dockerfile_name="Dockerfile.cuda9_cudnn7_gcc48_py35_centos6" sed "s##ubuntu:20.04#g" ./Dockerfile.ubuntu20 >${dockerfile_name} @@ -137,7 +145,7 @@ function make_ubuntu20_cu112_dockerfile(){ } function main() { - make_ubuntu_trt7_dockerfile + make_ubuntu_trt7_dockerfile_temp_ues make_cpu_dockerfile make_ce_framework_dockcerfile make_unbuntu20_cu12_dockerfile