forked from neuro-inc/ml-recipe-hier-attention
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.mk
36 lines (29 loc) · 972 Bytes
/
test.mk
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
include Makefile
CMD_PREPARE=\
export DEBIAN_FRONTEND=noninteractive && \
apt-get -qq update && \
apt-get -qq install -y --no-install-recommends pandoc >/dev/null
CMD_NBCONVERT=\
jupyter nbconvert \
--execute \
--no-prompt \
--no-input \
--to=asciidoc \
--ExecutePreprocessor.timeout=300 \
--output=/tmp/out \
$(PROJECT_PATH_ENV)/$(NOTEBOOKS_DIR)/demo.ipynb
SUCCESS_MSG="[+] Test succeeded: PROJECT_PATH_ENV=$(PROJECT_PATH_ENV) TRAINING_MACHINE_TYPE=$(TRAINING_MACHINE_TYPE)"
.PHONY: test_jupyter
test_jupyter: JUPYTER_CMD=bash -c '$(CMD_PREPARE) && $(CMD_NBCONVERT)'
test_jupyter: jupyter
@echo $(SUCCESS_MSG)
.PHONY: test_jupyter_baked
test_jupyter_baked: PROJECT_PATH_ENV=/project-local
test_jupyter_baked: JOB_NAME=$(JUPYTER_JOB)-baked
test_jupyter_baked:
$(NEURO) run $(RUN_EXTRA) \
--name $(JOB_NAME) \
--preset $(TRAINING_MACHINE_TYPE) \
$(CUSTOM_ENV_NAME) \
bash -c '$(CMD_PREPARE) && $(CMD_NBCONVERT)'
@echo $(SUCCESS_MSG)