-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
60 lines (46 loc) · 2.33 KB
/
Makefile
File metadata and controls
60 lines (46 loc) · 2.33 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
# =============================================================================
# java - disinformation network mapping
# =============================================================================
SHELL := /bin/sh
COMPOSE ?= docker compose
ENV_FILE ?= .env
.DEFAULT_GOAL := help
.PHONY: help
help: ## Show this help
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_%-]+:.*?## / {printf " \033[36m%-14s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
$(ENV_FILE):
@cp .env.example $(ENV_FILE)
@echo "Created $(ENV_FILE) from .env.example — edit as desired."
.PHONY: build
build: $(ENV_FILE) ## Build images (proves @latest install)
$(COMPOSE) --env-file $(ENV_FILE) build
.PHONY: up
up: $(ENV_FILE) ## Bring up ollama + runtime + client
$(COMPOSE) --env-file $(ENV_FILE) up --build --abort-on-container-exit --remove-orphans
.PHONY: up-detached
up-detached: $(ENV_FILE) ## Bring up in the background
$(COMPOSE) --env-file $(ENV_FILE) up -d --build
.PHONY: down
down: ## Stop and remove containers
$(COMPOSE) --env-file $(ENV_FILE) down --remove-orphans
.PHONY: logs
logs: ## Tail logs from all services
$(COMPOSE) --env-file $(ENV_FILE) logs -f --tail=200
.PHONY: shell
shell: ## Shell into the client container
$(COMPOSE) --env-file $(ENV_FILE) run --rm --entrypoint /bin/sh arcp-client
.PHONY: verify
verify: ## docker build only — proves the scaffold resolves cleanly
docker build --build-arg ARCP_SDK_VERSION=$${ARCP_SDK_VERSION:-latest} -t arcp-sdk-examples/java-verify:test .
.PHONY: sample
sample: $(ENV_FILE) ## Generate/refresh the synthetic graph once the CLI exists
$(COMPOSE) --env-file $(ENV_FILE) run --rm arcp-client disinfo sample --out "$${GRAPH_DIR:-/data/graphs}/$${DEFAULT_GRAPH_ID:-synth-coord-001}"
.PHONY: scan
scan: $(ENV_FILE) ## Submit the bundled graph once the CLI exists
$(COMPOSE) --env-file $(ENV_FILE) run --rm arcp-client disinfo scan --in "$${GRAPH_DIR:-/data/graphs}/$${DEFAULT_GRAPH_ID:-synth-coord-001}" --partitions "$${DEFAULT_PARTITIONS:-16}"
.PHONY: report
report: $(ENV_FILE) ## Download a report once a job id exists (use JOB=...)
$(COMPOSE) --env-file $(ENV_FILE) run --rm arcp-client disinfo report "$${JOB:?set JOB=<job_id>}"
.PHONY: clean
clean: down ## Remove built images
-docker rmi arcp-sdk-examples/java-runtime:dev arcp-sdk-examples/java-client:dev arcp-sdk-examples/java-verify:test 2>/dev/null || true