-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
44 lines (34 loc) · 979 Bytes
/
Makefile
File metadata and controls
44 lines (34 loc) · 979 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
40
41
42
43
44
# Developer Makefile — end users use the `mlx-serve` CLI directly.
# See: mlx-serve --help
.PHONY: install dev stop test lint build publish clean
# Install / sync dependencies
install:
uv sync
# Start with auto-reload on code changes (dev mode)
dev:
uv run uvicorn mlx_serve.main:app --host 0.0.0.0 --port 8095 --reload
# Stop any running processes
stop:
-pkill -f "mlx-serve" 2>/dev/null || true
-pkill -f "uvicorn mlx_serve" 2>/dev/null || true
-pkill -f "mlx_lm.server" 2>/dev/null || true
-pkill -f "mlx_vlm.server" 2>/dev/null || true
# Run tests
test:
uv run pytest tests/ -v
# Lint and type check
lint:
uv run ruff check src/
uv run ruff format --check src/
# Format code
format:
uv run ruff format src/
# Build wheel and sdist
build:
uv build
# Publish to PyPI (requires UV_PUBLISH_TOKEN or --token)
publish: build
uv publish
# Remove build artifacts
clean:
rm -rf dist/ build/ *.egg-info src/mlx_serve/__pycache__ src/mlx_serve/*.pyc