pytorch
42 строки · 3.1 Кб
1# Makefile for the dashboard setup
2PIP ?= python -m pip
3
4clone-deps:
5(cd ../../.. \
6&& (test -e torchvision || git clone --recursive https://github.com/pytorch/vision torchvision) \
7&& (test -e torchdata || git clone --recursive https://github.com/pytorch/data.git torchdata) \
8&& (test -e torchtext || git clone --recursive https://github.com/pytorch/text torchtext) \
9&& (test -e torchaudio || git clone --recursive https://github.com/pytorch/audio torchaudio) \
10&& (test -e detectron2 || git clone --recursive https://github.com/facebookresearch/detectron2) \
11&& (test -e FBGEMM || git clone --recursive https://github.com/pytorch/FBGEMM) \
12&& (test -e torchrec || git clone --recursive https://github.com/pytorch/torchrec) \
13&& (test -e torchbenchmark || git clone --recursive https://github.com/pytorch/benchmark torchbenchmark) \
14)
15
16pull-deps: clone-deps
17(cd ../../../torchvision && git fetch && git checkout "$$(cat ../pytorch/.github/ci_commit_pins/vision.txt)" && git submodule update --init --recursive)
18(cd ../../../torchdata && git fetch && git checkout "$$(cat ../pytorch/.github/ci_commit_pins/data.txt)" && git submodule update --init --recursive)
19(cd ../../../torchtext && git fetch && git checkout "$$(cat ../pytorch/.github/ci_commit_pins/text.txt)" && git submodule update --init --recursive)
20(cd ../../../torchaudio && git fetch && git checkout "$$(cat ../pytorch/.github/ci_commit_pins/audio.txt)" && git submodule update --init --recursive)
21(cd ../../../FBGEMM && git fetch && git checkout "$$(cat ../pytorch/.github/ci_commit_pins/fbgemm.txt)" && git submodule update --init --recursive)
22(cd ../../../torchrec && git fetch && git checkout "$$(cat ../pytorch/.github/ci_commit_pins/torchrec.txt)" && git submodule update --init --recursive)
23(cd ../../../detectron2 && git fetch && git checkout HEAD && git submodule update --init --recursive)
24(cd ../../../torchbenchmark && git fetch && git checkout "$$(cat ../pytorch/.github/ci_commit_pins/torchbench.txt)" && git submodule update --init --recursive)
25
26build-deps: clone-deps
27# conda env remove --name torchdynamo
28# conda create --name torchdynamo -y python=3.8
29# conda activate torchdynamo
30conda install -y astunparse numpy scipy ninja pyyaml mkl mkl-include setuptools cmake \
31typing-extensions requests protobuf numba cython scikit-learn
32conda install -y -c pytorch magma-cuda116
33conda install -y -c conda-forge librosa
34(cd ../../../torchvision && python setup.py clean && python setup.py develop)
35(cd ../../../torchdata && python setup.py install)
36(cd ../../../torchtext && python setup.py clean && python setup.py develop)
37(cd ../../../torchaudio && python setup.py clean && python setup.py develop)
38(cd ../../../FBGEMM/fbgemm_gpu && pip install -r requirements.txt && python setup.py clean && python setup.py develop)
39(cd ../../../torchrec && python setup.py clean && python setup.py develop)
40(cd ../../../detectron2 && python setup.py clean && python setup.py develop)
41(cd ../../../torchbenchmark && python install.py --continue_on_fail)
42pip uninstall -y torchrec-nightly fbgemm-gpu-nightly
43