12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
14
15
- # ##############
16
- # Dev Helpers #
17
- # ##############
18
15
SHELL := /bin/bash
19
- GOBIN ?= $$PWD/bin
20
- GOOS ?=
21
- define build
22
- mkdir -p $(GOBIN ) && \
23
- GOOS=$(GOOS ) \
24
- GOARCH=amd64 \
25
- CGO_ENABLED=0 \
26
- GOBIN=$(GOBIN ) \
27
- GO111MODULE=on \
28
- go install -v \
29
- -gcflags='-e' \
30
- $(1 )
31
- endef
32
-
33
-
34
- # ###########
35
- # Operator #
36
- # ###########
37
- olocal :
38
- @./dev/operator_local.sh
39
16
40
- ostop :
41
- @kubectl -n=cortex delete --ignore-not-found=true deployment operator
17
+ # ######
18
+ # Dev #
19
+ # ######
42
20
43
- oupdate :
44
- @./cortex.sh -c=./dev/config/cortex.sh update operator
21
+ # Operator
22
+
23
+ olocal :
24
+ @./dev/operator_local.sh || true
45
25
46
26
oinstall :
47
27
@./cortex.sh -c=./dev/config/cortex.sh install operator
48
28
29
+ oupdate :
30
+ @./cortex.sh -c=./dev/config/cortex.sh update operator
31
+
49
32
ouninstall :
50
33
@./cortex.sh -c=./dev/config/cortex.sh uninstall operator
51
34
35
+ ostop :
36
+ @kubectl -n=cortex delete --ignore-not-found=true deployment operator
37
+
38
+ # EKS
52
39
53
- # ######
54
- # EKS #
55
- # ######
56
40
eks-up :
57
41
@./dev/eks.sh start
58
42
$(MAKE ) oinstall
@@ -68,117 +52,102 @@ eks-down:
68
52
eks-set :
69
53
@./dev/eks.sh set
70
54
71
- # #######
72
- # KOPS #
73
- # #######
55
+ # KOPS
56
+
74
57
kops-up :
75
58
@./dev/kops.sh start
76
59
$(MAKE ) oinstall
77
-
60
+
78
61
kops-up-dev :
79
62
$(MAKE ) kops-up
80
63
$(MAKE ) ostop
81
-
64
+
82
65
kops-down :
83
66
@./dev/kops.sh stop
84
67
85
68
kops-set :
86
69
@./dev/kops.sh set
87
70
88
- # #############
89
- # Misc stuff #
90
- # #############
91
-
92
- tools :
93
- @go get -u -v github.com/VojtechVitek/rerun/cmd/rerun
94
- @curl -fLSs https://circle.ci/cli | bash
95
-
96
- build-cli :
97
- @$(call build, ./cli)
98
-
99
- test :
100
- @./build/test.sh
71
+ # Docker images
101
72
102
73
registry-all :
103
74
@./dev/registry.sh update
104
75
105
76
registry-dev :
106
- @./dev/registry.sh update dev
77
+ @./dev/registry.sh update dev
78
+
79
+ registry-create :
80
+ @./dev/registry.sh create
81
+
82
+ # Misc
83
+
84
+ .PHONY : cli
85
+ cli :
86
+ @mkdir -p ./bin
87
+ @GOARCH=amd64 CGO_ENABLED=0 go build -o ./bin/cortex ./cli
107
88
108
89
find-missing-license :
109
90
@./build/find-missing-license.sh
110
91
111
92
find-missing-version :
112
93
@./build/find-missing-version.sh
113
-
94
+
95
+ aws-clear-bucket :
96
+ @./dev/aws.sh clear-bucket
97
+
98
+ tools :
99
+ @go get -u -v github.com/VojtechVitek/rerun/cmd/rerun
100
+ @curl -fLSs https://circle.ci/cli | bash
101
+
102
+ # ########
103
+ # Tests #
104
+ # ########
105
+
106
+ test :
107
+ @./build/test.sh
108
+
109
+ test-go :
110
+ @./build/test.sh go
111
+
112
+ test-python :
113
+ @./build/test.sh python
114
114
115
115
# ##############
116
116
# CI Commands #
117
117
# ##############
118
- build-spark-base :
119
- @docker build . -f images/spark-base/Dockerfile -t cortexlabs/spark-base:latest
120
-
121
- build-tf-base :
122
- @docker build . -f images/tf-base/Dockerfile -t cortexlabs/tf-base:latest
123
- @docker build . -f images/tf-base-gpu/Dockerfile -t cortexlabs/tf-base-gpu:latest
124
-
125
- build-base : spark-base tf-base
126
118
127
- build-tf-dev :
119
+ build-images :
120
+ @./build/build-image.sh images/spark-base spark-base
121
+ @./build/build-image.sh images/tf-base tf-base
122
+ @./build/build-image.sh images/tf-base-gpu tf-base-gpu
123
+ @./build/build-image.sh images/spark spark
124
+ @./build/build-image.sh images/spark-operator spark-operator
128
125
@./build/build-image.sh images/tf-train tf-train
129
- @./build/build-image.sh images/tf-serve tf-serve
130
- @./build/build-image.sh images/tf-api tf-api
131
126
@./build/build-image.sh images/tf-train-gpu tf-train-gpu
127
+ @./build/build-image.sh images/tf-serve tf-serve
132
128
@./build/build-image.sh images/tf-serve-gpu tf-serve-gpu
133
-
134
- build-spark-dev :
135
- @./build/build-image.sh images/spark spark
136
- @./build/build-image.sh images/spark-operator spark-operator
137
-
138
- build-tf-images : build-tf-base build-tf-dev
139
- build-spark-images : build-spark-base build-spark-dev
140
-
141
- build-argo-images :
142
- @./build/build-image.sh images/argo-controller argo-controller
143
- @./build/build-image.sh images/argo-executor argo-executor
144
-
145
- build-operator-images :
129
+ @./build/build-image.sh images/tf-api tf-api
146
130
@./build/build-image.sh images/operator operator
131
+ @./build/build-image.sh images/fluentd fluentd
147
132
@./build/build-image.sh images/nginx-controller nginx-controller
148
133
@./build/build-image.sh images/nginx-backend nginx-backend
149
- @./build/build-image.sh images/fluentd fluentd
150
-
151
- build-images : build-tf-images build-spark-images build-argo-images build-operator-images
134
+ @./build/build-image.sh images/argo-controller argo-controller
135
+ @./build/build-image.sh images/argo-executor argo-executor
152
136
153
- push-tf-images :
137
+ push-images :
138
+ @./build/push-image.sh spark
139
+ @./build/push-image.sh spark-operator
154
140
@./build/push-image.sh tf-train
155
- @./build/push-image.sh tf-serve
156
- @./build/push-image.sh tf-api
157
141
@./build/push-image.sh tf-train-gpu
142
+ @./build/push-image.sh tf-serve
158
143
@./build/push-image.sh tf-serve-gpu
159
-
160
- push-spark-images :
161
- @./build/push-image.sh spark
162
- @./build/push-image.sh spark-operator
163
-
164
- push-argo-images :
165
- @./build/push-image.sh argo-controller
166
- @./build/push-image.sh argo-executor
167
-
168
- push-operator-images :
144
+ @./build/push-image.sh tf-api
169
145
@./build/push-image.sh operator
146
+ @./build/push-image.sh fluentd
170
147
@./build/push-image.sh nginx-controller
171
148
@./build/push-image.sh nginx-backend
172
- @./build/push-image.sh fluentd
173
-
174
- push-images : push-tf-images push-spark-images push-argo-images push-operator-images
149
+ @./build/push-image.sh argo-controller
150
+ @./build/push-image.sh argo-executor
175
151
176
152
build-and-upload-cli :
177
153
@./build/cli.sh
178
-
179
- test-go :
180
- @./build/test.sh go
181
-
182
- test-python :
183
- @./build/test.sh python
184
-
0 commit comments