Skip to content

Commit

Permalink
Add Dockerfile and page for ARM builds. (#83)
Browse files Browse the repository at this point in the history
  • Loading branch information
pranavsharma authored Dec 4, 2018
1 parent 1e59b6f commit 37385ec
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 2 deletions.
7 changes: 6 additions & 1 deletion BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
|-------------|:------------:|:------------:|------------------------------------|
|Windows 10 | YES | YES |Must use VS 2017 or the latest VS2015|
|Windows 10 <br/> Subsystem for Linux | YES | NO | |
|Ubuntu 16.x | YES | YES | |
|Ubuntu 16.x | YES | YES | Also supported on ARM32v7 (experimental) |
|Ubuntu 17.x | YES | YES | |
|Ubuntu 18.x | YES | YES | |
|Fedora 24 | YES | YES | |
Expand Down Expand Up @@ -141,3 +141,8 @@ Then run it
```
./tools/ci_build/github/linux/run_dockerbuild.sh
```

## ARM Builds
We've experimental support for ARM builds. 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).
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Looking ahead: To broaden the reach of the runtime, we will continue investments
* C# for Linux, Mac
* C# supporting GPU
* C packages
* ARM
* [ARM](BUILD.md##arm-builds)

# Getting Started
If you need a model:
Expand Down
34 changes: 34 additions & 0 deletions dockerfiles/Dockerfile.arm32v7
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
FROM arm32v7/ubuntu:16.04

RUN apt-get update && apt-get install -y sudo build-essential curl libcurl4-openssl-dev libssl-dev wget python3 python3-pip python3-dev git
RUN pip3 install numpy

# Build the latest cmake
WORKDIR /code
RUN wget https://cmake.org/files/v3.12/cmake-3.12.3.tar.gz;
RUN tar zxf cmake-3.12.3.tar.gz

WORKDIR /code/cmake-3.12.3
RUN ./configure --system-curl
RUN make
RUN sudo make install

# Prepare onnxruntime Repo
# WORKDIR /code/onnxruntime
# RUN git clone --recursive https://github.com/Microsoft/onnxruntime

WORKDIR /code/onnxruntime
ARG BUILDTYPE=Debug

# Start the basic build
RUN ./build.sh --config ${BUILDTYPE}

# Build Shared Library
RUN ./build.sh --config ${BUILDTYPE} --build_shared_lib

# Build Python Binding
RUN ./build.sh --config ${BUILDTYPE} --enable_pybind

# Build Output
RUN ls -l /code/onnxruntime/build/Linux/Debug/*.so
RUN ls -l /code/onnxruntime/build/Linux/Debug/dist/*.whl

0 comments on commit 37385ec

Please sign in to comment.