1#!/usr/bin/env bash 2# Run this command from the PyTorch directory after cloning the source code using the “Get the PyTorch Source“ section below 3pip install -r requirements.txt 4git submodule sync 5git submodule update --init --recursive 6 7# This takes some time 8make setup-lint 9 10# Add CMAKE_PREFIX_PATH to bashrc 11echo 'export CMAKE_PREFIX_PATH=${CONDA_PREFIX:-"$(dirname $(which conda))/../"}' >> ~/.bashrc 12# Add linker path so that cuda-related libraries can be found 13echo 'export LDFLAGS="-L${CONDA_PREFIX}/lib/ $LDFLAGS"' >> ~/.bashrc 14