-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
62 lines (48 loc) · 1.17 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
SHELL := /bin/bash
# Variables definitions
# -----------------------------------------------------------------------------
ifeq ($(TIMEOUT),)
TIMEOUT := 60
endif
ifeq ($(MODEL_PATH),)
MODEL_PATH := ./ml/model/
endif
ifeq ($(MODEL_NAME),)
MODEL_NAME := model.pkl
endif
# Target section and Global definitions
# -----------------------------------------------------------------------------
.PHONY: all clean test install run deploy down easter
all: clean test install run deploy down easter
test:
poetry run pytest tests -vv --show-capture=all
install: generate_dot_env
pip install --upgrade pip
pip install poetry
poetry install
run:
PYTHONPATH=app/ poetry run python app/main.py
deploy: generate_dot_env
docker-compose build
docker-compose up -d
@$(MAKE) easter
down:
docker-compose down
generate_dot_env:
@if [[ ! -e .env ]]; then \
cp .env.example .env; \
fi
easter:
./egg.sh
clean:
@find . -name '*.pyc' -exec rm -rf {} \;
@find . -name '__pycache__' -exec rm -rf {} \;
@find . -name 'Thumbs.db' -exec rm -rf {} \;
@find . -name '*~' -exec rm -rf {} \;
rm -rf .cache
rm -rf build
rm -rf dist
rm -rf *.egg-info
rm -rf htmlcov
rm -rf .tox/
rm -rf docs/_build