-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
106 lines (73 loc) · 3.34 KB
/
Makefile
File metadata and controls
106 lines (73 loc) · 3.34 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
.PHONY: help install install-flux install-test test test-unit lint format \
build-orchestrator build-flux build-frontend build \
deploy undeploy status logs-orchestrator logs-flux logs-frontend \
dev dev-flux \
frontend-install frontend-dev frontend-build frontend-preview frontend-check
help: ## Show this help
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
# --- Python ---
install: ## Install orchestrator dependencies
pip install -r requirements.txt
install-flux: ## Install Flux server dependencies (requires CUDA)
pip install -r requirements-flux.txt
install-test: ## Install test dependencies
pip install -r requirements.txt
pip install pytest pytest-asyncio httpx respx Pillow
test: ## Run all tests
python -m pytest tests/ -v
test-unit: ## Run unit tests (no integration)
python -m pytest tests/ -v -k "not e2e"
lint: ## Run linting
python -m ruff check src/ tests/
python -m ruff format --check src/ tests/
format: ## Auto-format code
python -m ruff format src/ tests/
# --- Docker ---
REGISTRY ?= vecsmith
PLATFORM ?= linux/amd64
build-orchestrator: ## Build orchestrator Docker image
docker build --platform $(PLATFORM) -f docker/Dockerfile.orchestrator -t $(REGISTRY)/orchestrator:latest .
build-flux: ## Build Flux server Docker image
docker build --platform $(PLATFORM) -f docker/Dockerfile.flux-server -t $(REGISTRY)/flux-server:latest .
build-frontend: ## Build frontend Docker image
docker build --platform $(PLATFORM) -f docker/Dockerfile.frontend -t $(REGISTRY)/frontend:latest .
build: build-orchestrator build-flux build-frontend ## Build all Docker images
# --- Kubernetes ---
NAMESPACE ?= vecsmith
deploy: ## Deploy to Kubernetes
kubectl apply -f deploy/k8s/namespace.yaml
kubectl apply -f deploy/k8s/flux-server/
kubectl apply -f deploy/k8s/orchestrator/
kubectl apply -f deploy/k8s/frontend/
undeploy: ## Remove from Kubernetes
kubectl delete -f deploy/k8s/frontend/ --ignore-not-found
kubectl delete -f deploy/k8s/orchestrator/ --ignore-not-found
kubectl delete -f deploy/k8s/flux-server/ --ignore-not-found
kubectl delete -f deploy/k8s/namespace.yaml --ignore-not-found
status: ## Show deployment status
kubectl -n $(NAMESPACE) get pods,svc,ingress,pvc
logs-orchestrator: ## Tail orchestrator logs
kubectl -n $(NAMESPACE) logs -f deployment/vecsmith-orchestrator
logs-flux: ## Tail Flux server logs
kubectl -n $(NAMESPACE) logs -f deployment/vecsmith-flux-server
logs-frontend: ## Tail frontend logs
kubectl -n $(NAMESPACE) logs -f deployment/vecsmith-frontend
# --- Development ---
dev: ## Run orchestrator locally
VECSMITH_LLM_BASE_URL=http://localhost:8080/v1 \
VECSMITH_FLUX_BASE_URL=http://localhost:8081 \
python -m src.orchestrator.app
dev-flux: ## Run Flux server locally (requires NVIDIA GPU)
python -m src.flux_server.server
# --- Frontend ---
FRONTEND_DIR = frontend
frontend-install: ## Install frontend dependencies
cd $(FRONTEND_DIR) && npm install
frontend-dev: ## Run frontend dev server
cd $(FRONTEND_DIR) && npm run dev -- --open
frontend-build: ## Build frontend for production
cd $(FRONTEND_DIR) && npm run build
frontend-preview: ## Preview production build
cd $(FRONTEND_DIR) && npm run preview -- --open
frontend-check: ## Type-check frontend
cd $(FRONTEND_DIR) && npm run check