Browse Source

update makefile

Zhang Li 2 years ago
parent
commit
e472a1ac71
1 changed files with 10 additions and 4 deletions
  1. 10 4
      Makefile

+ 10 - 4
Makefile

@@ -5,7 +5,13 @@ COMMIT_SHA1     := $(shell git rev-parse HEAD)
 AUTHOR          := $(shell git show -s --format='%an')
 
 
-.PHONY: local
-local:
-	@docker build -t registry.cn-hangzhou.aliyuncs.com/sxtest/$(NAME):$(VERSION) --build-arg VERSION=$(VERSION) .
-	@docker push registry.cn-hangzhou.aliyuncs.com/sxtest/$(NAME):$(VERSION)
+.PHONY: all cpu gpu
+
+all: cpu gpu
+gpu:
+	@docker build -t registry.cn-hangzhou.aliyuncs.com/sxtest/$(NAME):gpu --build-arg VERSION=gpu .
+	@docker push registry.cn-hangzhou.aliyuncs.com/sxtest/$(NAME):gpu
+
+cpu:
+	@docker build -t registry.cn-hangzhou.aliyuncs.com/sxtest/$(NAME):cpu --build-arg VERSION=cpu .
+	@docker push registry.cn-hangzhou.aliyuncs.com/sxtest/$(NAME):cpu