Skip to content

Commit aee435d

Browse files
dbortfacebook-github-bot
authored andcommitted
Look on pytorch servers when installing pip deps (#3477)
Summary: Pull Request resolved: #3477 When installing the executorch pip package for CI jobs, look on the pytorch servers when resolving dependencies. This lets the executorch package depend on pytorch pre-release and nightly versions. Also run the llava setup with `-x` to make it easier to debug failures. imported-using-ghimport Test Plan: Imported from OSS Reviewed By: mikekgfb Differential Revision: D56857486 Pulled By: dbort fbshipit-source-id: dc2bc1c7e8ee59ad9461f2b5eb8e7da785485ad7
1 parent 4740013 commit aee435d

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

.ci/scripts/utils.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,11 @@ retry () {
1818
install_executorch() {
1919
which pip
2020
# Install executorch, this assumes that Executorch is checked out in the
21-
# current directory
22-
pip install . --no-build-isolation -v
21+
# current directory. The --extra-index-url options tell pip to look on the
22+
# pytorch servers for nightly and pre-release versions of torch packages.
23+
pip install . --no-build-isolation -v \
24+
--extra-index-url https://download.pytorch.org/whl/test/cpu \
25+
--extra-index-url https://download.pytorch.org/whl/nightly/cpu
2326
# Just print out the list of packages for debugging
2427
pip list
2528
}

examples/models/llava_encoder/install_requirements.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
# This source code is licensed under the BSD-style license found in the
66
# LICENSE file in the root directory of this source tree.
77

8+
set -x
9+
810
# install llava from the submodule
911
pip install --force-reinstall -e examples/third-party/LLaVA
1012

@@ -19,4 +21,4 @@ pip install bitsandbytes -I
1921
# For example, torch version required from llava is older than ExecuTorch.
2022
# To make both work, recover ExecuTorch's original dependencies by rerunning
2123
# the install_requirements.sh.
22-
./install_requirements.sh
24+
bash -x ./install_requirements.sh

install_requirements.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,12 @@ $PIP_EXECUTABLE install --extra-index-url "${TORCH_NIGHTLY_URL}" \
105105

106106
#
107107
# Install executorch pip package. This also makes `flatc` available on the path.
108+
# The --extra-index-url may be necessary if pyproject.toml has a dependency on a
109+
# pre-release or nightly version of a torch package.
108110
#
109111

110112
EXECUTORCH_BUILD_PYBIND="${EXECUTORCH_BUILD_PYBIND}" \
111113
CMAKE_ARGS="${CMAKE_ARGS}" \
112114
CMAKE_BUILD_ARGS="${CMAKE_BUILD_ARGS}" \
113-
$PIP_EXECUTABLE install . --no-build-isolation -v
115+
$PIP_EXECUTABLE install . --no-build-isolation -v \
116+
--extra-index-url "${TORCH_URL}"

0 commit comments

Comments
 (0)