-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
65 lines (44 loc) · 1.36 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
VERSION ?= $(shell git describe --abbrev=0 --tags | sed -e 's/^v//')
ifeq ($(VERSION),)
VERSION := latest
endif
DEVICE ?= 0
ARCH ?= amd64
.PHONY: all
create-venv:
python -m venv .venv
requirements-gpu:
python -m pip install -r requirements-gpu.txt
requirements-dev:
python -m pip install -r requirements-dev.txt
requirements:
pip-sync requirements.txt requirements-dev.txt
build-requirements:
pip-compile -o requirements.txt pyproject.toml
build-requirements-dev:
pip-compile --extra dev -o requirements-dev.txt pyproject.toml
build-requirements-gpu:
pip-compile --extra dev -o requirements-gpu.txt pyproject.toml
fetch-model:
echo "NotImplementedError"
test:
pytest **/*.py
dev:
python src/main.py
lint:
ruff check . --fix
ruff format .
docker-build:
docker build -t ghcr.io/justinthelaw/repository-template/example:${VERSION} .
docker-run:
docker run -it ghcr.io/justinthelaw/repository-template/example:${VERSION}
docker-run-gpu:
echo "NotImplementedError, GPU Device: ${DEVICE}"
docker-push:
docker push ghcr.io/justinthelaw/repository-template/example:${VERSION}
zarf-create:
zarf package create . --confirm --set=IMAGE_VERSION=$(VERSION) --architecture ${ARCH}
zarf-deploy:
zarf package deploy --confirm zarf*${ARCH}*.tar.zst
zarf-publish:
zarf package publish zarf*${ARCH}*.tar.zst oci://ghcr.io/justinthelaw/packages/repository-template/