Makefile 917 B

1234567891011121314151617181920212223242526
  1. NAME=table
  2. VERSION=latest
  3. BUILD_TIME := $(shell date "+%F %T")
  4. COMMIT_SHA1 := $(shell git rev-parse HEAD)
  5. AUTHOR := $(shell git show -s --format='%an')
  6. .PHONY: all gpu cpu
  7. all: gpu
  8. gpu:
  9. @docker build -t registry.cn-hangzhou.aliyuncs.com/sxtest/$(NAME):gpu --build-arg VERSION=gpu .
  10. # @docker push registry.cn-hangzhou.aliyuncs.com/sxtest/$(NAME):gpu
  11. cpu:
  12. @docker build -f cpu.Dockerfile -t registry.cn-hangzhou.aliyuncs.com/sxtest/$(NAME):cpu --build-arg VERSION=cpu .
  13. @docker push registry.cn-hangzhou.aliyuncs.com/sxtest/$(NAME):cpu
  14. image: rsync
  15. @ssh sxkj@192.168.199.107 -t 'cd /home/sxkj/zhangli/ocr-table && docker build -t SXKJ:32775/$(NAME):$(VERSION) .'
  16. deploy: rsync
  17. @ssh sxkj@192.168.199.107 -t 'cd /home/sxkj/zhangli/ocr-table && docker-compose down && docker-compose up -d'
  18. rsync:
  19. @rsync -azP --exclude ".*/" --exclude "tmp/" `pwd` sxkj@192.168.199.107:/home/sxkj/zhangli