forked from apache/mxnet
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[v1.x] Backport edge pipeline (apache#18375)
* Update edge toolchain * Support platforms without rand_r * Fix the URL to the IUS repository * compiler warnings * Use a pre-c++17 way of distinguishing between device types * Greatly simplify qemu setup * Request the C++ standard library and extensions * Upgrade dmlc-core to resolve build errors * Remove leftovers from C++17 dev type check * Fix CPU-only RRNOp Forward * Change the ARM8 build to work like the ARM7 build * Revert "Fix CPU-only RRNOp Forward" This reverts commit 0a921a4. * Hack around the lack of constexpr if * Adjust the list of files to be packed in ARM jobs Co-authored-by: Leonard Lausen <[email protected]>
- Loading branch information
1 parent
4b9bb1a
commit 7c9c9fc
Showing
51 changed files
with
662 additions
and
1,796 deletions.
There are no files selected for viewing
Submodule dmlc-core
updated
35 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,68 +18,46 @@ | |
# | ||
# Dockerfile to build MXNet for Android ARMv7 | ||
|
||
FROM dockcross/base | ||
MAINTAINER Pedro Larroy "[email protected]" | ||
|
||
# The cross-compiling emulator | ||
RUN apt-get update && apt-get install -y \ | ||
unzip | ||
|
||
ENV CROSS_TRIPLE=arm-linux-androideabi | ||
ENV CROSS_ROOT=/usr/${CROSS_TRIPLE} | ||
ENV AS=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-as \ | ||
AR=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-ar \ | ||
CC=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-gcc \ | ||
CPP=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-cpp \ | ||
CXX=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-g++ \ | ||
LD=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-ld | ||
|
||
ENV ANDROID_NDK_REVISION 17b | ||
ENV ANDROID_NDK_API 27 | ||
ENV ANDROID_NDK_ARCH arm | ||
WORKDIR /work/deps | ||
COPY install/android_ndk.sh /work/deps | ||
RUN /work/deps/android_ndk.sh | ||
|
||
ENV DEFAULT_DOCKCROSS_IMAGE dockcross/android-arm | ||
|
||
# Build-time metadata as defined at http://label-schema.org | ||
ARG BUILD_DATE | ||
ARG IMAGE | ||
ARG VCS_REF | ||
ARG VCS_URL | ||
LABEL org.label-schema.build-date=$BUILD_DATE \ | ||
org.label-schema.name=$IMAGE \ | ||
org.label-schema.vcs-ref=$VCS_REF \ | ||
org.label-schema.vcs-url=$VCS_URL \ | ||
org.label-schema.schema-version="1.0" | ||
|
||
|
||
ENV CC=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-clang | ||
ENV CXX=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-clang++ | ||
|
||
WORKDIR /work/deps | ||
|
||
COPY install/deb_ubuntu_ccache.sh /work/ | ||
RUN /work/deb_ubuntu_ccache.sh | ||
WORKDIR /work | ||
COPY install/ubuntu_arm.sh /work/ | ||
RUN /work/ubuntu_arm.sh | ||
|
||
COPY install/arm_openblas.sh /work/ | ||
COPY install/android_armv7_openblas.sh /work/deps | ||
RUN /work/deps/android_armv7_openblas.sh | ||
|
||
ENV OpenBLAS_HOME=${CROSS_ROOT} | ||
ENV OpenBLAS_DIR=${CROSS_ROOT} | ||
|
||
WORKDIR /work | ||
FROM ubuntu:20.04 | ||
|
||
ENV ARCH=armv7l \ | ||
HOSTCC=gcc \ | ||
HOSTCXX=g++ \ | ||
TARGET=ARMV7 | ||
|
||
WORKDIR /usr/local | ||
|
||
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ | ||
build-essential \ | ||
ninja-build \ | ||
cmake \ | ||
ccache \ | ||
git \ | ||
curl \ | ||
unzip \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
RUN curl -o android-ndk-r19-linux-x86_64.zip -L https://dl.google.com/android/repository/android-ndk-r19-linux-x86_64.zip && \ | ||
unzip android-ndk-r19-linux-x86_64.zip && \ | ||
rm android-ndk-r19-linux-x86_64.zip | ||
ENV CMAKE_TOOLCHAIN_FILE=/usr/local/android-ndk-r19/build/cmake/android.toolchain.cmake | ||
|
||
RUN git clone --recursive -b v0.3.9 https://github.com/xianyi/OpenBLAS.git && \ | ||
mkdir /usr/local/openblas-android && \ | ||
cd /usr/local/OpenBLAS && \ | ||
export TOOLCHAIN=/usr/local/android-ndk-r19/toolchains/llvm/prebuilt/linux-x86_64 && \ | ||
make NOFORTRAN=1 ARM_SOFTFP_ABI=1 NO_SHARED=1 \ | ||
LDFLAGS="-L/usr/local/android-ndk-r19/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9.x -lm" \ | ||
CC=$TOOLCHAIN/bin/armv7a-linux-androideabi16-clang AR=$TOOLCHAIN/bin/arm-linux-androideabi-ar && \ | ||
make PREFIX=/usr/local/openblas-android NO_SHARED=1 install && \ | ||
cd /usr/local && \ | ||
rm -rf OpenBLAS | ||
ENV OpenBLAS_HOME=/usr/local/openblas-android | ||
|
||
ARG USER_ID=0 | ||
ARG GROUP_ID=0 | ||
COPY install/ubuntu_adduser.sh /work/ | ||
RUN /work/ubuntu_adduser.sh | ||
|
||
COPY runtime_functions.sh /work/ | ||
WORKDIR /work/mxnet | ||
|
||
WORKDIR /work/build |
Oops, something went wrong.