@@ -101,34 +101,16 @@ def install_requirements(use_pytorch_nightly):
101101 if use_pytorch_nightly
102102 else "torchvision"
103103 ), # For testing.
104- "typing-extensions" ,
105104 ]
106105
107- # pip packages needed to run examples.
108- # TODO: Make each example publish its own requirements.txt
109106 EXAMPLES_REQUIREMENTS = [
110- "timm==1.0.7" ,
111107 f"torchaudio==2.6.0.{ NIGHTLY_VERSION } " if use_pytorch_nightly else "torchaudio" ,
112- "torchsr==1.0.4" ,
113- "transformers==4.47.1" ,
114- ]
115-
116- # pip packages needed for development.
117- DEVEL_REQUIREMENTS = [
118- "cmake" , # For building binary targets.
119- "pip>=23" , # For building the pip package.
120- "pyyaml" , # Imported by the kernel codegen tools.
121- "setuptools>=63" , # For building the pip package.
122- "tomli" , # Imported by extract_sources.py when using python < 3.11.
123- "wheel" , # For building the pip package archive.
124- "zstd" , # Imported by resolve_buck.py.
125- "ai-edge-model-explorer>=0.1.16" , # For visualizing ExportedPrograms
126108 ]
127109
128110 # Assemble the list of requirements to actually install.
129111 # TODO: Add options for reducing the number of requirements.
130112 REQUIREMENTS_TO_INSTALL = (
131- EXIR_REQUIREMENTS + DEVEL_REQUIREMENTS + EXAMPLES_REQUIREMENTS
113+ EXIR_REQUIREMENTS + EXAMPLES_REQUIREMENTS
132114 )
133115
134116 # Install the requirements. `--extra-index-url` tells pip to look for package
@@ -139,6 +121,10 @@ def install_requirements(use_pytorch_nightly):
139121 "-m" ,
140122 "pip" ,
141123 "install" ,
124+ "-r" ,
125+ "requirements-dev.txt" ,
126+ "-r" ,
127+ "requirements-examples.txt" ,
142128 * REQUIREMENTS_TO_INSTALL ,
143129 "--extra-index-url" ,
144130 TORCH_NIGHTLY_URL ,
@@ -158,6 +144,8 @@ def install_requirements(use_pytorch_nightly):
158144 "-m" ,
159145 "pip" ,
160146 "install" ,
147+ # Without --no-build-isolation, setup.py can't find the torch module.
148+ "--no-build-isolation" ,
161149 * LOCAL_REQUIREMENTS ,
162150 ],
163151 check = True ,
0 commit comments