forked from equinor/gordo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
79 lines (59 loc) · 2.42 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
MODEL_BUILDER_IMG_NAME := gordo-model-builder
MODEL_SERVER_IMG_NAME := gordo-model-server
CLIENT_IMG_NAME := gordo-client
WORKFLOW_GENERATOR_IMG_NAME := gordo-deploy
# Create the image capable of rendering argo workflow generator
workflow-generator:
docker build . -f Dockerfile-GordoDeploy -t $(WORKFLOW_GENERATOR_IMG_NAME)
# Publish image to the currently logged in docker repo
push-workflow-generator: workflow-generator
export DOCKER_NAME=$(WORKFLOW_GENERATOR_IMG_NAME);\
export DOCKER_IMAGE=$(WORKFLOW_GENERATOR_IMG_NAME);\
./docker_push.sh
# Create the image capable to building/training a model
model-builder:
docker build . -f Dockerfile-ModelBuilder -t $(MODEL_BUILDER_IMG_NAME)
# Create the image which serves built models
model-server:
docker build . -f Dockerfile-ModelServer -t $(MODEL_SERVER_IMG_NAME)
client:
docker build . -f Dockerfile-Client -t $(CLIENT_IMG_NAME)
push-server: model-server
export DOCKER_NAME=$(MODEL_SERVER_IMG_NAME);\
export DOCKER_IMAGE=$(MODEL_SERVER_IMG_NAME);\
bash ./docker_push.sh
push-builder: model-builder
export DOCKER_NAME=$(MODEL_BUILDER_IMG_NAME);\
export DOCKER_IMAGE=$(MODEL_BUILDER_IMG_NAME);\
bash ./docker_push.sh
push-client: client
export DOCKER_NAME=$(CLIENT_IMG_NAME);\
export DOCKER_IMAGE=$(CLIENT_IMG_NAME);\
bash ./docker_push.sh
# Publish development images
push-dev-images:
# Push everything to auroradevacr.azurecr.io/gordo-components
export DOCKER_REGISTRY=auroradevacr.azurecr.io;\
export DOCKER_REPO=gordo;\
$(MAKE) push-builder push-server push-client push-workflow-generator
# Also push workflow-generator to auroradevacr.azurecr.io/gordo-infrastructure
# as gordo-controller still expects it to be located there.
export DOCKER_REGISTRY=auroradevacr.azurecr.io;\
export DOCKER_REPO=gordo-infrastructure;\
$(MAKE) push-workflow-generator
push-prod-images: export GORDO_PROD_MODE:="true"
push-prod-images: push-builder push-server push-client push-workflow-generator
# Make the python source distribution
sdist:
# Ensure the dist directory is empty/non-existant before sdist
rm -rf ./dist/
python setup.py sdist
images: model-builder model-server client
test:
python setup.py test
testall:
python setup.py testall
docs:
cd ./docs && $(MAKE) html
all: test images push-dev-images
.PHONY: model-builder model-server client watchman push-server push-builder push-client push-dev-images push-prod-images images test all docs workflow-generator push-workflow-generator