-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
49 lines (41 loc) Β· 1.02 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
IMAGE_REPO ?= registry.cn-shanghai.aliyuncs.com/kerthcet-public/pr-copilot
GIT_TAG ?= $(shell git describe --tags --dirty --always)
IMAGE_WITH_TAG ?= $(IMAGE_REPO):$(GIT_TAG)
.PHONY: lint
lint:
mypy .
black .
.PHONY: test
test: unit-test
.PHONY: unit-test
unit-test: lint
pytest tests
.PHONY: check
check: lint test
.PHONY: build
build: lint
echo $(IMAGE_WITH_TAG)
docker buildx build \
-f Dockerfile \
-t $(IMAGE_WITH_TAG) \
--platform=linux/amd64 \
--push \
./ \
.PHONY: export-requirements
export-requirements:
poetry export -f requirements.txt -o requirements.txt --without-hashes
poetry export -f requirements.txt -o requirements-dev.txt --without-hashes --with dev
.PHONY: build-zip
build-zip:
rm -rf ./pr-copilot.zip
tar --exclude='examples/' \
--exclude='tests/' \
--exclude='tmp/' \
--exclude='.mypy_cache/' \
--exclude='.pytest_cache/' \
--exclude='.git/' \
-zcvf pr-copilot.zip \
./
.PHONY: run
run:
serve run main:app model_name_or_path="/workspace/models/meta-llama/codellama-13b-instruct-hf"