diff --git a/data_gpu/driver/README.md b/data_gpu/driver/README.md index 002715e..8ed891d 100644 --- a/data_gpu/driver/README.md +++ b/data_gpu/driver/README.md @@ -1,18 +1,14 @@ # GPU Enabled Driver -To build this driver you need to have the NVIDA Open GPU Kernel Modules installed. This driver will not compile gainst the CUDA toolkit drivers. +To build this driver you need to have the NVIDA Open GPU Kernel Modules installed. This driver will not compile against the CUDA toolkit drivers. https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html See section 5. -A script in this directory 'comp_and_load_drivers.sh' is provided to compile and load the nvidia drivers as well as the driver in this directory. Edit this file and update the NVIDIA_PATH value at the top to the install directory for the nvidia drivers. + -```bash -$ sudo apt-get install nvidia-kernel-source-545-open -$ sudo apt-get install nvidia-cuda-toolkit -$ sudo ./comp_and_load_drivers.sh -``` +# System Configurations Disable the Xserver and nvidia-persistenced to prevent rmmod due to Module XXX is in use by: YYY because the Nvidia driver gets loaded by default at startup @@ -25,3 +21,34 @@ $ sudo systemctl disable lightdm # For LightDM $ sudo systemctl disable sddm # For SDDM $ sudo systemctl disable nvidia-persistenced ``` + +Add the nvida cuda package for nvidia-545.23.08 and install the cuda toolkit: + +```bash +$ wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.0-1_all.deb +$ sudo dpkg -i cuda-keyring_1.0-1_all.deb +$ sudo apt update +$ sudo apt install nvidia-kernel-source-545 # Tested with nvidia-545.23.08 +$ sudo apt install nvidia-cuda-toolkit +``` + +Add `iommu=off nouveau.modeset=0 rd.driver.blacklist=nouveau` GRUB_CMDLINE_LINUX: + +```bash +$ sudo nano /etc/default/grub + GRUB_CMDLINE_LINUX="iommu=off nouveau.modeset=0 rd.driver.blacklist=nouveau" +$ sudo update-grub +$ sudo reboot +``` + + + +# How to build and load the nvidia and datagpu drviers + +After you completed all the "System Configuration" configuration steps above, run the following script to build and load the nvidia and datagpu drviers + +```bash +$ sudo ./comp_and_load_drivers.sh +``` + + diff --git a/data_gpu/driver/comp_and_load_drivers.sh b/data_gpu/driver/comp_and_load_drivers.sh index 9bc365e..b5dbe91 100755 --- a/data_gpu/driver/comp_and_load_drivers.sh +++ b/data_gpu/driver/comp_and_load_drivers.sh @@ -74,6 +74,8 @@ fi # Go to nvidia path and build Nvidia driver cd "$RET_DIR" || { echo "Error: Failed to change directory to $RET_DIR"; exit 1; } +# Clean previous builds +make clean +# Build datagpu driver make CC=$CC NVIDIA_DRIVERS=$NVIDIA_PATH /usr/sbin/insmod $RET_DIR/datagpu.ko || { echo "Error: Failed to insert datagpu.ko."; exit 1; } -