-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
160 lines (126 loc) · 5.1 KB
/
Copy pathMakefile
File metadata and controls
160 lines (126 loc) · 5.1 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
CONTAINER_IMAGE=$(shell bash scripts/container_image.sh)
PYTHON ?= "python3"
PYTEST_OPTS ?= "-s -vvv"
PYTEST_DIR ?= "tests"
ABACO_DEPLOY_OPTS ?= ""
SCRIPT_DIR ?= "scripts"
PREF_SHELL ?= "bash"
ACTOR_ID ?=
NOCLEANUP ?= 0
GITREF=$(shell git rev-parse --short HEAD)
export PDT_OMICS_TOOLS_INIFILE := app/precomputed-data-table-omics-tools/app.ini
export PDT_OMICS_TOOLS_DIR := app/precomputed-data-table-omics-tools
export PDT_WASSERSTEIN_INIFILE := app/precomputed-data-table-wasserstein/app.ini
export PDT_WASSERSTEIN_DIR := app/precomputed-data-table-wasserstein
export PDT_GROWTH_ANALYSIS_INIFILE := app/precomputed-data-table-growth-analysis/app.ini
export PDT_GROWTH_ANALYSIS_DIR := app/precomputed-data-table-growth-analysis
export PDT_FCS_SIGNAL_PREDICTION_INIFILE := app/precomputed-data-table-fcs-signal-prediction/app.ini
export PDT_FCS_SIGNAL_PREDICTION_DIR := app/precomputed-data-table-fcs-signal-prediction
export PDT_LIVE_DEAD_PREDICTION_INIFILE := app/precomputed-data-table-live-dead-prediction/app.ini
export PDT_LIVE_DEAD_PREDICTION_DIR := app/precomputed-data-table-live-dead-prediction
.PHONY: tests app-container tests-local tests-reactor tests-deployed
.SILENT: tests app-container tests-local tests-reactor tests-deployed
all: reactor-image app-image
reactor-image:
python record_product_info.py > version.txt; \
abaco deploy -R -F Dockerfile -k -B reactor.rc -R -t $(GITREF) $(ABACO_DEPLOY_OPTS)
# Apparently apps-build-container ignores the -f flag, thus we have to move the two Dockerfiles around below
omics-tools-image:
cd $(PDT_OMICS_TOOLS_DIR); \
find . -name '*.pyc' -delete ; \
apps-build-container -V ; \
echo "The app container is done building."
echo " make shell - explore the container interactively"
echo " make tests-pytest - run Python tests in the container"
echo " make tests-local - execute container (and wrapper) under emulation"
wasserstein-image:
cd $(PDT_WASSERSTEIN_DIR); \
cp -r ../common src; \
find . -name '*.pyc' -delete ; \
apps-build-container -V ; \
rm -r src/common; \
echo "The app container is done building."
echo " make shell - explore the container interactively"
echo " make tests-pytest - run Python tests in the container"
echo " make tests-local - execute container (and wrapper) under emulation"
growth-analysis-image:
cd $(PDT_GROWTH_ANALYSIS_DIR); \
cp -r ../common src; \
find . -name '*.pyc' -delete ; \
apps-build-container -V ; \
rm -r src/common; \
echo "The app container is done building."
echo " make shell - explore the container interactively"
echo " make tests-pytest - run Python tests in the container"
echo " make tests-local - execute container (and wrapper) under emulation"
fcs-signal-prediction-image:
cd $(PDT_FCS_SIGNAL_PREDICTION_DIR); \
cp -r ../common src; \
find . -name '*.pyc' -delete ; \
apps-build-container -V ; \
rm -r src/common; \
echo "The app container is done building."
echo " make shell - explore the container interactively"
echo " make tests-pytest - run Python tests in the container"
echo " make tests-local - execute container (and wrapper) under emulation"
live-dead-prediction-image:
cd $(PDT_LIVE_DEAD_PREDICTION_DIR); \
cp -r ../common src; \
find . -name '*.pyc' -delete ; \
apps-build-container -V ; \
rm -r src/common; \
echo "The app container is done building."
echo " make shell - explore the container interactively"
echo " make tests-pytest - run Python tests in the container"
echo " make tests-local - execute container (and wrapper) under emulation"
shell:
bash $(SCRIPT_DIR)/run_container_process.sh bash
tests-local:
bash scripts/run_container_message.sh tests/data/msg-test-samples.json $(ACTOR_ID)
tests-pytest:
# bash $(SCRIPT_DIR)/run_container_process.sh $(PYTHON) -m "pytest" $(PYTEST_DIR) $(PYTEST_OPTS)
echo "not implemented"
tests-deployed:
echo "not implemented"
clean: clean-reactor-image clean-tests clean-app-image
clean-reactor-image:
docker rmi -f $(CONTAINER_IMAGE)
clean-wasserstein-image:
bash scripts/remove_images.sh $(PDT_WASSERSTEIN_INIFILE)
clean-growth-analysis-image:
bash scripts/remove_images.sh $(PDT_GROWTH_ANALYSIS_INIFILE)
clean-fcs-signal-prediction-image:
bash scripts/remove_images.sh $(PDT_FCS_SIGNAL_PREDICTION_INIFILE)
clean-live-dead-prediction-image:
bash scripts/remove_images.sh $(PDT_LIVE_DEAD_PREDICTION_INIFILE)
clean-omics-tools-image:
bash scripts/remove_images.sh $(PDT_OMICS_TOOLS_INIFILE)
clean-tests:
rm -rf .hypothesis .pytest_cache __pycache__ */__pycache__ tmp.* *junit.xml
deploy:
abaco deploy -t $(GITREF) $(ABACO_DEPLOY_OPTS) -U $(ACTOR_ID)
deploy-wasserstein:
cd $(PDT_WASSERSTEIN_DIR); \
cp -r ../common src; \
apps-deploy; \
rm -r src/common
deploy-growth-analysis:
cd $(PDT_GROWTH_ANALYSIS_DIR); \
cp -r ../common src; \
apps-deploy; \
rm -r src/common
deploy-fcs-signal-prediction:
cd $(PDT_FCS_SIGNAL_PREDICTION_DIR); \
cp -r ../common src; \
apps-deploy; \
rm -r src/common
deploy-live-dead-prediction:
cd $(PDT_LIVE_DEAD_PREDICTION_DIR); \
cp -r ../common src; \
apps-deploy; \
rm -r src/common
deploy-omics-tools:
cd $(PDT_OMICS_TOOLS_DIR); \
apps-deploy
postdeploy:
bash tests/run_after_deploy.sh