-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
85 lines (60 loc) · 1.3 KB
/
Copy pathMakefile
File metadata and controls
85 lines (60 loc) · 1.3 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
.PHONY: hello
hello:
@echo "Hello Everyone."
.PHONY: help
help:
@echo "Usage: make [target]"
@echo " hello: Print \"Hello Everyone!\"."
.PHONY: env
env:
set PYTHONPATH=${ROOT}
# DEVELOPMENT
define rag_env
conda create -p rag_env python==3.9 -y
endef
.PHONY: test
test:
python tests/integration/main.py
.PHONY: qs
qs:
python tests/integration/quick_start.py
.PHONY: install
install:
@$(PIP) install -r requirements.txt
message ?= "fix: test"
status ?= true
branch ?= main
# args = $(foreach a,$($(subst -,_,$1)_args),$(if $(value $a),$a="$($a)"))
# rule1_args = message
# rule2_args = status
# rule3_args = branch
.PHONY: git_push
git_add:
git add . && git status
.PHONY: git_commit
git_commit:
ifeq (${status},true)
echo "Commit message:"
git commit -m "${message}"
git push origin ${branch}
else ifeq (${status}, false)
echo "Withdrawing commit message..."
git reset
else
echo "Error: Invalid status value. Only 'true' or 'false' are allowed."
exit 1
endif
.PHONY: sl_app # Streamlit App
sl_app:
streamlit run serving/streamlit_app/app.py
.PHONY: gr_app # Gradio App
gr_app:
gradio run serving/gradio/gradio.app.py
.PHONY: custom_task
custom_task:
@echo "Custom message: ${message}"
@echo "Branch: ${branch}"
@echo "Status: ${status}"
.PHONY: clean
clean:
python -rf __pycache__