forked from sujee/data-prep-kit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
80 lines (65 loc) · 2.64 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
# Define the root of the local git clone for the common rules to be able
# # know where they are running from.
REPOROOT=../..
# Include the common rules.
# Use "make help" to see them.
include $(REPOROOT)/.make.defaults
#DOCKER_IMG=${DOCKER_HOSTNAME}/${DOCKER_NAMESPACE}/${DOCKER_IMAGE_NAME}:${DOCKER_IMAGE_VERSION}
DOCKER_IMG=$(DOCKER_LOCAL_IMAGE)
BASE_IMAGE=${RAY_BASE_IMAGE}
ifeq ($(KFPv2), 1)
DOCKER_IMAGE_NAME=kfp-data-processing_v2
else
DOCKER_IMAGE_NAME=kfp-data-processing
endif
.PHONY: .lib-src-image
.lib-src-image::
$(MAKE) .defaults.copy-lib LIB_PATH=$(DPK_PYTHON_LIB_DIR) LIB_NAME=data-processing-lib-python
$(MAKE) .defaults.copy-lib LIB_PATH=$(DPK_RAY_LIB_DIR) LIB_NAME=data-processing-lib-ray
$(MAKE) .defaults.copy-lib LIB_PATH=$(REPOROOT)/kfp/kfp_support_lib/shared_workflow_support LIB_NAME=shared_workflow_support_lib
$(MAKE) .defaults.copy-lib LIB_PATH=$(REPOROOT)/kfp/kfp_support_lib/$(WORKFLOW_SUPPORT_LIB) LIB_NAME=workflow_support_lib
$(MAKE) .defaults.image
rm -rf data-processing-lib-ray
rm -rf data-processing-lib-python
rm -rf shared_workflow_support_lib
rm -rf workflow_support_lib
.PHONY: build
build: image
.PHONY: image
image: Dockerfile requirements.txt
$(MAKE) .lib-src-image
.PHONY: .reconcile-requirements
.reconcile-requirements:
@sed -i.back "s/kfp-data-processing.*/$(DOCKER_IMAGE_NAME):${DOCKER_IMAGE_VERSION}\"/" ${FILE}
.PHONE: set-versions
set-versions:
@# Help: Update yaml files to build images tagged as version $(KFP_DOCKER_VERSION)
@$(MAKE) .reconcile-requirements FILE=createRayClusterComponent.yaml
@$(MAKE) .reconcile-requirements FILE=deleteRayClusterComponent.yaml
@$(MAKE) .reconcile-requirements FILE=executeRayJobComponent.yaml
@$(MAKE) .reconcile-requirements FILE=executeRayJobComponent_multi_s3.yaml
ifneq ($(KFPv2), 1)
@$(MAKE) .reconcile-requirements FILE=executeSubWorkflowComponent.yaml
endif
.PHONY: kind-load-image
kind-load-image:
@# Help: Load the image to the kind cluster created with make setup.
kind load docker-image $(DOCKER_REMOTE_IMAGE) --name=$(KIND_CLUSTER_NAME)
.PHONY: docker-load-image
docker-load-image:
@$(MAKE) .defaults.docker-load-image
.PHONY: docker-save-image
docker-save-image:
@$(MAKE) .defaults.docker-save-image
.PHONY: publish
publish:
echo "Publishing kfp-data-processing"
$(MAKE) KFPv2=0 DOCKER_IMAGE_NAME="kfp-data-processing" DOCKER_IMAGE_VERSION=${KFP_DOCKER_VERSION} .defaults.publish-image
echo "Publishing kfp-data-processing_v2"
$(MAKE) KFPv2=1 DOCKER_IMAGE_NAME="kfp-data-processing_v2" DOCKER_IMAGE_VERSION=${KFP_DOCKER_VERSION_v2} .defaults.publish-image
test::
.PHONY: clean
clean:
@# Help: Remove $(IMG)
-rm makeenv
rm -rf *.back || true