diff --git a/.ci/scripts/setup-linux.sh b/.ci/scripts/setup-linux.sh index a090571ab49..7edb85e2af7 100755 --- a/.ci/scripts/setup-linux.sh +++ b/.ci/scripts/setup-linux.sh @@ -16,12 +16,8 @@ read -r BUILD_TOOL BUILD_MODE EDITABLE < <(parse_args "$@") # have already been installed, so we use PyTorch build from source here instead # of nightly. This allows CI to test against latest commits from PyTorch if [[ "${EDITABLE:-false}" == "true" ]]; then - install_executorch --use-pt-pinned-commit --editable + install_executorch --editable else - install_executorch --use-pt-pinned-commit + install_executorch fi build_executorch_runner "${BUILD_TOOL}" "${BUILD_MODE}" - -if [[ "${GITHUB_BASE_REF:-}" == *main* || "${GITHUB_BASE_REF:-}" == *gh* ]]; then - do_not_use_nightly_on_ci -fi diff --git a/install_requirements.py b/install_requirements.py index 0600c123dab..53f795644e6 100644 --- a/install_requirements.py +++ b/install_requirements.py @@ -130,34 +130,38 @@ def install_requirements(use_pytorch_nightly): def install_optional_example_requirements(use_pytorch_nightly): - print("Installing packages in requirements-examples.txt") + print("Installing torch domain libraries") + DOMAIN_LIBRARIES = [ + ("torchvision==0.23.0" if use_pytorch_nightly else "torchvision"), + "torchaudio==2.8.0" if use_pytorch_nightly else "torchaudio", + ] + # Then install domain libraries subprocess.run( [ sys.executable, "-m", "pip", "install", - "-r", - "requirements-examples.txt", + *DOMAIN_LIBRARIES, + "--extra-index-url", + TORCH_URL, ], check=True, ) - print("Installing torch domain libraries") - DOMAIN_LIBRARIES = [ - ("torchvision==0.23.0" if use_pytorch_nightly else "torchvision"), - "torchaudio==2.8.0" if use_pytorch_nightly else "torchaudio", - ] - # Then install domain libraries + print("Installing packages in requirements-examples.txt") subprocess.run( [ sys.executable, "-m", "pip", "install", - *DOMAIN_LIBRARIES, + "-r", + "requirements-examples.txt", "--extra-index-url", TORCH_URL, + "--upgrade-strategy", + "only-if-needed", ], check=True, ) diff --git a/pyproject.toml b/pyproject.toml index 7d44fef42a5..a1ee4a5fc88 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -67,6 +67,9 @@ dependencies=[ "pyyaml", "ruamel.yaml", "sympy", + "torch>=2.8.0,<2.9.0", + "torchaudio>=2.8.0,<2.9.0", + "torchvision>=0.23.0,<0.24.0", "torchao==0.12.0", "tabulate", # See also third-party/TARGETS for buck's typing-extensions version.