pub struct AmdgpuInstaller { /* private fields */ }Expand description
The AMDGPU drivers installer.
Implementations§
Source§impl AmdgpuInstaller
impl AmdgpuInstaller
Sourcepub fn new(config: AmdgpuConfig) -> Self
pub fn new(config: AmdgpuConfig) -> Self
Create a new AMDGPU drivers 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 rocm_packages(&self, _distro: &DistroFacade) -> Vec<&str>
pub fn rocm_packages(&self, _distro: &DistroFacade) -> Vec<&str>
Get the ROCm 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.
The original script uses:
- apt:
sudo apt install -y <packages> - dnf:
sudo dnf install -y <packages> - pacman:
sudo pacman -S --noconfirm <packages> - zypper:
sudo zypper install -y <packages>
Sourcepub fn build_amdgpu_install_deb_commands(
&self,
codename: &str,
) -> Vec<ShellCommand>
pub fn build_amdgpu_install_deb_commands( &self, codename: &str, ) -> Vec<ShellCommand>
Construct the apt-specific download and install command for amdgpu-install.
The original script (Ubuntu-specific):
wget https://repo.radeon.com/amdgpu-install/7.2.4/ubuntu/$CODENAME/amdgpu-install_7.2.4.70204-1_all.debsudo apt install -y ./amdgpu-install_7.2.4.70204-1_all.debsudo apt updatesudo apt install -y linux-headers-$(uname -r) linux-modules-extra-$(uname -r)sudo apt install -y amdgpu-dkms
Sourcepub fn build_env_setup_commands(&self, gpu_arch: &str) -> Vec<ShellCommand>
pub fn build_env_setup_commands(&self, gpu_arch: &str) -> Vec<ShellCommand>
Construct environment variable setup commands.
Sourcepub fn build_verify_command(&self) -> ShellCommand
pub fn build_verify_command(&self) -> ShellCommand
Construct the verification command.
Auto Trait Implementations§
impl Freeze for AmdgpuInstaller
impl RefUnwindSafe for AmdgpuInstaller
impl Send for AmdgpuInstaller
impl Sync for AmdgpuInstaller
impl Unpin for AmdgpuInstaller
impl UnsafeUnpin for AmdgpuInstaller
impl UnwindSafe for AmdgpuInstaller
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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