-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
56 lines (44 loc) · 1.11 KB
/
Makefile
File metadata and controls
56 lines (44 loc) · 1.11 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
VENV_DIR=.venv
PYTHON=$(VENV_DIR)/bin/python
UV=$(VENV_DIR)/bin/uv
# Create virtual environment
.PHONY: venv
venv:
python3 -m venv $(VENV_DIR)
$(PYTHON) -m pip install --upgrade pip
$(PYTHON) -m pip install uv
# Compile requirements.in to requirements.txt using uv
.PHONY: compile
compile:
$(UV) pip compile --python $(PYTHON) -o requirements.txt requirements.i
# Install dependencies with uv
.PHONY: install
install:
$(UV) pip install --python $(PYTHON) -r requirements.txt
# Lock dependencies
.PHONY: lock
lock:
$(UV) pip compile --python $(PYTHON) -o requirements.txt pyproject.toml
.PHONY: dev-backend
dev-backend:
PYTHONPATH=. $(VENV_DIR)/bin/uvicorn src.api.server:app --reload --host 127.0.0.1 --port 8000
# Run backend
.PHONY: backend
backend:
$(PYTHON) -m src.main
# Create Vector indices
.PHONY: index
index:
$(PYTHON) -m src.index_builder
# Clean data before creating indices
.PHONY: clean-data
clean-data:
$(PYTHON) -m src.data_cleaner
# Run Streamlit frontend
.PHONY: frontend
frontend:
PYTHONPATH=. streamlit run frontend/app.py
# Remove venv (for resetting)
.PHONY: clean
clean:
rm -rf $(VENV_DIR)