Last active
September 25, 2017 19:17
-
-
Save KellenSunderland/2dcd5be1dbbe54df694e13abe8f0f6f3 to your computer and use it in GitHub Desktop.
Dockerfile to build a relatively portable armv6 linux binary.
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
# -*- mode: dockerfile -*- | |
# Dockerfile to build openblas for armv6 | |
FROM dockcross/linux-armv6 | |
ENV ARCH armv6l | |
ENV BUILD_OPTS "USE_BLAS=openblas USE_SSE=0 USE_OPENCV=0" | |
ENV CC /usr/bin/arm-linux-gnueabihf-gcc | |
ENV CXX /usr/bin/arm-linux-gnueabihf-g++ | |
ENV FC /usr/bin/arm-linux-gnueabihf-gfortran | |
ENV HOSTCC gcc | |
WORKDIR /work | |
# Build OpenBLAS | |
ADD https://api.github.com/repos/xianyi/OpenBLAS/git/refs/heads/master openblas_version.json | |
RUN git clone https://github.com/xianyi/OpenBLAS.git && \ | |
cd OpenBLAS && \ | |
#git reset --hard 46c9357c72801f4e186b56abcf7b75d3fad767ab && \ | |
make -j$(nproc) TARGET=ARMV6 && \ | |
make install && \ | |
ln -s /opt/OpenBLAS/lib/libopenblas.so /usr/lib/gcc/arm-linux-gnueabihf/libopenblas.so && \ | |
ln -s /opt/OpenBLAS/lib/libopenblas.a /usr/lib/gcc/arm-linux-gnueabihf/libopenblas.a && \ | |
ln -s /opt/OpenBLAS/lib/libopenblas.a /usr/lib/gcc/arm-linux-gnueabihf/liblapack.a && \ | |
ln -s /opt/OpenBLAS/lib/libopenblas.a /usr/lib/liblapack.a | |
ENV LD_LIBRARY_PATH /opt/OpenBLAS/lib | |
ENV CPLUS_INCLUDE_PATH /opt/OpenBLAS/include |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment