#!/bin/bash
/sbin/modprobe nvidia-uvm

if [ "$?" -eq 0 ]; then
  # Find out the major device number used by the nvidia-uvm driver
  mknod -m 666 /dev/nvidia-uvm c $(grep nvidia-uvm /proc/devices | awk '{print $1}') 0
fi

#!/bin/bash
/sbin/modprobe nvidia-uvm

if [ "$?" -eq 0 ]; then
  # Find out the major device number used by the nvidia-uvm driver
  mknod -m 666 /dev/nvidia-uvm c $(grep nvidia-uvm /proc/devices | awk '{print $1}') 0
fi

# Enable persistence mode
nvidia-smi -pm 1

Enable GPU persistence mode when initializing GPU drivers.
Enable GPU persistence mode when initializing GPU drivers.
