This repository has been archived by the owner on Jul 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
92 lines (73 loc) · 2.45 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
VERSION ?= $(shell git describe --abbrev=0 --tags | sed -e 's/^v//')
ifeq ($(VERSION),)
VERSION := latest
endif
DEVICE ?= 0
.PHONY: all
create-venv:
pip install uv
uv venv
requirements-dev:
pip install uv
uv pip install -r requirements-dev.txt --override overrides.txt
requirements:
pip install uv
uv pip sync requirements.txt
uv pip sync requirements-dev.txt
build-requirements:
pip install uv
uv pip compile pyproject.toml -o requirements.txt --override overrides.txt --generate-hashes
build-requirements-dev:
pip install uv
uv pip compile pyproject.toml -o requirements-dev.txt --override overrides.txt --extra dev --generate-hashes
fetch-model:
python3 scripts/model_download.py
test:
pytest **/*.py
dev:
leapfrogai --app-dir=. main:Model
lint:
ruff check . --fix
ruff format .
docker-build:
if [ -f .env ]; then \
echo "env file exists"; \
else \
echo "env file does not exist, using .env.example."; \
cp .env.example .env; \
fi
if [ -f config.yaml ]; then \
echo "config file exists"; \
else \
echo "config file does not exist, using config.example.yaml."; \
cp config.example.yaml config.yaml; \
fi
docker build -t ghcr.io/defenseunicorns/leapfrogai/vllm:${VERSION} .
docker-build-local-registry:
if [ -f .env ]; then \
echo "env file exists"; \
else \
echo "env file does not exist, using .env.example."; \
cp .env.example .env; \
fi
if [ -f config.yaml ]; then \
echo "config file exists"; \
else \
echo "config file does not exist, using config.example.yaml."; \
cp config.example.yaml config.yaml; \
fi
docker build -t ghcr.io/defenseunicorns/leapfrogai/vllm:${VERSION} .
docker tag ghcr.io/defenseunicorns/leapfrogai/vllm:${VERSION} localhost:5000/defenseunicorns/leapfrogai/vllm:${VERSION}
docker push localhost:5000/defenseunicorns/leapfrogai/vllm:${VERSION}
docker-run:
docker run -it --gpus device=0 -p 50051:50051 ghcr.io/defenseunicorns/leapfrogai/vllm:${VERSION}
docker-push:
docker push ghcr.io/defenseunicorns/leapfrogai/vllm:${VERSION}
zarf-create:
zarf package create . --confirm
zarf-create-local-registry:
zarf package create . --confirm --registry-override ghcr.io=localhost:5000 --set IMG=defenseunicorns/leapfrogai/vllm:${VERSION}
zarf-deploy:
zarf package deploy --confirm zarf-package-*.tar.zst --set GPU_ENABLED=true --set REQUESTS_GPU=1 --set LIMITS_GPU=1 --set REQUESTS_CPU=0 --set LIMITS_CPU=0
zarf-publish:
zarf package publish zarf-*.tar.zst oci://ghcr.io/defenseunicorns/leapfrogai/packages/