mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
[Dev Container][CUDA]Fix linker path (#108766)
Building with CUDA in dev container leads to error: `cannot find -lcudart_static`. This is because the libraries are under a custom CUDA_HOME, and `ld` cannot find it. Updating the `LDFLAGS` environment variable works. Pull Request resolved: https://github.com/pytorch/pytorch/pull/108766 Approved by: https://github.com/drisspg
This commit is contained in:
committed by
PyTorch MergeBot
parent
09a17c512d
commit
96d269eab1
@ -9,3 +9,5 @@ make setup_lint
|
||||
|
||||
# Add CMAKE_PREFIX_PATH to bashrc
|
||||
echo 'export CMAKE_PREFIX_PATH=${CONDA_PREFIX:-"$(dirname $(which conda))/../"}' >> ~/.bashrc
|
||||
# Add linker path so that cuda-related libraries can be found
|
||||
echo 'export LDFLAGS="-L${CONDA_PREFIX}/lib/ $LDFLAGS"' >> ~/.bashrc
|
||||
|
Reference in New Issue
Block a user