From eeb862ab1afde183453ef2eba1884e4c925aeadf Mon Sep 17 00:00:00 2001 From: Klein Hu Date: Tue, 4 Dec 2018 23:06:36 -0800 Subject: [PATCH] Update Dockerfile for ARM build and the build instruction (#93) * Update Dockerfile for ARM build and build description * Update BUILD.md for ARM build * Fix typo * Kezhan/renaming graph_base.h to graph.h (#95) * rename graph.h to graph_viewer.h * rename graph_base.h to graph.h * Implement StringNormalizer (#69) * Imlpement StringNormalizer Add mixed language tests, test case insentive path. * Create a locale on the fly. Default locale does not seem to create well. * Add CI language-pack-en to make default locale available. Catch and translate locale creation exception to make the message meaningful. * Make sure locales are configured on Ubuntu. * Split the CI pipelines (#94) * Add the split build badges (#96) * Split the CI pipelines * Update build bdge display table in README * Revert Softmax optimizations using openmp. (#97) Revert "Simpler unused parameter in #if defined() switch." This reverts commit 6b00e6bb4df23e77da73b72c67ff98ba605712f1. Revert "Better opemmp parallel group count calculation in Softmax parallel running." This reverts commit c530064ebe912621ac5627bc486c62356fbd1eeb. Revert "Optimize softmax cpu by parallel using openmp." This reverts commit e7bdfa00db1d0e9909f1d0d5e159173e3fbd608f. * Delete logo as per marketing requirements (#98) * Update Dockerfile for ARM build and build description * Update BUILD.md for ARM build * Fix typo --- BUILD.md | 10 +++++++--- dockerfiles/Dockerfile.arm32v7 | 3 +-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/BUILD.md b/BUILD.md index 6efba19b95..46dca56178 100644 --- a/BUILD.md +++ b/BUILD.md @@ -178,9 +178,13 @@ set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) 5. append "-DCMAKE_TOOLCHAIN_FILE=path/to/tool.cmake" to your cmake args, run cmake and make to build it. ### Native compiling on Linux (SLOWER) -Please see [ARM docker file](dockerfiles/Dockerfile.arm32v7). Note that -to build in ACR-Build (Azure Container Registry), you may want to split it to two files and run them one by one. -If you run this Dockerfile directly in ACR-Build, it is likely to hit their timeout limitation (8 hours). + +Please see [ARM docker file](dockerfiles/Dockerfile.arm32v7). Docker build runs on a Raspberry Pi 3B with Raspbian Stretch Lite OS (Desktop version will run out memory when linking the .so file) will take 8-9 hours in total. If you want to use [Azure Container Registry Tasks](https://docs.microsoft.com/en-us/azure/container-registry/container-registry-tasks-overview) to build the Docker image in cloud, you may want to split this Dockerfile to two steps: + +1. Build environment image creation: steps before onnxruntime repo clone +2. ONNX Runtime and Python binding creation: the rest of steps in the original Dockerfile with step 1 output as base image. + +By doing this, you could avoid hit the ACR-Tasks build timeout (8 hours) ### Cross compiling on Windows (TODO) diff --git a/dockerfiles/Dockerfile.arm32v7 b/dockerfiles/Dockerfile.arm32v7 index 050dd3110e..d5456f7dce 100644 --- a/dockerfiles/Dockerfile.arm32v7 +++ b/dockerfiles/Dockerfile.arm32v7 @@ -14,8 +14,7 @@ RUN make RUN sudo make install # Prepare onnxruntime Repo -# WORKDIR /code/onnxruntime -# RUN git clone --recursive https://github.com/Microsoft/onnxruntime +RUN git clone --recursive https://github.com/Microsoft/onnxruntime WORKDIR /code/onnxruntime ARG BUILDTYPE=Debug