forked from determined-ai/determined
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
106 lines (85 loc) · 2.7 KB
/
Makefile
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: all
all:
$(MAKE) get-deps
$(MAKE) build
$(MAKE) set-config-dev
.PHONY: get-deps
get-deps: get-deps-pip get-deps-go get-deps-webui
.PHONY: get-deps-%
get-deps-%:
$(MAKE) -C $(subst -,/,$*) get-deps
# This version of torch is de-facto the supported version of torch across our repo. When it is
# updated, find/replace all other pinned versions.
.PHONY: get-deps-pip
get-deps-pip:
pip install torch==1.9.0
pip install -r requirements.txt
.PHONY: get-deps-go
get-deps-go:
$(MAKE) go-version-check
$(MAKE) get-deps-master
$(MAKE) get-deps-agent
$(MAKE) get-deps-proto
# Go versions may look like goM, goM.N, or goM.N.P. Only 1.20.* is supported.
supported_go_minor_version = go1.20
system_go_version := $(shell go version | sed 's/.*\(go[[:digit:]][[:digit:].]*\).*/\1/')
.PHONY: go-version-check
go-version-check:
@: $(if $(findstring $(supported_go_minor_version), $(system_go_version)), \
, \
$(error go version $(system_go_version) not supported. Must use $(supported_go_minor_version).x))
.PHONY: package
package:
$(MAKE) -C agent $@
$(MAKE) -C master $@
set-config-dev: .git/hooks/pre-commit
.git/hooks/pre-commit:
pre-commit install
.PHONY: build-%
build-%:
$(MAKE) -C $(subst -,/,$*) build
.PHONY: build-docs
build-docs: build-harness build-model_hub build-examples build-helm build-proto
$(MAKE) -C docs build
.PHONY: build-bindings
build-bindings: build-proto
$(MAKE) -C bindings build
.PHONY: build-webui
build-webui: build-bindings
$(MAKE) -C webui build
.PHONY: build-agent
build-agent: build-proto
$(MAKE) -C agent build
.PHONY: build-master
build-master: build-proto
$(MAKE) -C master build
.PHONY: build
build: build-master build-agent build-webui build-docs
.PHONY: clean-%
clean-%:
$(MAKE) -C $(subst -,/,$*) clean
.PHONY: clean
clean: clean-tools clean-proto clean-harness clean-model_hub clean-examples clean-docs clean-webui clean-master clean-agent clean-bindings
.PHONY: check-%
check-%:
$(MAKE) -C $(subst -,/,$*) check
.PHONY: check
check: check-proto check-harness check-model_hub check-e2e_tests check-tools check-master check-webui check-examples check-docs check-schemas
$(MAKE) check-agent
.PHONY: fmt-%
fmt-%:
$(MAKE) -C $(subst -,/,$*) fmt
.PHONY: fmt
fmt: fmt-harness fmt-model_hub fmt-e2e_tests fmt-tools fmt-master fmt-agent fmt-webui fmt-examples fmt-docs fmt-schemas fmt-proto
.PHONY: test-%
test-%:
$(MAKE) -C $(subst -,/,$*) test
.PHONY: test
test: test-harness test-model_hub test-master test-agent test-webui
# local frontend dev server against current DET_MASTER
.PHONY: localfrontend
local: build-bindings get-deps-webui
HOST="localhost" DET_WEBPACK_PROXY_URL=${DET_MASTER} $(MAKE) -C webui live
.PHONY: devcluster
devcluster:
devcluster -c tools/devcluster.yaml