xref: /aosp_15_r20/external/pytorch/.devcontainer/scripts/install-dev-tools.sh (revision da0073e96a02ea20f0ac840b70461e3646d07c45)
1*da0073e9SAndroid Build Coastguard Worker#!/usr/bin/env bash
2*da0073e9SAndroid Build Coastguard Worker# Run this command from the PyTorch directory after cloning the source code using the “Get the PyTorch Source“ section below
3*da0073e9SAndroid Build Coastguard Workerpip install -r requirements.txt
4*da0073e9SAndroid Build Coastguard Workergit submodule sync
5*da0073e9SAndroid Build Coastguard Workergit submodule update --init --recursive
6*da0073e9SAndroid Build Coastguard Worker
7*da0073e9SAndroid Build Coastguard Worker# This takes some time
8*da0073e9SAndroid Build Coastguard Workermake setup-lint
9*da0073e9SAndroid Build Coastguard Worker
10*da0073e9SAndroid Build Coastguard Worker# Add CMAKE_PREFIX_PATH to bashrc
11*da0073e9SAndroid Build Coastguard Workerecho 'export CMAKE_PREFIX_PATH=${CONDA_PREFIX:-"$(dirname $(which conda))/../"}' >> ~/.bashrc
12*da0073e9SAndroid Build Coastguard Worker# Add linker path so that cuda-related libraries can be found
13*da0073e9SAndroid Build Coastguard Workerecho 'export LDFLAGS="-L${CONDA_PREFIX}/lib/ $LDFLAGS"' >> ~/.bashrc
14