forked from shibuiwilliam/ml-system-in-actions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
58 lines (42 loc) · 1.22 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
DOCKER_REPOSITORY := shibui/ml-system-in-actions
ABSOLUTE_PATH := $(shell pwd)
DOCKERFILE := Dockerfile
IMAGE_VERSION := 0.0.1
LOAD_TEST_PATTERN := load_test_pattern
LOAD_TEST_PATTERN_PORT := 8000
MODEL_LOADER := model_loader
.PHONY: build_api
build_api:
docker build \
-t $(DOCKER_REPOSITORY):$(LOAD_TEST_PATTERN)_api_$(IMAGE_VERSION) \
-f $(DOCKERFILE) \
.
.PHONY: push_api
push_api:
docker push $(DOCKER_REPOSITORY):$(LOAD_TEST_PATTERN)_api_$(IMAGE_VERSION)
.PHONY: build_loader
build_loader:
docker build \
-t $(DOCKER_REPOSITORY):$(LOAD_TEST_PATTERN)_loader_$(IMAGE_VERSION) \
-f $(MODEL_LOADER)/$(DOCKERFILE) \
.
.PHONY: push_loader
push_loader:
docker push $(DOCKER_REPOSITORY):$(LOAD_TEST_PATTERN)_loader_$(IMAGE_VERSION)
.PHONY: build_client
build_client:
docker build \
-t $(DOCKER_REPOSITORY):$(LOAD_TEST_PATTERN)_client_$(IMAGE_VERSION) \
-f $(DOCKERFILE).client \
.
.PHONY: push_client
push_client:
docker push $(DOCKER_REPOSITORY):$(LOAD_TEST_PATTERN)_client_$(IMAGE_VERSION)
.PHONY: build_all
build_all: build_api build_loader build_client
.PHONY: push_all
push_all: push_api push_loader push_client
.PHONY: deploy
deploy:
kubectl apply -f manifests/namespace.yml
kubectl apply -f manifests/