File tree Expand file tree Collapse file tree 1 file changed +22
-2
lines changed Expand file tree Collapse file tree 1 file changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -303,11 +303,30 @@ _get_module_params() {
303303 fi
304304}
305305
306- # Load the kernel modules and start persistenced.
307- _load_driver () {
306+ _create_module_params_drop-in () {
308307 echo " Parsing kernel module parameters..."
309308 _get_module_params
310309
310+ if [ ${# NVIDIA_MODULE_PARAMS[@]} -gt 0 ]; then
311+ echo " Configuring nvidia module parameters in /etc/modprobe.d/nvidia.conf"
312+ echo " options nvidia ${NVIDIA_MODULE_PARAMS[@]} " > /etc/modprobe.d/nvidia.conf
313+ fi
314+ if [ ${# NVIDIA_UVM_MODULE_PARAMS[@]} -gt 0 ]; then
315+ echo " Configuring nvidia-uvm module parameters in /etc/modprobe.d/nvidia-uvm.conf"
316+ echo " options nvidia-uvm ${NVIDIA_UVM_MODULE_PARAMS[@]} " > /etc/modprobe.d/nvidia-uvm.conf
317+ fi
318+ if [ ${# NVIDIA_MODESET_MODULE_PARAMS[@]} -gt 0 ]; then
319+ echo " Configuring nvidia-modeset module parameters in /etc/modprobe.d/nvidia-modeset.conf"
320+ echo " options nvidia-modeset ${NVIDIA_MODESET_MODULE_PARAMS[@]} " > /etc/modprobe.d/nvidia-modeset.conf
321+ fi
322+ if [ ${# NVIDIA_PEERMEM_MODULE_PARAMS[@]} -gt 0 ]; then
323+ echo " Configuring nvidia-peermem module parameters in /etc/modprobe.d/nvidia-peermem.conf"
324+ echo " options nvidia-peermem ${NVIDIA_PEERMEM_MODULE_PARAMS[@]} " > /etc/modprobe.d/nvidia-peermem.conf
325+ fi
326+ }
327+
328+ # Load the kernel modules and start persistenced.
329+ _load_driver () {
311330 local nv_fw_search_path=" $RUN_DIR /driver/lib/firmware"
312331 local set_fw_path=" true"
313332 local fw_path_config_file=" /sys/module/firmware_class/parameters/path"
@@ -678,6 +697,7 @@ init() {
678697 # _cleanup_package_cache
679698 fi
680699
700+ _create_module_params_drop-in
681701 _install_driver
682702 _load_driver || exit 1
683703 _mount_rootfs
You can’t perform that action at this time.
0 commit comments