-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
40 lines (30 loc) · 1.01 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
.DEFAULT_GOAL := help
KERNEL_INFERENCE := cassava-inference
KERNEL_TRAINING := cassava-training
KERNEL_VALIDATION := cassava-validation
define pull
rm -f kernel-metadata.json
kaggle kernels pull -w -m imokuri/$1
cp kernel-metadata.json $1-kernel-metadata.json
endef
define push
rm -f kernel-metadata.json
cp $1-kernel-metadata.json kernel-metadata.json
kaggle kernels push
endef
pull-inf: ## Pull kernel $(KERNEL_INFERENCE)
$(call pull,$(KERNEL_INFERENCE))
push-inf: ## Push kernel $(KERNEL_INFERENCE)
$(call push,$(KERNEL_INFERENCE))
pull-train: ## Pull kernel $(KERNEL_TRAINING)
$(call pull,$(KERNEL_TRAINING))
push-train: ## Push kernel $(KERNEL_TRAINING)
$(call push,$(KERNEL_TRAINING))
pull-val: ## Pull kernel $(KERNEL_VALIDATION)
$(call pull,$(KERNEL_VALIDATION))
push-val: ## Push kernel $(KERNEL_VALIDATION)
$(call push,$(KERNEL_VALIDATION))
help: ## Show this help
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / \
{printf "\033[38;2;98;209;150m%-20s\033[0m %s\n", $$1, $$2}' \
$(MAKEFILE_LIST)