mirror of
https://github.com/pytorch/pytorch.git
synced 2025-11-06 09:17:11 +08:00
Add a new option `--cuda` to `tools/nightly.py` to pull the nightly packages with CUDA support. ```bash # installs pytorch-nightly with cpuonly tools/nightly.py pull # The following only available on Linux and Windows # installs pytorch-nightly with latest CUDA we support tools/nightly.py pull --cuda # installs pytorch-nightly with CUDA 12.1 tools/nightly.py pull --cuda 12.1 ``` Also add targets in `Makefile` and instructions in constribution guidelines. ```bash # setup conda environment with pytorch-nightly make setup-env # setup conda environment with pytorch-nightly with CUDA support make setup-env-cuda ``` Pull Request resolved: https://github.com/pytorch/pytorch/pull/131133 Approved by: https://github.com/ezyang
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
|