-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
71 lines (61 loc) · 1.52 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
DIR:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
PROJECT_NAME=tdml-example
PROJECT_DIR=${PROJECT_NAME}
edit = edit
edit = edit
build_dev:
docker build --rm \
-f ${DIR}/Dockerfile \
-t ${PROJECT_NAME} \
--target dev \
${DIR}
build_prod:
docker build --rm \
-f ${DIR}/Dockerfile \
-t ${PROJECT_NAME} \
--target prod \
${DIR}
stop:
docker rm -f ${PROJECT_NAME} || true
run_no_tests_titanic_pipeline: stop build_dev
docker run \
--rm \
--name ${PROJECT_NAME} \
-t \
-v ${DIR}:/${PROJECT_DIR} \
-e PROJECT_DIR=/tdml-example \
-w /${PROJECT_DIR}/ \
${PROJECT_NAME} \
python3 -m no_tests.no_tests_titanic_ml_pipeline
run_with_tests_titanic_pipeline: stop build_dev
docker run \
--rm \
--name ${PROJECT_NAME} \
-t \
-v ${DIR}:/${PROJECT_DIR} \
-e PROJECT_DIR=/tdml-example \
-w /${PROJECT_DIR}/ \
${PROJECT_NAME} \
pytest
run_no_tests_titanic_pipeline_with_new_data: stop build_dev
docker run \
--rm \
--name ${PROJECT_NAME} \
-t \
-v ${DIR}:/${PROJECT_DIR} \
-e PROJECT_DIR=/tdml-example \
-e NEW_DATA=2_unknown_new_data_to_score.csv \
-w /${PROJECT_DIR}/ \
${PROJECT_NAME} \
python3 -m no_tests.no_tests_titanic_ml_pipeline
run_with_tests_titanic_pipeline_with_new_data: stop build_dev
docker run \
--rm \
--name ${PROJECT_NAME} \
-t \
-v ${DIR}:/${PROJECT_DIR} \
-e PROJECT_DIR=/tdml-example \
-e NEW_DATA=2_unknown_new_data_to_score.csv \
-w /${PROJECT_DIR}/ \
${PROJECT_NAME} \
pytest