When a user has LD_LIBRARY_PATH pointing at system CUDA libs (e.g. /usr/local/cuda-13/lib64), the dynamic linker loads those instead of the CUDA libs bundled with the torch wheel (in nvidia/*/lib/). This causes symbol version mismatches and crashes on import. Fix: before importing anything, detect torch's bundled CUDA lib paths (without importing torch itself) and prepend them to LD_LIBRARY_PATH so they take priority. Then re-exec so the dynamic linker picks up the corrected path. A sentinel env var prevents infinite re-exec. The user's original paths are preserved (just deprioritized), so non-torch tools that need system CUDA still work. |
||
|---|---|---|
| .. | ||
| backend | ||
| frontend | ||
| __init__.py | ||
| install_python_stack.py | ||
| LICENSE.AGPL-3.0 | ||
| setup.bat | ||
| setup.ps1 | ||
| setup.sh | ||
| Unsloth_Studio_Colab.ipynb | ||