Skip to content

Commit 94bb64d

Browse files
committed
Update uv and try to mitigate some sporadic failures
Problems were; * timeouts when downloading from nvidias pypi * I/O operation failed during extraction
1 parent dcaf1e4 commit 94bb64d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ai_diffusion/server.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,14 +204,17 @@ def _pip_install(self, name: str, args: list[str], cb: InternalCB):
204204
env = None
205205
if self._uv_cmd is not None:
206206
env = {"VIRTUAL_ENV": str(self.path / "venv")}
207+
if is_linux: # Restrict concurrency to improve robustness #2232 #2201
208+
env["UV_CONCURRENT_DOWNLOADS"] = "2"
209+
env["UV_CONCURRENT_INSTALLS"] = "2"
207210
cmd = [self._uv_cmd, "pip", "install", *args]
208211
else:
209212
cmd = [self._python_cmd, "-su", "-m", "pip", "install", *args]
210213
return _execute_process(name, cmd, self.path, cb, env=env)
211214

212215
async def _install_uv(self, network: QNetworkAccessManager, cb: InternalCB):
213216
script_ext = ".ps1" if is_windows else ".sh"
214-
url = f"https://astral.sh/uv/0.8.12/install{script_ext}"
217+
url = f"https://astral.sh/uv/0.9.26/install{script_ext}"
215218
script_path = self._cache_dir / f"install_uv{script_ext}"
216219
await _download_cached("Python", network, url, script_path, cb)
217220

0 commit comments

Comments
 (0)