viiccwen commented on PR #943:
URL: https://github.com/apache/mahout/pull/943#issuecomment-3796819462

   like this:
   
   ```makefile
   .PHONY: test_rust test_python tests pre-commit setup-python
   
   # Detect NVIDIA GPU
   HAS_NVIDIA := $(shell command -v nvidia-smi >/dev/null 2>&1 && nvidia-smi -L 
>/dev/null 2>&1 && echo yes || echo no)
   
   setup-python:
        uv sync --group dev
   
   test_rust:
   ifeq ($(HAS_NVIDIA),yes)
        cd qdp && cargo test
   else
        @echo "[SKIP] No NVIDIA GPU detected, skipping test_rust"
   endif
   
   test_python: setup-python
   ifeq ($(HAS_NVIDIA),yes)
        unset CONDA_PREFIX && uv run --active maturin develop --manifest-path 
qdp/qdp-python/Cargo.toml
   else
        @echo "[SKIP] No NVIDIA GPU detected, skipping maturin develop"
   endif
        uv run pytest
   
   tests: test_rust test_python
   
   pre-commit: setup-python
        uv run pre-commit run --all-files
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to