Skip to content

Commit

Permalink
backing up state
Browse files Browse the repository at this point in the history
  • Loading branch information
ruck314 committed Jul 22, 2024
1 parent 15aa096 commit 3426515
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 8 deletions.
41 changes: 34 additions & 7 deletions data_gpu/driver/README.md
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
```

<!--- ######################################################## -->
4 changes: 3 additions & 1 deletion data_gpu/driver/comp_and_load_drivers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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; }

0 comments on commit 3426515

Please sign in to comment.