File tree Expand file tree Collapse file tree
StabilityMatrix.Core/Models/Packages Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -226,7 +226,7 @@ torchIndex is TorchIndex.Cuda
226226 // 1. Configure the entire install process declaratively.
227227 var config = new PipInstallConfig
228228 {
229- RequirementsFilePaths = [ "requirements_versions.txt" , "setuptools<82" ] ,
229+ RequirementsFilePaths = [ "requirements_versions.txt" ] ,
230230 TorchVersion = torchIndex == TorchIndex . Mps ? "==2.3.1" : ( isBlackwell ? "" : "==2.1.2" ) ,
231231 TorchvisionVersion = torchIndex == TorchIndex . Mps ? "==0.18.1" : ( isBlackwell ? "" : "==0.16.2" ) ,
232232 XformersVersion = isBlackwell ? " " : "==0.0.23.post1" ,
@@ -235,7 +235,6 @@ torchIndex is TorchIndex.Cuda
235235 ExtraPipArgs =
236236 [
237237 "https://github.com/openai/CLIP/archive/d50d76daa670286dd6cacf3bcd80b5e4823fc8e1.zip" ,
238- "setuptools<82" ,
239238 ] ,
240239 } ;
241240
Original file line number Diff line number Diff line change @@ -235,6 +235,14 @@ await PyInstallationManager.GetInstallationAsync(pythonVersion.Value).ConfigureA
235235 await venvRunner . Setup ( true , onConsoleOutput ) . ConfigureAwait ( false ) ;
236236 }
237237
238+ // Constrain setuptools<82 in uv's isolated build environments.
239+ // setuptools 82+ removed pkg_resources, breaking source builds that import it.
240+ var buildConstraintsPath = Path . Combine ( installedPackagePath , venvName , "uv-build-constraints.txt" ) ;
241+ await File . WriteAllTextAsync ( buildConstraintsPath , "setuptools<82\n " ) . ConfigureAwait ( false ) ;
242+ venvRunner . UpdateEnvironmentVariables ( env =>
243+ env . SetItem ( "UV_BUILD_CONSTRAINT" , buildConstraintsPath )
244+ ) ;
245+
238246 // ensure pip is installed
239247 await venvRunner . PipInstall ( "pip" , onConsoleOutput ) . ConfigureAwait ( false ) ;
240248
Original file line number Diff line number Diff line change @@ -185,11 +185,9 @@ public override async Task InstallPackage(
185185 torchIndex is TorchIndex . Cuda
186186 && ( SettingsManager . Settings . PreferredGpu ? . IsBlackwellGpu ( ) ?? HardwareHelper . HasBlackwellGpu ( ) ) ;
187187
188- var isAmd = torchIndex is TorchIndex . Rocm ;
189-
190188 var config = new PipInstallConfig
191189 {
192- PrePipInstallArgs = [ "joblib" , "setuptools<82" ] ,
190+ PrePipInstallArgs = [ "joblib" ] ,
193191 RequirementsFilePaths = requirementsPaths ,
194192 TorchVersion = "" ,
195193 TorchvisionVersion = "" ,
@@ -199,7 +197,7 @@ torchIndex is TorchIndex.Cuda
199197 [
200198 "https://github.com/openai/CLIP/archive/d50d76daa670286dd6cacf3bcd80b5e4823fc8e1.zip" ,
201199 ] ,
202- PostInstallPipArgs = [ "numpy==1.26.4" , "setuptools<82" ] ,
200+ PostInstallPipArgs = [ "numpy==1.26.4" ] ,
203201 } ;
204202
205203 await StandardPipInstallProcessAsync (
You can’t perform that action at this time.
0 commit comments