-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathMakefile
More file actions
64 lines (50 loc) · 1.55 KB
/
Copy pathMakefile
File metadata and controls
64 lines (50 loc) · 1.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
define HELP
make start # Start containers
make stop # Stop containers
make clean # Remove demo containers and images
make test # Run test
VERBOSE=1 # Show more detailed information
make camera # Start camera process
make setup # Install prerequisites
endef
#----------------------------------------------------------------------------------------------
start:
@docker-compose up -d
stop:
@docker-compose down
build:
@docker-compose build
test:
@./tests/cats-n-dogs.sh
clean:
@./tests/cats-n-dogs.sh clean
ifdef REDIS
CAMERA_ARG=-u $(REDIS)
endif
camera:
ifeq ($(VIRTUAL_ENV),'')
python3 -m venv venv
. ./venv/bin/activate; pip install -r camera/requirements.txt
. ./venv/bin/activate; python camera/read_camera.py $(CAMERA_ARG)
else
python3 camera/read_camera.py $(CAMERA_ARG)
endif
setup:
@$(SUDO) curl -s -L https://github.com/docker/compose/releases/download/1.25.4/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose ;\
$(SUDO) chmod +x /usr/local/bin/docker-compose
@wget -q https://github.com/git-lfs/git-lfs/releases/download/v2.10.0/git-lfs-linux-amd64-v2.10.0.tar.gz -O /tmp/git-lfs.tar.gz ;\
cd /tmp; tar xf git-lfs.tar.gz; $(SUDO) ./install.sh
@git lfs pull
.PHONY: start stop build test camera setup help
#----------------------------------------------------------------------------------------------
ifneq ($(HELP),)
ifneq ($(filter help,$(MAKECMDGOALS)),)
HELPFILE:=$(shell mktemp /tmp/make.help.XXXX)
endif
endif
help:
$(file >$(HELPFILE),$(HELP))
@echo
@cat $(HELPFILE)
@echo
@-rm -f $(HELPFILE)