Skip to content

Commit 2dbf16a

Browse files
committed
ARM support #12
1 parent 0a057bd commit 2dbf16a

File tree

5 files changed

+14
-4
lines changed

5 files changed

+14
-4
lines changed

Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,15 @@ ARG OSNICK=bionic
55
#----------------------------------------------------------------------------------------------
66
FROM redislabs/redis-${OSNICK}:5.0.5 AS builder
77

8+
ENV X_NPROC "cat /proc/cpuinfo|grep processor|wc -l"
9+
810
ADD ./ /build
911
WORKDIR /build
1012

1113
RUN ./deps/readies/bin/getpy2
1214
RUN ./system-setup.py
1315
RUN make deps
14-
RUN make -j`nproc`
16+
RUN make -j$(eval "$X_NPROC")
1517

1618
#----------------------------------------------------------------------------------------------
1719
FROM redislabs/redis-${OSNICK}:5.0.5

Dockerfile.arm64-xbuild renamed to Dockerfile.arm

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,15 @@ FROM redisfab/redis-${OSNICK}-xbuild:5.0.5 AS builder
77

88
RUN [ "cross-build-start" ]
99

10+
ENV X_NPROC "cat /proc/cpuinfo|grep processor|wc -l"
11+
1012
ADD ./ /build
1113
WORKDIR /build
1214

1315
RUN ./deps/readies/bin/getpy2
1416
RUN ./system-setup.py
1517
RUN make deps
16-
RUN make -j`nproc`
18+
RUN make -j$(eval "$X_NPROC")
1719

1820
RUN [ "cross-build-end" ]
1921

build/tensorflow-arm/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ FROM ${OS}
77
ARG OS=ubuntu:bionic
88
ARG TF_VER=v1.13.1
99

10+
ENV X_NPROC "cat /proc/cpuinfo|grep processor|wc -l"
11+
1012
RUN set -ex; apt-get update; apt-get install -y git
1113

1214
WORKDIR /build
@@ -28,4 +30,4 @@ RUN apt-get install -y python3 python3-dev
2830

2931
RUN cd tensorflow ;\
3032
./configure ;\
31-
bazel build --jobs `nproc` --config=opt //tensorflow:libtensorflow.so
33+
bazel build --jobs $(eval "$X_NPROC") --config=opt //tensorflow:libtensorflow.so

build/tensorflow-x64/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ FROM ${OS}
66

77
ARG TF_VER=v1.13.1
88

9+
ENV X_NPROC "cat /proc/cpuinfo|grep processor|wc -l"
10+
911
RUN set -ex; apt-get update; apt-get install -y git
1012

1113
WORKDIR /build
@@ -58,4 +60,4 @@ ENV TF_NEED_TENSORRT=0
5860

5961
RUN cd tensorflow ;\
6062
./configure ;\
61-
bazel build --jobs `nproc` --config=opt //tensorflow:libtensorflow.so
63+
bazel build --jobs $(eval "$X_NPROC") --config=opt //tensorflow:libtensorflow.so

deps/readies/paella/platform.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ def __init__(self):
4949
self.arch = 'x86'
5050
elif self.arch == 'aarch64':
5151
self.arch = 'arm64v8'
52+
elif self.arch == 'armv7l':
53+
self.arch = 'arm32v7'
5254

5355
def is_debian_compat(self):
5456
return self.dist == 'debian' or self.dist == 'ubuntu'

0 commit comments

Comments
 (0)