Skip to content

Commit f216cbb

Browse files
committed
[ci] Look on pytorch servers when installing pip deps
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.
1 parent 2a89416 commit f216cbb

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
@@ -101,8 +101,11 @@ $PIP_EXECUTABLE install --extra-index-url "${TORCH_URL}" \
101101

102102
#
103103
# Install executorch pip package. This also makes `flatc` available on the path.
104+
# The --extra-index-url may be necessary if pyproject.toml has a dependency on a
105+
# pre-release or nightly version of a torch package.
104106
#
105107

106108
EXECUTORCH_BUILD_PYBIND="${EXECUTORCH_BUILD_PYBIND}" \
107109
CMAKE_ARGS="${CMAKE_ARGS}" \
108-
$PIP_EXECUTABLE install . --no-build-isolation -v
110+
$PIP_EXECUTABLE install . --no-build-isolation -v \
111+
--extra-index-url "${TORCH_URL}"

0 commit comments

Comments
 (0)