-
Notifications
You must be signed in to change notification settings - Fork 130
/
Makefile
29 lines (21 loc) · 854 Bytes
/
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
.PHONY: init data baseline train deploy prepare-deployment test-endpoint
DEPLOYMENT_DIR = deployment_dir
init:
curl -sSL https://install.python-poetry.org | python3 -
poetry install
data:
poetry run python src/data.py
baseline:
poetry run python src/baseline_model.py
train:
poetry run python src/train.py
prepare-deployment:
rm -rf $(DEPLOYMENT_DIR) && mkdir $(DEPLOYMENT_DIR)
poetry export -f requirements.txt --output $(DEPLOYMENT_DIR)/requirements.txt --without-hashes
cp -r src/predict.py $(DEPLOYMENT_DIR)/main.py
cp -r src $(DEPLOYMENT_DIR)/src/
# pip install cerebrium --upgrade # otherwise cerebrium deploy might fail
deploy: prepare-deployment
cd $(DEPLOYMENT_DIR) && poetry run cerebrium deploy --api-key $(CEREBRIUM_API_KEY) --hardware CPU eth-price-1-hour-predictor
test-endpoint:
poetry run python src/test_endpoint.py