Fix dockerfiles/Dockerfile.arm32v7 build. (#10360)

Install CMake, ignore some Eigen warnings.
This commit is contained in:
Edward Chen 2022-01-24 19:06:09 -08:00 committed by GitHub
parent df0c819850
commit 4b87d2c172
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 42 additions and 4 deletions

View file

@ -8,10 +8,10 @@ FROM arm32v7/fedora:34
MAINTAINER Changming Sun "chasun@microsoft.com"
ADD . /code
RUN /code/dockerfiles/scripts/install_fedora_arm32.sh && cd /code && ./build.sh --skip_submodule_sync --config Release --build_wheel --update --build --parallel --cmake_extra_defines ONNXRUNTIME_VERSION=$(cat ./VERSION_NUMBER)
RUN /code/dockerfiles/scripts/install_fedora_arm32.sh
RUN cd /code && ./build.sh --skip_submodule_sync --config Release --build_wheel --update --build --parallel --cmake_extra_defines ONNXRUNTIME_VERSION=$(cat ./VERSION_NUMBER)
FROM arm64v8/centos:7
COPY --from=0 /code/build/Linux/Release/dist /root
COPY --from=0 /code/dockerfiles/LICENSE-IMAGE.txt /code/LICENSE-IMAGE.txt
RUN yum install -y python3-wheel python3-pip && python3 -m pip install --upgrade pip && python3 -m pip install /root/*.whl && rm -rf /root/*.whl
RUN yum install -y python3-wheel python3-pip && python3 -m pip install --upgrade pip && python3 -m pip install /root/*.whl && rm -rf /root/*.whl

View file

@ -1,3 +1,5 @@
dnf install -y binutils gcc gcc-c++ aria2 python3-pip python3-wheel git python3-devel
#!/bin/bash
set -e
dnf install -y binutils gcc gcc-c++ aria2 python3-pip python3-wheel git python3-devel cmake
python3 -m pip install --upgrade pip
python3 -m pip install numpy

View file

@ -18,6 +18,13 @@
#ifdef HAS_DEPRECATED_COPY
#pragma GCC diagnostic ignored "-Wdeprecated-copy"
#endif
// cmake/external/eigen/unsupported/Eigen/CXX11/../../../Eigen/src/Core/arch/NEON/PacketMath.h:1633:9:
// error: void* memcpy(void*, const void*, size_t) copying an object of non-trivial type Eigen::internal::Packet4c
// {aka struct Eigen::internal::eigen_packet_wrapper<int, 2>} from an array of const int8_t
// {aka const signed char} [-Werror=class-memaccess]
#ifdef HAS_CLASS_MEMACCESS
#pragma GCC diagnostic ignored "-Wclass-memaccess"
#endif
#elif defined(_MSC_VER)
// build\windows\debug\external\eigen3\unsupported\eigen\cxx11\src/Tensor/Tensor.h(76):
// warning C4554: '&': check operator precedence for possible error; use parentheses to clarify precedence

View file

@ -20,6 +20,13 @@
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-parameter"
#pragma GCC diagnostic ignored "-Wunused-result"
// cmake/external/eigen/unsupported/Eigen/CXX11/../../../Eigen/src/Core/arch/NEON/PacketMath.h:1633:9:
// error: void* memcpy(void*, const void*, size_t) copying an object of non-trivial type Eigen::internal::Packet4c
// {aka struct Eigen::internal::eigen_packet_wrapper<int, 2>} from an array of const int8_t
// {aka const signed char} [-Werror=class-memaccess]
#ifdef HAS_CLASS_MEMACCESS
#pragma GCC diagnostic ignored "-Wclass-memaccess"
#endif
#elif defined(_MSC_VER)
#pragma warning(push)
#pragma warning(disable : 4127)

View file

@ -35,6 +35,13 @@
#pragma GCC diagnostic ignored "-Wdeprecated-copy"
#endif
#endif
// cmake/external/eigen/Eigen/src/Core/arch/NEON/PacketMath.h:1633:9:
// error: void* memcpy(void*, const void*, size_t) copying an object of non-trivial type Eigen::internal::Packet4c
// {aka struct Eigen::internal::eigen_packet_wrapper<int, 2>} from an array of const int8_t
// {aka const signed char} [-Werror=class-memaccess]
#ifdef HAS_CLASS_MEMACCESS
#pragma GCC diagnostic ignored "-Wclass-memaccess"
#endif
#elif defined(_MSC_VER)
// build\windows\debug\external\eigen3\unsupported\eigen\cxx11\src/Tensor/Tensor.h(76):
// warning C4554: '&': check operator precedence for possible error; use parentheses to clarify precedence

View file

@ -20,10 +20,18 @@ using onnxruntime::Status;
// TODO: Temporary, while we bring up the threadpool impl...
#include "core/platform/threadpool.h"
#include "onnxruntime_config.h"
#if defined(__GNUC__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-parameter"
#pragma GCC diagnostic ignored "-Wunused-result"
// cmake/external/eigen/unsupported/Eigen/CXX11/../../../Eigen/src/Core/arch/NEON/PacketMath.h:1633:9:
// error: void* memcpy(void*, const void*, size_t) copying an object of non-trivial type Eigen::internal::Packet4c
// {aka struct Eigen::internal::eigen_packet_wrapper<int, 2>} from an array of const int8_t
// {aka const signed char} [-Werror=class-memaccess]
#ifdef HAS_CLASS_MEMACCESS
#pragma GCC diagnostic ignored "-Wclass-memaccess"
#endif
#endif
#include <unsupported/Eigen/CXX11/ThreadPool>
#if defined(__GNUC__)

View file

@ -10,6 +10,13 @@
#pragma GCC diagnostic ignored "-Wignored-qualifiers"
#pragma GCC diagnostic ignored "-Wunused-parameter"
#pragma GCC diagnostic ignored "-Wunused-result"
// cmake/external/eigen/Eigen/src/Core/arch/NEON/PacketMath.h:1633:9:
// error: void* memcpy(void*, const void*, size_t) copying an object of non-trivial type Eigen::internal::Packet4c
// {aka struct Eigen::internal::eigen_packet_wrapper<int, 2>} from an array of const int8_t
// {aka const signed char} [-Werror=class-memaccess]
#ifdef HAS_CLASS_MEMACCESS
#pragma GCC diagnostic ignored "-Wclass-memaccess"
#endif
#endif
#include <google/protobuf/message_lite.h>
#include <Eigen/Core>