Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions StabilityMatrix.Core/Python/UvVenvRunner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -577,12 +577,14 @@ public void RunDetached(
// Disable pip caching - uses significant memory for large packages like torch
// env["PIP_NO_CACHE_DIR"] = "true";

// Add bundled uv to PATH so package launch scripts can invoke `uv`
var uvFolder = GlobalConfig.LibraryDir.JoinDir("Assets", "uv");

// On windows, add portable git to PATH and binary as GIT
if (Compat.IsWindows)
{
var portableGitBin = GlobalConfig.LibraryDir.JoinDir("PortableGit", "bin");
var venvBin = RootPath.JoinDir(RelativeBinPath);
var uvFolder = GlobalConfig.LibraryDir.JoinDir("Assets", "uv");
if (env.TryGetValue("PATH", out var pathValue))
{
env = env.SetItem(
Expand All @@ -600,11 +602,11 @@ public void RunDetached(
{
if (env.TryGetValue("PATH", out var pathValue))
{
env = env.SetItem("PATH", Compat.GetEnvPathWithExtensions(pathValue));
env = env.SetItem("PATH", Compat.GetEnvPathWithExtensions(uvFolder, pathValue));
}
else
{
env = env.SetItem("PATH", Compat.GetEnvPathWithExtensions());
env = env.SetItem("PATH", Compat.GetEnvPathWithExtensions(uvFolder));
}
}

Expand Down
Loading