-
Notifications
You must be signed in to change notification settings - Fork 0
/
Taskfile.yaml
53 lines (44 loc) · 1.43 KB
/
Taskfile.yaml
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
version: '3'
dotenv: ['.env']
includes:
docker: ./docker/Taskfile.yaml
kube: ./kube.Taskfile.yaml
tasks:
test:
desc: Run tests
cmds:
- poetry run pytest -v --show-capture=all
clean-cache:
desc: Clean python, pytest, ruff, mypy caches
cmds:
- find . ! -path "*/.venv/*" -name "__pycache__" -exec rm -rv {} +
- find . -name ".pytest_cache" -exec rm -rv {} +
- find . -name ".ruff_cache" -exec rm -rv {} +
- find . -name ".mypy_cache" -exec rm -rv {} +
- find . -name ".coverage" -exec rm -rv {} +
- find . -name "report.xml" -exec rm -rv {} +
clean:
desc: Clean all
deps: [clean-cache]
generate-crd:
desc: Generate CRD
cmds:
- poetry run python -m src.model_deployment_operator.crd > helm/templates/crd-model-deployment.yaml
create-object:
desc: Create CRD
cmds:
- kubectl apply -f ./example/model-deployment.yaml
delete-object:
desc: Delete CRD
cmds:
- kubectl delete -f ./example/model-deployment.yaml
generate-pydantic-models:
desc: Generate pydantic models
cmds:
- |
poetry run datamodel-codegen --base-class kube_crd_generator.BaseModel \
--enum-field-as-literal all \
--wrap-string-literal \
--input src/triton-model-config-schema/r24.01-r24.05/scheme.json \
--input-file-type jsonschema \
--output src/model_deployment_operator/crd/generated/triton_model_config.py