Skip to content

Commit e520bde

Browse files
committed
Bring back more changes from #4826
1 parent c5bb091 commit e520bde

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.ci/scripts/utils.sh

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,41 @@ install_pip_dependencies() {
4040
popd || return
4141
}
4242

43+
install_domains() {
44+
echo "Install torchvision and torchaudio"
45+
pip install --no-use-pep517 --user "git+https://github.com/pytorch/audio.git@${TORCHAUDIO_VERSION}"
46+
pip install --no-use-pep517 --user "git+https://github.com/pytorch/vision.git@${TORCHVISION_VERSION}"
47+
}
48+
49+
install_pytorch_and_domains() {
50+
pushd .ci/docker || return
51+
TORCH_VERSION=$(cat ci_commit_pins/pytorch.txt)
52+
popd || return
53+
54+
git clone https://github.com/pytorch/pytorch.git
55+
56+
# Fetch the target commit
57+
pushd pytorch || return
58+
git checkout "${TORCH_VERSION}"
59+
git submodule update --init --recursive
60+
61+
# Then build and install PyTorch
62+
python setup.py bdist_wheel
63+
pip install "$(echo dist/*.whl)"
64+
65+
# Grab the pinned audio and vision commits from PyTorch
66+
TORCHAUDIO_VERSION=$(cat .github/ci_commit_pins/audio.txt)
67+
export TORCHAUDIO_VERSION
68+
TORCHVISION_VERSION=$(cat .github/ci_commit_pins/vision.txt)
69+
export TORCHVISION_VERSION
70+
71+
install_domains
72+
73+
popd || return
74+
# Print sccache stats for debugging
75+
sccache --show-stats || true
76+
}
77+
4378
install_flatc_from_source() {
4479
# NB: This function could be used to install flatbuffer from source
4580
pushd third-party/flatbuffers || return

0 commit comments

Comments
 (0)