| 585 | } |
| 586 | |
| 587 | bool PackageManager::install_async_raw(const std::string& package, |
| 588 | UvRunner::RawOutputCallback on_output, |
| 589 | UvRunner::CompletionCallback on_complete) { |
| 590 | if (!ensure_venv()) |
| 591 | return false; |
| 592 | |
| 593 | if (!m_runner) { |
| 594 | m_runner = std::make_unique<UvRunner>(); |
| 595 | } |
| 596 | |
| 597 | if (m_runner->is_running()) { |
| 598 | LOG_ERROR("Another UV operation is already running"); |
| 599 | return false; |
| 600 | } |
| 601 | |
| 602 | LOG_INFO("Installing {} (async raw)", package); |
| 603 | |
| 604 | m_runner->set_raw_output_callback(std::move(on_output)); |
| 605 | m_runner->set_completion_callback(std::move(on_complete)); |
| 606 | |
| 607 | return m_runner->start({"pip", "install", package, "--python", lfs::core::path_to_utf8(venv_python())}); |
| 608 | } |
| 609 | |
| 610 | bool PackageManager::install_torch_async_raw(const std::string& cuda_version, |
| 611 | const std::string& torch_version, |
no test coverage detected