pub struct MigraphxInstaller { /* private fields */ }Expand description
The MIGraphX installer.
Implementations§
Source§impl MigraphxInstaller
impl MigraphxInstaller
Sourcepub fn new(config: MigraphxConfig) -> Self
pub fn new(config: MigraphxConfig) -> Self
Create a new MIGraphX installer with the given config.
Sourcepub fn with_defaults() -> Self
pub fn with_defaults() -> Self
Create with default config.
Sourcepub fn required_packages(&self, distro: &DistroFacade) -> Vec<&str>
pub fn required_packages(&self, distro: &DistroFacade) -> Vec<&str>
Get the required system packages for the given distro.
Sourcepub fn optional_packages(&self, distro: &DistroFacade) -> Vec<&str>
pub fn optional_packages(&self, distro: &DistroFacade) -> Vec<&str>
Get the optional system packages for the given distro.
Sourcepub fn build_package_install_command(
&self,
distro: &DistroFacade,
packages: &[&str],
) -> ShellCommand
pub fn build_package_install_command( &self, distro: &DistroFacade, packages: &[&str], ) -> ShellCommand
Construct the package install command for the given distro.
Sourcepub fn build_package_update_command(
&self,
distro: &DistroFacade,
) -> ShellCommand
pub fn build_package_update_command( &self, distro: &DistroFacade, ) -> ShellCommand
Construct the package update command for the given distro.
Sourcepub fn build_pip_install_command(&self) -> ShellCommand
pub fn build_pip_install_command(&self) -> ShellCommand
Construct the pip install command for MIGraphX Python bindings.
The original script installs system packages and verifies Python import. The pip install is from the ROCm Python path.
Note: On Arch-family distros, this command should NOT be executed
because the migraphx pip wheel is not available. Use
is_available_on_distro() to check first.
Sourcepub fn is_available_on_distro(&self, distro: &DistroFacade) -> MigraphxSupport
pub fn is_available_on_distro(&self, distro: &DistroFacade) -> MigraphxSupport
Check the level of MIGraphX support on the given distro.
- Debian/Ubuntu: Full support (system packages + Python bindings).
- Arch/CachyOS: System-only support (
migraphxpackage available, but nopython3-migraphxor pip wheel). - Others: Assumed full support (will attempt standard install).
Sourcepub fn build_limitation_message(&self, distro: &DistroFacade) -> Option<String>
pub fn build_limitation_message(&self, distro: &DistroFacade) -> Option<String>
Build a human-readable message explaining MIGraphX limitations on the
given distro. Returns None if there are no limitations (full support).
Sourcepub fn should_skip_pip_install(&self, distro: &DistroFacade) -> bool
pub fn should_skip_pip_install(&self, distro: &DistroFacade) -> bool
Check whether the pip install step should be skipped on this distro.
On Arch-family distros, the migraphx pip wheel does not exist and
attempting to install it will fail. This method returns true for
those distros so the caller can skip the pip step gracefully.
Auto Trait Implementations§
impl Freeze for MigraphxInstaller
impl RefUnwindSafe for MigraphxInstaller
impl Send for MigraphxInstaller
impl Sync for MigraphxInstaller
impl Unpin for MigraphxInstaller
impl UnsafeUnpin for MigraphxInstaller
impl UnwindSafe for MigraphxInstaller
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more