forked from opendatahub-io/llm-d-kv-cache
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (33 loc) · 1.16 KB
/
Makefile
File metadata and controls
40 lines (33 loc) · 1.16 KB
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
PYTHON ?= python3
WHEEL_DIR = wheels
DIST_DIR = dist
VERSION := $(shell $(PYTHON) -c "import tomllib; print(tomllib.load(open('pyproject.toml','rb'))['project']['version'])")
.PHONY: wheel build test clean check-gds
# Install build dependencies
deps:
$(PYTHON) -m pip install --upgrade pip setuptools wheel build ninja numpy
# Check if GDS (cuFile) is available at runtime
check-gds:
@echo "Checking for GPUDirect Storage (cuFile) runtime availability..."
@if ldconfig -p 2>/dev/null | grep -q libcufile.so; then \
echo "✓ cuFile library found - GDS will be available at runtime"; \
else \
echo "✗ cuFile library not found - GDS will not be available at runtime (CPU buffer staging only)"; \
fi
# Build wheel into dist/ and copy .whl into wheels/
wheel: deps
$(PYTHON) -m pip wheel . -w $(DIST_DIR)
cp $(DIST_DIR)/llmd_fs_connector-$(VERSION)-*.whl $(WHEEL_DIR)/
@echo ""
@echo "Wheel created in $(WHEEL_DIR):"
@ls -lh $(WHEEL_DIR)
# Editable install for development
build:
$(PYTHON) -m pip install -e .
# Run tests
test:
pytest ./tests/ -v -sq
# Clean local build artifacts
clean:
rm -rf build dist *.egg-info $(WHEEL_DIR)
@echo "Cleaned build artifacts."