mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-28 10:34:54 +08:00
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
14 lines
540 B
Bash
14 lines
540 B
Bash
#!/usr/bin/env bash
|
|
# Run this command from the PyTorch directory after cloning the source code using the “Get the PyTorch Source“ section below
|
|
pip install -r requirements.txt
|
|
git submodule sync
|
|
git submodule update --init --recursive
|
|
|
|
# This takes some time
|
|
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
|