-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
81 lines (59 loc) · 2.32 KB
/
Copy pathMakefile
File metadata and controls
81 lines (59 loc) · 2.32 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
.PHONY: up down logs logs-watcher reindex reindex-scan reindex-files reindex-status retrieve retrieve-dated parse-dates shell check ps restart machine-start machine-init mcp-install test-install test
up:
podman compose -f docker-compose.yml up -d --build
down:
podman compose -f docker-compose.yml down
logs:
podman logs -f markdown-rag
logs-watcher:
podman logs -f markdown-rag-watcher
reindex:
curl -s -X POST http://localhost:8000/reindex | jq .
reindex-scan:
curl -s -X POST http://localhost:8000/reindex/scan | jq .
reindex-files:
@read -p "Comma-separated files (relative to vault): " FILES; \
JSON=$$(printf "%s" "$$FILES" | jq -R 'split(",")|map(gsub("^\\s+|\\s+$"; "")) | {files: .}'); \
curl -s -X POST http://localhost:8000/reindex/files -H "Content-Type: application/json" -d "$$JSON" | jq .
reindex-status:
curl -s -X GET http://localhost:8000/reindex/status | jq .
retrieve:
@read -p "Query: " Q; \
curl -s -G "http://localhost:8000/retrieve" \
--data-urlencode "q=$$Q" \
--data-urlencode "k=5" | jq .
retrieve-dated:
@read -p "Query: " Q; \
curl -s -G "http://localhost:8000/retrieve/dated" \
--data-urlencode "q=$$Q" \
--data-urlencode "k=5" | jq .
parse-dates:
@read -p "Query: " Q; \
curl -s -G "http://localhost:8000/utils/parse-dates" \
--data-urlencode "q=$$Q" | jq .
shell:
podman exec -it markdown-rag bash
check:
podman compose version || true
podman version || true
ps:
podman compose -f docker-compose.yml ps
restart:
podman compose -f docker-compose.yml restart
machine-start:
podman machine start
machine-init:
podman machine init --cpus 4 --memory 8192 --disk-size 50
mcp-install:
.venv/bin/python -m venv scripts/.venv
scripts/.venv/bin/pip install -q --upgrade pip
scripts/.venv/bin/pip install -q -r scripts/requirements.txt
# ── unit tests ────────────────────────────────────────────────────────────────
# Tests run locally (outside the container) against app/ source code.
# chromadb/spacy/langchain_huggingface are stubbed in conftest.py.
test-install:
python3 -m venv .venv
.venv/bin/pip install -q --upgrade pip
.venv/bin/pip install -q -r requirements-dev.lock
test:
.venv/bin/python -m pytest tests/ --cov=app --cov-report=term-missing