From f9a2837610d9d868964eca54c0e47a7e1e0b3991 Mon Sep 17 00:00:00 2001 From: Akashdeep Dhar Date: May 09 2021 16:21:29 +0000 Subject: Reworked installation method for CUDA repo compatibility Signed-off-by: Akashdeep Dhar --- diff --git a/src/nvautoinstall/MainFunction.py b/src/nvautoinstall/MainFunction.py index 01409da..08444d0 100644 --- a/src/nvautoinstall/MainFunction.py +++ b/src/nvautoinstall/MainFunction.py @@ -146,6 +146,10 @@ class CollPlCudaInstaller(object): exec_status_code = os.system("dnf install -y xorg-x11-drv-nvidia-cuda") return exec_status_code == 0 + def stop(self): + exec_status_code = os.system("dnf module disable -y nvidia-driver") + return exec_status_code == 0 + def main(self): exec_status_code = os.system("dnf install -y cuda") return exec_status_code == 0 @@ -321,6 +325,11 @@ class InstallationMode(object): DecoratorObject.section_heading("REFRESHING REPOSITORY LIST...") if PlCudaInstaller.rpup(): DecoratorObject.success_message("Repositories have been refreshed") + DecoratorObject.section_heading("DISABLING NVIDIA DRIVER MODULE...") + if PlCudaInstaller.stop(): + DecoratorObject.success_message("NVIDIA DRIVER module has been disabled") + else: + DecoratorObject.failure_message("NVIDIA DRIVER module could not be disabled") else: DecoratorObject.failure_message("Repositories could not be refreshed") else: