From 560dfc8733cdcce522f6518d1e00a8c01a65a768 Mon Sep 17 00:00:00 2001 From: chenzhiyu Date: Tue, 22 Sep 2020 18:50:15 +0800 Subject: [PATCH] fix format --- paddle/fluid/platform/macros.h | 6 +++--- paddle/fluid/platform/port.h | 2 +- paddle/scripts/musl_build/Dockerfile | 12 ++++++++++++ python/paddle/fluid/core.py | 2 +- 4 files changed, 17 insertions(+), 5 deletions(-) create mode 100644 paddle/scripts/musl_build/Dockerfile diff --git a/paddle/fluid/platform/macros.h b/paddle/fluid/platform/macros.h index 82b20a53ce7..410fbdec586 100644 --- a/paddle/fluid/platform/macros.h +++ b/paddle/fluid/platform/macros.h @@ -26,7 +26,7 @@ limitations under the License. */ #endif #ifndef PADDLE_WITH_MUSL - #if defined(__FLT_MAX__) - #define FLT_MAX __FLT_MAX__ - #endif // __FLT_MAX__ +#if defined(__FLT_MAX__) +#define FLT_MAX __FLT_MAX__ +#endif // __FLT_MAX__ #endif diff --git a/paddle/fluid/platform/port.h b/paddle/fluid/platform/port.h index 5c346537cca..b484da152d5 100644 --- a/paddle/fluid/platform/port.h +++ b/paddle/fluid/platform/port.h @@ -25,7 +25,7 @@ #include "glog/logging.h" #if !defined(_WIN32) -#include // dladdr +#include // dladdr #include #include #include // std::accumulate diff --git a/paddle/scripts/musl_build/Dockerfile b/paddle/scripts/musl_build/Dockerfile new file mode 100644 index 00000000000..6b1002b4d3e --- /dev/null +++ b/paddle/scripts/musl_build/Dockerfile @@ -0,0 +1,12 @@ +FROM python:3.7-alpine3.10 + +RUN apk add --no-cache --force-overwrite\ + g++ gfortran make cmake patchelf\ + git \ + linux-headers \ + libjpeg-turbo-dev \ + lapack-dev openblas-dev + +#RUN pip3 install scikit-build\ +# numpy pandas scipy \ +# opencv \ No newline at end of file diff --git a/python/paddle/fluid/core.py b/python/paddle/fluid/core.py index 0fbdea2dbca..c292ad48e36 100644 --- a/python/paddle/fluid/core.py +++ b/python/paddle/fluid/core.py @@ -208,9 +208,9 @@ def get_libc_ver(): ldd_musl = run_shell_command("ldd 2>&1 | awk '/Version/{print $NF}'") if ldd_musl is not None: return ("musl", ldd_musl) - return (None, None) + def less_than_ver(a, b): if a is None or b is None: return False -- GitLab