-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
52 lines (42 loc) · 1.77 KB
/
Makefile
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
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# Signifies our desired python version
# Makefile macros (or variables) are defined a little bit differently than traditional bash, keep
# in mind that in the Makefile there's top-level Makefile-only syntax, and everything else is bash
# script syntax.
PYTHON = python
PIP = ${PYTHON} -m pip
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
.DEFAULT_GOAL = help
# The @ makes sure that the command itself isn't echoed in the terminal
help:
@echo "+------------------------------------------------------+"
@echo "| OS | Hardware | Setup Command |"
@echo "+------------------------------------------------------+"
@echo "| Windows/Linux | - GPU | 'make setup.CPU' |"
@echo "| Windows/Linux | + GPU | 'make setup.GPU' |"
@echo "| Apple macOS | + M1 | 'make setup.M1' |"
@echo "| Apple macOS | - M1 | 'make setup.CPU' |"
@echo "+------------------------------------------------------+"
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
setup.GPU:
${PIP} install -r ./tools/requirements/GPU.txt
setup.CPU:
${PIP} install -r ./tools/requirements/CPU.txt
setup.M1:
./tools/scripts/M1.install.zsh
train:
${PYTHON} src/train.py
test:
${PYTHON} src/test.py
clean:
rm -rf __pycache__
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# .PHONY defines parts of the makefile that are not dependant on any specific file
# This is most often used to store functions
.PHONY: help
.PHONY: setup.M1
.PHONY: setup.GPU
.PHONY: setup.CPU
.PHONY: train
.PHONY: test
.PHONY: clean