provision_llama_cuda: put Linux dirs first in PATH (WSL interop hygiene)
When the installer is launched from a Windows shell, WSL interop leaks the Windows PATH (/mnt/c/... entries, with spaces) into the build environment, which can make cmake/gcc/git resolve to Windows tools or otherwise confuse the CUDA build. Prepend the CUDA toolkit + standard Linux dirs so the Linux toolchain always wins; keep the original PATH after so nvidia-smi etc. still resolve. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
28a02ec303
commit
cc31b87850
1 changed files with 6 additions and 1 deletions
|
|
@ -83,7 +83,12 @@ if [ -z "$NVCC" ]; then
|
|||
fi
|
||||
|
||||
CUDA_HOME="$(dirname "$(dirname "$NVCC")")"
|
||||
export PATH="$CUDA_HOME/bin:$PATH"
|
||||
# Put the CUDA toolkit + standard Linux dirs FIRST so the build always uses the
|
||||
# Linux cmake/gcc/git, never a Windows tool that leaked into PATH via WSL interop
|
||||
# when the installer is launched from a Windows shell (those /mnt/c entries also
|
||||
# contain spaces that can confuse the build). Original PATH kept after so things
|
||||
# like nvidia-smi still resolve.
|
||||
export PATH="$CUDA_HOME/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:$PATH"
|
||||
export CUDAToolkit_ROOT="$CUDA_HOME"
|
||||
|
||||
# 4. Host compiler: prefer gcc-14 / g++-14 (nvcc rejects 15).
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue