-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
74 lines (59 loc) · 1.98 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
72
73
74
SHELL := /bin/bash
.PHONY: up containers secrets down start stop delete dashboard status clean lint
#
# Running our app
#
up: containers secrets
@minikube kubectl -- apply -f deploy.yaml
containers:
set -Eeuo pipefail && \
eval $$(minikube docker-env) && \
for target in images/*; do \
docker build -t "audio-scraper-$$(basename "$$target")" "$$target"; \
done
secrets:
@minikube kubectl -- delete secret env-secrets || true
@minikube kubectl -- create secret generic env-secrets --from-env-file=secrets.env
down:
@minikube kubectl -- delete -f deploy.yaml || true
@minikube kubectl -- delete pod --all || true
@minikube kubectl -- delete pvc --all || true
@minikube kubectl -- delete pv --all || true
#
# Cluster management
#
# adjust these memory and cpu values to suit how many replicas you're running
start:
@minikube start --driver=docker --container-runtime=docker \
--gpus=all --memory=21504 --cpus=12 --disk-size=50g \
--mount --mount-string="$$(pwd)/data:/hostdata"
@minikube addons enable nvidia-gpu-device-plugin
@minikube addons enable metrics-server
stop:
@minikube stop
delete:
@minikube delete
dashboard:
@minikube dashboard --url=true
status:
@minikube status
#
# Misc
#
clean:
find . -name '*.pyc' -not -path '*/\.git/*' -exec rm -f {} \+
find . -name '*.pyo' -not -path '*/\.git/*' -exec rm -f {} \+
find . -name '*~' -not -path '*/\.git/*' -exec rm -f {} \+
find . -name tags -not -path '*/\.git/*' -exec rm -f {} \+
find . -name tags.lock -not -path '*/\.git/*' -exec rm -f {} \+
find . -name '*.egg-info' -not -path '*/\.git/*' -exec rm -rf {} \+
find . -name env -type d -not -path '*/\.git/*' -exec rm -rf {} \+
find . -name '__pycache__' -not -path '*/\.git/*' -exec rm -rf {} \+
find . -name '.mypy_cache' -not -path '*/\.git/*' -exec rm -rf {} \+
lint:
for dir in ingest transcribe; do \
pylint \
--rcfile=./.pylintrc \
--init-hook="import sys; sys.path.append('images/$$dir')" \
"images/$$dir"; \
done