forked from firstbatchxyz/dkn-compute-node
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
68 lines (54 loc) · 1.98 KB
/
Makefile
File metadata and controls
68 lines (54 loc) · 1.98 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
# load .env
ifneq (,$(wildcard ./.env))
include .env
export
endif
###############################################################################
.PHONY: launch # | Run with INFO log-level in release mode
launch:
RUST_LOG=warn,dkn_compute=info cargo run --release
.PHONY: run # | Run with INFO log-level
run:
RUST_LOG=none,dkn_compute=info cargo run
.PHONY: debug # | Run with DEBUG log-level with INFO log-level workflows
debug:
RUST_LOG=warn,dkn_compute=debug,ollama_workflows=info cargo run
.PHONY: trace # | Run with crate-level TRACE logging
trace:
RUST_LOG=none,dkn_compute=trace cargo run
.PHONY: build # | Build
build:
cargo build
.PHONY: profile # | Profile with flamegraph at dev level
profile:
cargo flamegraph --root --profile=profiling
.PHONY: version # | Print version
version:
@cargo pkgid | cut -d@ -f2
###############################################################################
.PHONY: test # | Run tests
test:
cargo test
###############################################################################
.PHONY: prompt # | Run a single prompt on a model
prompt:
cargo run --example prompt
###############################################################################
.PHONY: lint # | Run clippy
lint:
cargo clippy
.PHONY: format # | Run formatter
format:
cargo fmt -v
###############################################################################
.PHONY: docs # | Generate & open crate documentation
docs:
cargo doc --open --no-deps
.PHONY: env # | Print active environment
env:
@echo "Wallet Secret: ${DKN_WALLET_SECRET_KEY}"
@echo "Admin Public: ${DKN_ADMIN_PUBLIC_KEY}"
# https://stackoverflow.com/a/45843594
.PHONY: help # | List targets
help:
@grep '^.PHONY: .* #' Makefile | sed 's/\.PHONY: \(.*\) # \(.*\)/\1 \2/' | expand -t20