-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathmakefile
More file actions
71 lines (51 loc) · 1.21 KB
/
makefile
File metadata and controls
71 lines (51 loc) · 1.21 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
69
DOCKER_REPOSITORY := shibui/ml-system-in-actions
ABSOLUTE_PATH := $(shell pwd)
DOCKERFILE := Dockerfile
DOCKER_COMPOSE := docker-compose.yml
IMAGE_VERSION := 0.0.1
BATCH_PATTERN := batch_pattern
BATCH_PATTERN_PORT := 8000
.PHONY: build_api
build_api:
docker build \
-t $(DOCKER_REPOSITORY):$(BATCH_PATTERN)_api_$(IMAGE_VERSION) \
-f $(DOCKERFILE).api \
.
.PHONY: stop_api
stop_api:
docker rm -f $(BATCH_PATTERN)_api
.PHONY: push_api
push_api:
docker push $(DOCKER_REPOSITORY):$(BATCH_PATTERN)_api_$(IMAGE_VERSION)
.PHONY: build_batch
build_batch:
docker build \
-t $(DOCKER_REPOSITORY):$(BATCH_PATTERN)_batch_$(IMAGE_VERSION) \
-f $(DOCKERFILE).batch \
.
.PHONY: stop_batch
stop_batch:
docker rm -f $(BATCH_PATTERN)_batch
.PHONY: push_batch
push_batch:
docker push $(DOCKER_REPOSITORY):$(BATCH_PATTERN)_batch_$(IMAGE_VERSION)
.PHONY: build_all
build_all: build_api build_batch
.PHONY: push_all
push_all: push_api push_batch
.PHONY: c_build
c_build: build_all
.PHONY: c_up
c_up:
docker-compose \
-f ./$(DOCKER_COMPOSE) \
up -d
.PHONY: c_down
c_down:
docker-compose \
-f ./$(DOCKER_COMPOSE) \
down
.PHONY: deploy
deploy:
kubectl apply -f manifests/namespace.yml
kubectl apply -f manifests/