diff --git a/docs/linux.md b/docs/linux.md index e7ca27455f..c962b52b40 100644 --- a/docs/linux.md +++ b/docs/linux.md @@ -112,3 +112,36 @@ python3 -I tests/test_.py # one standard- [testing.md](testing.md) covers the GPU tests (`scripts/run_gpu_tests.py`), running them on llvmpipe, and choosing the GPU. + +### Without root (micromamba) + +If you cannot install distribution packages (no `sudo`), you can install `llvm-tools` and `spirv-tools` into a +user-owned folder with [micromamba](https://mamba.readthedocs.io/en/latest/installation/micromamba-installation.html) +(x86-64 glibc; for ARM64 use `linux-aarch64` from the micromamba guide; musl/Alpine is not natively supported) and let +CMake fetch its pinned, hash-checked Vulkan headers if the system does not provide them: + +```bash +LEO=$HOME/leonida-tools +mkdir -p "$LEO/bin" "$LEO/mamba" +# Note: `latest` is unpinned and downloaded without signature verification; inspect or pin per the micromamba guide. +curl -fsSLo "$LEO/micromamba.tar.bz2" https://micro.mamba.pm/api/micromamba/linux-64/latest +tar -xjf "$LEO/micromamba.tar.bz2" -C "$LEO/bin" --strip-components=1 bin/micromamba + +export MAMBA_ROOT_PREFIX="$LEO/mamba" +"$LEO/bin/micromamba" create -y -n leonida -c conda-forge --override-channels "llvm-tools>=21" spirv-tools +export PATH="$LEO/mamba/envs/leonida/bin:$PATH" + +cmake -S runtime -B runtime/build/linux -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLEONIDA_VULKAN_HEADERS_FETCH=ON +cmake --build runtime/build/linux --parallel "$(nproc)" +LLVM_MC=llvm-mc LEONIDA_VK_DEVICE="" \ + python3 -I scripts/run_gpu_tests.py --build runtime/build/linux --work "$LEO/run" --require-pass | tee "$LEO/run.log" +echo "runner exit: ${PIPESTATUS[0]}" +``` + +Notes: +- `LEONIDA_VK_DEVICE` selects the physical GPU by substring so the runner does not fall back to Mesa's `llvmpipe`. +- Keep `$LEO` on a filesystem without `noexec` (`findmnt -no OPTIONS "$LEO"`). +- System prerequisites still needed: a working Vulkan driver/loader (`vulkaninfo --summary`), `cmake`, `ninja`, `g++` + (or `clang++`), `python3`, `curl`, `tar`, and `bzip2`. +- Cleanup: delete `$LEO` and `runtime/build/linux`. micromamba also writes `~/.conda/environments.txt` and + `~/.mamba/pkgs/urls.txt` (delete only those files if you already use conda). diff --git a/tests/test_docs_cli_flags.py b/tests/test_docs_cli_flags.py index c88e4b85a1..37ddf3d483 100644 --- a/tests/test_docs_cli_flags.py +++ b/tests/test_docs_cli_flags.py @@ -25,6 +25,7 @@ # Flags of other programs the docs quote: gh (AGENTS.md), pip (docs/shader_validation.md), argparse itself, and # the spirv-opt passes docs/embedded_shaders.md tried on one module. FOREIGN = {"--search", "--state", "--index-url", "--help", + "--strip-components", "--override-channels", "--ssa-rewrite", "--eliminate-dead-code-aggressive", "--eliminate-dead-branches", "--merge-blocks", "--cfg-cleanup", "--merge-return", "--scalar-replacement"} # Pages that quote another project's tree (SCARAB, americas-recomp).