-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
40 lines (29 loc) · 965 Bytes
/
makefile
File metadata and controls
40 lines (29 loc) · 965 Bytes
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
run:
uv run server.py
lint:
uvx black .
uvx isort --profile black .
uvx ruff check .
uvx ty check
snowman.png:
curl -fsSL https://huggingface.co/microsoft/kosmos-2-patch14-224/resolve/main/snowman.png -o snowman.png
curl-test: snowman.png
curl -X POST -F "content=@snowman.png" http://127.0.0.1:8010/stats | jq
client-test:
uv run client.py | jq
requirements.txt: pyproject.toml uv.lock
uv pip compile pyproject.toml --upgrade -o requirements.txt
setup-buildx:
docker buildx create --name multiarch-builder
docker buildx inspect --bootstrap
push: Dockerfile requirements.txt
docker buildx build --builder multiarch-builder \
--platform linux/amd64,linux/arm64 \
-t mindthemath/imagestats-api:latest \
. --push
build: Dockerfile requirements.txt
docker build -t mindthemath/imagestats-api:latest .
docker-run: build
docker run --rm -ti -p 8010:8010 -e WORKERS_PER_DEVICE=8 mindthemath/imagestats-api:latest
upgrade:
uv lock --upgrade