Skip to content

Commit 25e0c22

Browse files
committed
fixes 12
1 parent eeada0d commit 25e0c22

File tree

1 file changed

+26
-4
lines changed

1 file changed

+26
-4
lines changed

opt/build/tensorflow/Makefile

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,33 @@ ROOT=../../..
33

44
VERSION ?= 1.15.0
55
OSNICK ?= buster
6+
# CPU=1
7+
# GPU=1
8+
# CUDA=version
9+
# CUDNN=version
610

711
#----------------------------------------------------------------------------------------------
812

9-
S3_URL=redismodules/tensorflow
10-
1113
OS:=$(shell $(ROOT)/opt/readies/bin/platform --os)
14+
ARCH:=$(shell $(ROOT)/opt/readies/bin/platform --arch)
15+
MACH:=$(shell uname -m)
1216

13-
STEM=libtensorflow-cpu-$(OS)
14-
17+
DOCKER_OS.xenial=ubuntu:xenial
1518
DOCKER_OS.bionic=ubuntu:bionic
19+
DOCKER_OS.focal=ubuntu:focal
1620
DOCKER_OS.stretch=debian:stretch-slim
1721
DOCKER_OS.buster=debian:buster-slim
22+
DOCKER_OS.centos7=centos:7.8.2003
1823
DOCKER_OS=$(DOCKER_OS.$(OSNICK))
1924

2025
#----------------------------------------------------------------------------------------------
2126

27+
S3_URL=redismodules/tensorflow
28+
29+
STEM=libtensorflow-cpu-$(OS)
30+
31+
#----------------------------------------------------------------------------------------------
32+
2233
define targets # (1=OP, 2=op)
2334
$(1)_TARGETS :=
2435
$(1)_TARGETS += $(if $(findstring $(X64),1),$(2)_x64)
@@ -33,10 +44,21 @@ $(eval $(call targets,PUBLISH,publish))
3344

3445
#----------------------------------------------------------------------------------------------
3546

47+
DOCKER_BUILD_ARGS += \
48+
TF_VER=$(VERSION) \
49+
OSNICK=$(OSNICK) \
50+
OS=$(DOCKER_OS) \
51+
ARCH=$(ARCH) \
52+
MACH=$(MACH) \
53+
REDIS_VER=$(REDIS_VER) \
54+
TEST=$(TEST) \
55+
PACK=$(PACK)
56+
3657
define build_x64 # (1=arch, 2=tar-arch)
3758
IID_$(1)=$(1)_$(VERSION).iid
3859
CID_$(1)=$(1)_$(VERSION).cid
3960

61+
$(foreach A,$(DOCKER_BUILD_ARGS),--build-arg $(A))
4062
build_x64:
4163
@docker build --iidfile $$(IID_$(1)) -t redisfab/$(STEM)-$(1):$(VERSION) -f Dockerfile.x64 \
4264
--build-arg OS=$(DOCKER_OS) $(ROOT)

0 commit comments

Comments
 (0)