架构师_程序员_码农网

 找回密码
 注册[Register]

QQ登录

只需一步,快速开始

搜索
查看: 249|回复: 3

Ubuntu 24.04 显卡 A10 安装 NVIDIA 驱动

[复制链接]
发表于 2025-3-5 17:57:59 | 显示全部楼层 |阅读模式
需求:从阿里云购买了一台 GPU 服务器,配置是 A10 双卡,在创建实例的时候可以勾选“安装 GPU 驱动”选项,我想自己安装,属于没苦硬吃。

实例规格:GPU 计算型 gn7i / ecs.gn7i-c32g1.16xlarge (64 vCPU 376 GiB)
系统:Ubuntu 24.04 64位(安全加固)

GPU 规格:https://help.aliyun.com/zh/egs/gpu-accelerated-compute-optimized-instance-families

安装 NVIDIA 驱动

打开官网根据显卡型号搜索驱动进行下载,以 A10 为例,如下图:

QQ截图20250305164337.jpg QQ截图20250305164404.jpg

驱动下载:https://www.nvidia.com/en-us/drivers/

登录到服务器,执行如下命令安装:

QQ截图20250305164923.jpg

选择“NVIDIA Proprietary”即可,区别如下:

NVIDIA Proprietary:

许可类型: 专有软件(Proprietary Software)
特点: NVIDIA 自己开发和维护,代码不公开,用户不能查看或修改源代码。
优点: 通常性能更优,支持最新的硬件功能,提供更好的优化和稳定性。
缺点: 依赖于 NVIDIA 的更新和支持,可能不如开源驱动透明。

MIT/GPL:

许可类型: 开源软件(Open Source Software),遵循 MIT 许可证或 GNU 通用公共许可证(GPL)。
特点: 代码完全公开,用户可以查看、修改和分发。
优点: 更加透明,社区支持广泛,适合那些希望深入了解或修改驱动程序的人。
缺点: 性能可能不如专有驱动,某些高级功能可能不受支持。

之后会有一些警告,继续即可。警告如下:

WARNING: nvidia-installer was forced to guess the X library path '/usr/lib' and X module path '/usr/lib/xorg/modules'; these paths were not queryable from the system.  If X fails to find the NVIDIA X driver module, please install the `pkg-config` utility and the X.Org SDK/development package for your distribution and reinstall the driver.

WARNING: Unable to find a suitable destination to install 32-bit compatibility libraries. Your system may not be set up for 32-bit compatibility. 32-bit compatibility files will not be installed; if you wish to install them, re-run the installation and set a valid directory with the --compat32-libdir option.

WARNING: This NVIDIA driver package includes Vulkan components, but no Vulkan ICD loader was detected on this system. The NVIDIA Vulkan ICD will not function without the loader. Most distributions package the Vulkan loader; try installing the "vulkan-loader", "vulkan-icd-loader", or "libvulkan1" package.

查看驱动信息:


这里的 CUDA 版本指的是安装 CUDA Toolkit 也需要为 12.8 版本
QQ截图20250305165519.jpg

安装 CUDA Toolkit

下载地址:https://developer.nvidia.com/cuda-downloads,如下图:

QQ截图20250305153530.jpg

安装命令:


查看版本命令:


QQ截图20250305211314.jpg

安装 cuDNN

下载地址:https://developer.nvidia.com/cudnn-downloads,如下图:

QQ截图20250305153541.jpg

安装命令如下:


查看版本:


QQ截图20250305175545.jpg

备注:不建议从中文官网搜索驱动,因为更新不及时,可能会落后几个小版本!!!!!建议直接从英文官方搜索!

参考:

https://docs.nvidia.com/datacenter/tesla/driver-installation-guide/index.html
https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html
https://docs.nvidia.com/deeplearning/cudnn/installation/latest/linux.html
https://developer.nvidia.com/zh-cn/blog/nvidia-transitions-fully-towards-open-source-gpu-kernel-modules/




上一篇:前端埋点监控跟踪之 navigator.sendBeacon() 方法
下一篇:家庭网络入手 GL-MT3000 路由器
码农网,只发表在实践过程中,遇到的技术难题,不误导他人。
 楼主| 发表于 2025-3-5 20:55:41 | 显示全部楼层
This program will install the NVIDIA Accelerated Graphics Driver
for Linux-x86_64 570.124.06 by unpacking the embedded tarball and
executing the ./nvidia-installer  installation utility.

--info
  Print embedded info (title, default target directory) and exit.

--lsm
  Print embedded lsm entry (or no LSM) and exit.

--pkg-history
  Print the package history of this file and exit.

--list
  Print the list of files in the archive and exit.

--check
  Check integrity of the archive and exit.

-x, --extract-only
  Extract the contents of NVIDIA-Linux-x86_64-570.124.06.run, but do not
  run 'nvidia-installer'.

--add-this-kernel
  Build a precompiled kernel interface for the currently running
  kernel and repackage the .run file to include this newly built
  precompiled kernel interface.  The new .run file will be placed
  in the current directory and the string "-custom" appended
  to its name, unless already present, to distinguish it from the
  original .run file.

--apply-patch [Patch]
  Apply the patch 'Patch' to the kernel interface files included
  in the .run file, remove any precompiled kernel interfaces
  and then repackage the .run file.  The new .run file will be
  placed in the current directory and the string "-custom"
  appended to its name, unless already present, to distinguish it
  from the original .run file.

--keep
  Do not delete target directory when done.

--target [NewDirectory]
  Extract contents in 'NewDirectory'

--extract-decompress
  Extract the embedded decompression program to stdout


The following arguments will be passed on to the ./nvidia-installer
utility:

COMMON OPTIONS:

  -v, --version
      Print the nvidia-installer version and exit.

  -h, --help
      Print usage information for the common commandline options and exit.

  -A, --advanced-options
      Print usage information for the common commandline options as well as the advanced options, and then exit.


ADVANCED OPTIONS:

  -v, --version
      Print the nvidia-installer version and exit.

  -h, --help
      Print usage information for the common commandline options and exit.

  -A, --advanced-options
      Print usage information for the common commandline options as well as the advanced options, and then exit.

  -a, --accept-license
      This option is obsolete and ignored by nvidia-installer.  It is provided for compatibility with older versions of nvidia-installer, which required this option for explicit license acceptance. Use of the NVIDIA driver implies acceptance of the NVIDIA Software License Agreement, contained in the file 'LICENSE' (in the top level directory of the driver package).

  -i, --driver-info
      Print information about the currently installed NVIDIA driver version.

  --uninstall
      Uninstall the currently installed NVIDIA driver.

  --skip-module-unload
      When uninstalling the driver, skip unloading of the NVIDIA kernel module. This option is ignored when the driver is being installed.

  --skip-module-load
      Skip the test load of the NVIDIA kernel modules after the modules are built, and skip loading them after installation is complete.

  --sanity
      Perform basic sanity tests on an existing NVIDIA driver installation.

  -e, --expert
      Enable 'expert' installation mode; more detailed questions will be asked, and more verbose output will be printed; intended for expert users.  The questions may be suppressed with the '--no-questions' commandline option.

  -q, --no-questions
      Do not ask any questions; the default (normally 'yes') is assumed for all yes/no questions, and the default string is assumed in any situation where the user is prompted for string input.

  -s, --silent
      Run silently; no questions are asked and no output is printed, except for error messages to stderr.  This option implies '--ui=none --no-questions'.

  --x-prefix=X-PREFIX
      The prefix under which the X components of the NVIDIA driver will be installed; the default is '/usr/X11R6' unless nvidia-installer detects that X.Org >= 7.0 is installed, in which case the default is '/usr'.  Only under rare circumstances should this option be used.

  --xfree86-prefix=XFREE86-PREFIX
      This is a deprecated synonym for --x-prefix.

  --x-module-path=X-MODULE-PATH
      The path under which the NVIDIA X server modules will be installed.  If this option is not specified, nvidia-installer uses the following search order and selects the first valid directory it finds: 1) `X -showDefaultModulePath`, 2) `pkg-config --variable=moduledir xorg-server`, or 3) the X library path (see the '--x-library-path' option) plus either 'modules' (for X servers older than X.Org 7.0) or 'xorg/modules' (for X.Org 7.0 or later).

  --x-library-path=X-LIBRARY-PATH
      The path under which the NVIDIA X libraries will be installed.  If this option is not specified, nvidia-installer uses the following search order and selects the first valid directory it finds: 1) `X -showDefaultLibPath`, 2) `pkg-config --variable=libdir xorg-server`, or 3) the X prefix (see the '--x-prefix' option) plus 'lib' on 32bit systems, and either 'lib64' or 'lib' on 64bit systems, depending on the installed Linux distribution.

  --x-sysconfig-path=X-SYSCONFIG-PATH
      The path under which X system configuration files will be installed.  If this option is not specified, nvidia-installer uses the following search order and selects the first valid directory it finds: 1) `pkg-config --variable=sysconfigdir xorg-server`, or 2) /usr/share/X11/xorg.conf.d.

  --opengl-prefix=OPENGL-PREFIX
      The prefix under which the OpenGL components of the NVIDIA driver will be installed; the default is: '/usr'.  Only under rare circumstances should this option be used.  The Linux OpenGL ABI (http://oss.sgi.com/projects/ogl-sample/ABI/) mandates this default value.

  --opengl-libdir=OPENGL-LIBDIR
      The path relative to the OpenGL library installation prefix under which the NVIDIA OpenGL components will be installed.  The default is 'lib' on 32bit systems, and 'lib64' or 'lib' on 64bit systems, depending on the installed Linux distribution.  Only under very rare circumstances should this option be used.

  --wine-prefix=WINE-PREFIX
      The prefix under which Wine components of the NVIDIA driver will be installed.  The default is '/usr'.

  --wine-libdir=WINE-LIBDIR
      The path relative to the Wine installation prefix under which Wine components of the NVIDIA driver will be installed.  The default is '<opengl-libdir>/nvidia/wine', where <opengl-libdir> is the path determined for --opengl-libdir above.

  --installer-prefix=INSTALLER-PREFIX
      The prefix under which the installer binary will be installed; the default is: '/usr'.  Note: please use the '--utility-prefix' option instead.

  --utility-prefix=UTILITY-PREFIX
      The prefix under which the NVIDIA utilities (nvidia-installer, nvidia-settings, nvidia-xconfig, nvidia-bug-report.sh) and the NVIDIA utility libraries will be installed; the default is: '/usr'.

  --utility-libdir=UTILITY-LIBDIR
      The path relative to the utility installation prefix under which the NVIDIA utility libraries will be installed.  The default is 'lib' on 32bit systems, and 'lib64' or 'lib' on 64bit systems, depending on the installed Linux distribution.

  --xdg-data-dir=XDG-DATA-DIR
      The prefix under which XDG data files (such as application .desktop files and icons) will be installed.  The default is '/usr/share'.

  --gbm-backend-dir=GBM-BACKEND-DIR
      The path relative to the OpenGL library installation prefix under which the NVIDIA GBM backend library will be installed.  The default is '<libdir>/gbm', where '<libdir>' is 'lib64' or 'lib', depending on the installed Linux distribution.  Only under very rare circumstances should this option be used.

  --gbm-backend-dir32=GBM-BACKEND-DIR32
      The path relative to the 32-bit OpenGL library installation prefix under which the 32-bit NVIDIA GBM backend library will be installed.  The default is '<libdir>/gbm', where <libdir>' is 'lib' or 'lib32', depending on the installed Linux distribution.  Only under very rare circumstances should this option be used.

  --documentation-prefix=DOCUMENTATION-PREFIX
      The prefix under which the documentation files for the NVIDIA driver will be installed.  The default is: '/usr'.

  --application-profile-path=APPLICATION-PROFILE-PATH
      The directory under which default application profiles for the NVIDIA driver will be installed. The default is: '/usr/share/nvidia'.

  --kernel-include-path=KERNEL-INCLUDE-PATH
      The directory containing the kernel include files that should be used when compiling the NVIDIA kernel module.  This option is deprecated; please use '--kernel-source-path' instead.

  --kernel-source-path=KERNEL-SOURCE-PATH
      The directory containing the kernel source files that should be used when compiling the NVIDIA kernel module.  When not specified, the installer will use '/lib/modules/`uname -r`/build', if that directory exists.  Otherwise, it will use '/usr/src/linux'.

  --kernel-output-path=KERNEL-OUTPUT-PATH
      The directory containing any KBUILD output files if either one of the 'KBUILD_OUTPUT' or 'O' parameters were passed to KBUILD when building the kernel image/modules.  When not specified, the installer will assume that no separate output directory was used.

  --kernel-install-path=KERNEL-INSTALL-PATH
      The directory in which the NVIDIA kernel module should be installed.  The default value is either '/lib/modules/`uname -r`/kernel/drivers/video' (if '/lib/modules/`uname -r`/kernel' exists) or '/lib/modules/`uname -r`/video'.

  --proc-mount-point=PROC-MOUNT-POINT
      The mount point for the proc file system; if not specified, then this value defaults to '/proc' (which is normally correct).  The mount point of the proc filesystem is needed because the contents of '<proc filesystem>/version' is used when identifying if a precompiled kernel interface is available for the currently running kernel.  This option should only be needed in very rare circumstances.

  --log-file-name=LOG-FILE-NAME
      File name of the installation log file (the default is: '/var/log/nvidia-installer.log').

  --tmpdir=TMPDIR
      Use the specified directory as a temporary directory when generating transient files used by the installer; if not given, then the following list will be searched, and the first one that exists will be used: $TMPDIR, /tmp, ., $HOME.

  --ui=UI
      Specify what user interface to use, if available.  Valid values for UI are 'ncurses' (the default) or 'none'. If the ncurses interface fails to initialize, or 'none' is specified, then a simple printf/scanf interface will be used.

  -c, --no-ncurses-color
      Disable use of color in the ncurses user interface.

  --no-nvidia-modprobe
      Skip installation of 'nvidia-modprobe', a setuid root utility which nvidia-installer installs by default.  nvidia-modprobe can be used by user-space NVIDIA driver components to load the NVIDIA kernel module, create the NVIDIA device files, and configure certain runtime settings in the kernel when those components run without sufficient privileges to do so on their own, e.g., the CUDA driver run within the permissions of a non-privileged user.  This utility is only needed if other means of performing these privileged operations are unavailable. See the nvidia-modprobe(1) man page for full details on the tasks performed by this utility.

  -k KERNEL-NAME, --kernel-name=KERNEL-NAME
      Build and install the NVIDIA kernel module for the non-running kernel specified by KERNEL-NAME (KERNEL-NAME should be the output of `uname -r` when the target kernel is actually running).  This option implies '--no-precompiled-interface'.  If the options '--kernel-install-path' and '--kernel-source-path' are not given, then they will be inferred from KERNEL-NAME; eg: '/lib/modules/KERNEL-NAME/kernel/drivers/video/' and '/lib/modules/KERNEL-NAME/build/', respectively.

  -n, --no-precompiled-interface
      Disable use of precompiled kernel interfaces.

  --no-abi-note
      The NVIDIA OpenGL libraries contain an OS ABI note tag, which identifies the minimum kernel version needed to use the library.  This option causes the installer to remove this note from the OpenGL libraries during installation.

  --no-rpms
      Normally, the installer will check for several rpms that conflict with the driver (specifically: NVIDIA_GLX and NVIDIA_kernel), and remove them if present.  This option disables this check.

  -b, --no-backup
      During driver installation, conflicting files are backed up, so that they can be restored when the driver is uninstalled.  This option causes the installer to simply delete conflicting files, rather than back them up.

  -r, --no-recursion
      Normally, nvidia-installer will recursively search for potentially conflicting libraries under the default OpenGL and X server installation locations.  With this option set, the installer will only search in the top-level directories.

  -K, --kernel-modules-only
      Install the kernel modules only, and do not uninstall the existing driver.  This is intended to be used to install kernel modules for additional kernels (in cases where you might boot between several different kernels).  To use this option, you must already have a driver installed, and the version of the installed driver must match the version of these kernel modules.

  --no-kernel-modules
      Install everything but the kernel modules, and do not remove any existing, possibly conflicting, kernel modules.  This can be useful in some debug environments, or when installing the open kernel modules from source.  If you use this option, you must be careful to ensure that NVIDIA kernel modules matching this driver version are installed separately.

  --no-x-check
      Do not abort the installation if nvidia-installer detects that an X server is running.  Only under very rare circumstances should this option be used.

  --precompiled-kernel-interfaces-path=PRECOMPILED-KERNEL-INTERFACES-PATH
      Before searching for a precompiled kernel interface in the .run file, search in the specified directory.

  -z, --no-nouveau-check
      Normally, nvidia-installer aborts installation if the nouveau kernel driver is in use.  Use this option to disable this check.

  -Z, --disable-nouveau, --no-disable-nouveau
      nvidia-installer will attempt to disable the nouveau kernel driver by default, if it is in use during installation. Use '--no-disable-nouveau to prevent nvidia-installer from disabling nouveau by default.

  -X, --run-nvidia-xconfig
      nvidia-installer can optionally invoke the nvidia-xconfig utility.  This will update the system X configuration file so that the NVIDIA X driver is used.  The pre-existing X configuration file will be backed up.  At the end of installation, nvidia-installer will ask the user if they wish to run nvidia-xconfig; the default response is 'no'.  Use this option to make the default response 'yes'.  This is useful with the '--no-questions' or '--silent' options, which assume the default values for all questions.

  --force-selinux=FORCE-SELINUX
      Linux installations using SELinux (Security-Enhanced Linux) require that the security type of all shared libraries be set to 'shlib_t' or 'textrel_shlib_t', depending on the distribution. nvidia-installer will detect when to set the security type, and set it using chcon(1) on the shared libraries it installs.  If the execstack(8) system utility is present, nvidia-installer will use it to also clear the executable stack flag of the libraries.  Use this option to override nvidia-installer's detection of when to set the security type.  Valid values for FORCE-SELINUX are 'yes' (force setting of the security type), 'no' (prevent setting of the security type), and 'default' (let nvidia-installer decide when to set the security type).

  --selinux-chcon-type=SELINUX-CHCON-TYPE
      When SELinux support is enabled, nvidia-installer will try to determine which chcon argument to use by first trying 'textrel_shlib_t', then 'texrel_shlib_t', then 'shlib_t'.  Use this option to override this detection logic.

  --no-sigwinch-workaround
      Normally, nvidia-installer ignores the SIGWINCH signal before it forks to execute commands, e.g. to build the kernel module, and restores the SIGWINCH signal handler after the child process has terminated.  This option disables this behavior.

  --no-distro-scripts
      Normally, nvidia-installer will run scripts from /usr/lib/nvidia before and after installing or uninstalling the driver.  Use this option to disable execution of these scripts.

  --no-opengl-files
      Do not install any of the OpenGL-related driver files.

  --no-wine-files
      Do not install any of the Wine driver files.

  --kernel-module-source-prefix=KERNEL-MODULE-SOURCE-PREFIX
      Specify a path where the source directory for the kernel module will be installed. Default: install source directory at /usr/src

  --kernel-module-source-dir=KERNEL-MODULE-SOURCE-DIR
      Specify the name of the directory where the kernel module sources will be installed. Default: directory name is nvidia-VERSION

  --no-kernel-module-source
      Skip installation of the kernel module source.

  --dkms, --no-dkms
      nvidia-installer can optionally register the NVIDIA kernel module sources, if installed, with DKMS, then build and install a kernel module using the DKMS-registered sources.  This will allow the DKMS infrastructure to automatically build a new kernel module when changing kernels.  During installation, if DKMS is detected, nvidia-installer will ask the user if they wish to register the module with DKMS; the default response is 'yes' unless the --no-dkms option is set, in which case the default response is 'no'.

  --module-signing-secret-key=MODULE-SIGNING-SECRET-KEY
      Specify a path to a private key to use for signing the NVIDIA kernel module. The corresponding public key must also be provided.

  --module-signing-public-key=MODULE-SIGNING-PUBLIC-KEY
      Specify a path to a public key to use for verifying the signature of the NVIDIA kernel module. The corresponding private key must also be provided.

  --module-signing-script=MODULE-SIGNING-SCRIPT
      Specify a path to a program to use for signing the NVIDIA kernel module. The program will be called with the arguments: program-name <HASH> <PRIVATEKEY> <PUBLICKEY> <MODULE>; if the program returns an error status, it will be called again with the arguments: program-name <PRIVATEKEY> <PUBLICKEY> <MODULE>. Default: use the sign-file script in the kernel source directory.

  --module-signing-key-path=MODULE-SIGNING-KEY-PATH
      Specify a path where signing keys generated by nvidia-installer will be installed. Default: install keys to '/usr/share/nvidia'.

  --module-signing-hash=MODULE-SIGNING-HASH
      Specify a cryptographic hash algorithm to use for signing kernel modules. This requires a module signing tool that allows explicit selection of the hash algorithm, and the hash algorithm name must be recognizable by the module signing tool. Default: select a hash algorithm automatically, based on the kernel's configuration.

  --module-signing-x509-hash=MODULE-SIGNING-X509-HASH
      Specify a cryptographic hash algorithm to use for signing X.509 certificates generated by nvidia-installer. The hash algorithm name must be one of the message digest algorithms recognized by the x509(1) command.

  --no-check-for-alternate-installs
      Maintainers of alternate driver installation methods can report the presence and/or availability of an alternate driver installation to nvidia-installer. Setting this option skips the check for alternate driver installations.

  --no-unified-memory
      Do not install the NVIDIA Unified Memory kernel module. This kernel module is required for CUDA on 64-bit systems, and if it is not installed, the CUDA driver and CUDA applications will not be able to run. The '--no-unified-memory' option should only be used to work around failures to build or install the Unified Memory kernel module on systems that do not need to run CUDA.

  --no-drm
      Do not install the nvidia-drm kernel module. This kernel module provides several features, including X11 autoconfiguration, support for PRIME, and DRM-KMS. The latter is used to support modesetting on windowing systems that run independently of X11. The '--no-drm' option should only be used to work around failures to build or install the nvidia-drm kernel module on systems that do not need these features.

  --no-peermem
      Do not install the nvidia-peermem kernel module. This kernel module provides support for peer-to-peer memory sharing with Mellanox HCAs (Host Channel Adapters) via GPUDirect RDMA (Remote Direct Memory Access).

  -j CONCURRENCY-LEVEL, --concurrency-level=CONCURRENCY-LEVEL
      Set the concurrency level for operations such as building the kernel module which may be parallelized on SMP systems. By default, this will be set to the number of detected CPUs, or to '1', if nvidia-installer fails to detect the number of CPUs. Systems with a large number of CPUs will have the default concurrency level limited to 32; setting a higher level on the command line will override this limit.

  --force-libglx-indirect
      Always install a libGLX_indirect.so.0 symlink, overwriting one if it exists.

  --no-libglx-indirect
      Do not install a libGLX_indirect.so.0 symlink.

  --install-libglvnd, --no-install-libglvnd
      The installer will try to determine whether the libglvnd libraries are already available, and will install them if they're not. Use --install-libglvnd to always install the libglvnd libraries, overwriting any that already exist.  Use --no-install-libglvnd to exclude the libglvnd libraries, even if they appear to be missing.

  --glvnd-egl-config-path=GLVND-EGL-CONFIG-PATH
      Install the EGL vendor library config file to this directory. If the libglvnd libraries are already present, then by default the installer will try to determine the path by running `pkg-config --variable=datadir libglvnd`. If that fails, then it will default to /usr/share/glvnd/egl_vendor.d.

  --egl-external-platform-config-path=EGL-EXTERNAL-PLATFORM-CONFIG-PATH
      If the package includes an EGL external platform library, then install the EGL external platform library config file to this directory. Defaults to /usr/share/egl/egl_external_platform.d.

  --override-file-type-destination=OVERRIDE-FILE-TYPE-DESTINATION
      Override the default destination for a file type. This option takes an argument in the form of '<FILE_TYPE>:<destination>', where <FILE_TYPE> is a file type from the installer .manifest file, and <destination> is an absolute path to the directory where files of that type should be installed. This option may be given multiple times in order to override the destinations for multiple file types. Use of this option takes precedence over any other options that might otherwise influence the destination of the specified file type.

  --skip-depmod
      Don't run the depmod(1) utility after modifying kernel modules.  This should only be used in cases where depmod(1) will be run separately after running nvidia-installer.

  --systemd, --no-systemd
      By default, the installer will install systemd unit files if systemctl is detected. Specifying --no-systemd will disable installation of systemd units.

  --systemd-unit-prefix=SYSTEMD-UNIT-PREFIX
      The path to which systemd unit files should be installed. By default, the installer uses `pkg-config --variable=systemdsystemunitdir systemd` to determine the location to install systemd unit files, or '/usr/lib/systemd/system' if pkg-config is not available. Ignored if --no-systemd is specified.

  --systemd-sleep-prefix=SYSTEMD-SLEEP-PREFIX
      The path to which systemd-sleep script files should be installed. By default, the installer uses `pkg-config --variable=systemdsleepdir systemd` to determine the location to install systemd-sleep script files, or '/usr/lib/systemd/system-sleep' if pkg-config is not available. Ignored if --no-systemd is specified.

  --systemd-sysconf-prefix=SYSTEMD-SYSCONF-PREFIX
      The path to which systemd unit enable symlinks should be installed. By default, the installer uses `pkg-config --variable=systemdsystemconfdir systemd` to determine the location to install these symlinks, or '/etc/systemd/system' if pkg-config is not available. Ignored if --no-systemd is specified.

  -M KERNEL-MODULE-TYPE, --kernel-module-type=KERNEL-MODULE-TYPE
      The type of kernel modules to build and install. Valid values are open and proprietary.

  -m KERNEL-MODULE-BUILD-DIRECTORY, --kernel-module-build-directory=KERNEL-MODULE-BUILD-DIRECTORY
      Directly set the directory within the package from which to build the kernel modules. This option is deprecated; use --kernel-module-type instead.

  --print-recommended-kernel-module-type
      Print if open or proprietary modules should be used based on currently attached GPUs and exit. NOTE: A kernel module type may be recommended even if it is not included in this driver package.

  --allow-installation-with-running-driver, --no-allow-installation-with-running-driver
      Proceed with installation even if an NVIDIA driver is already installed and running.

  --rebuild-initramfs, --no-rebuild-initramfs
      Rebuild the initramfs after installation is complete, regardless of the default action recommended by nvidia-installer.  --no-rebuild-initramfs skips rebuilding the initramfs after installation is complete.  These options are useful for non-interactive installations when a specific behavior is desired, regardless of what nvidia-installer would recommend by default in an interactive installation.


码农网,只发表在实践过程中,遇到的技术难题,不误导他人。
 楼主| 发表于 2025-3-5 20:56:21 | 显示全部楼层
CUDA Toolkit

Options:
  --silent
    Performs an installation with no further user-input and minimal
    command-line output based on the options provided below. Silent
    installations are useful for scripting the installation of CUDA.
    Using this option implies acceptance of the EULA. If running with
    non-root permissions, additional customizations may be necessary
    with other command-line options.

  --driver
    Install the CUDA Driver.

  --kernelobjects
    Install the CUDA Kernel Objects.
  
  --kopath=<path>
    Install the CUDA Kernel Objects to <path>.

  --toolkit
    Install the CUDA Toolkit.

  --toolkitpath=<path>
    Install the CUDA Toolkit to the <path> directory. If this flag is not
    provided, the default path of /usr/local/cuda-12.8 is used.

  --installpath=<path>
    Install everything to the <path> directory. This flag overrides the
    --toolkitpath flag if it is set.

  --extract=<path>
    Extracts driver runfile and the raw files of the toolkit to <path>.

    This is especially useful when one wants to install the driver using one or
    more of the command-line options provided by the driver installer which
    are not exposed in this installer.

  --override
    Ignores compiler version checks which would prevent installation.

  --no-opengl-libs
    Prevents the driver installation from installing NVIDIA's GL libraries.
    Useful for systems where the display is driven by a non-NVIDIA GPU.
    In such systems, NVIDIA's GL libraries could prevent X from loading
    properly.

  --no-man-page
    Do not install the man pages under /usr/share/man.

  --kernel-module-type=<proprietary|open>
    Tells the driver installation to use proprietary or open flavor of kernel source
    when building the NVIDIA kernel modules. Same as --kernel-module-build-directory.

  --kernel-module-build-directory=<kernel|kernel-open>
    Tells the driver installation to use legacy or open flavor of kernel source
    when building the NVIDIA kernel module. The kernel-open flavor is only
    supported on Turing GPUs and newer.

  -m=kernel
    Tells the driver installation to use legacy flavor of kernel source when
    building the NVIDIA kernel module.
    Shorthand for --kernel-module-build-directory=kernel

  -m=kernel-open
    Tells the driver installation to use open flavor of kernel source when
    building the NVIDIA kernel module. The kernel-open flavor is only supported
    on Turing GPUs and newer.
    Shorthand for --kernel-module-build-directory=kernel-open

  --kernel-source-path=<path>
    Tells the driver installation to use <path> as the kernel source directory
    when building the NVIDIA kernel module. Required for systems where the
    kernel source is installed to a non-standard location.

  --kernel-output-path=<path>
    Tells the driver installation to use <path> as the kernel output directory
    when building the NVIDIA kernel module. Required for systems where the
    kernel obects are loaded from a non-standard location.

  --run-nvidia-xconfig
    Tells the driver installation to run nvidia-xconfig to update the system
    X configuration file so that the NVIDIA X driver is used. The pre-existing
    X configuration file will be backed up.

    This option should not be used on systems that require a custom
    X configuration, or on systems where a non-NVIDIA GPU is rendering the
    display.

  --no-drm
    Do not install the nvidia-drm kernel module. This kernel module provides
    several features, including X11 autoconfiguration, support for PRIME, and
    DRM-KMS. The latter is used to support modesetting on windowing systems
    that run independently of X11. The '--no-drm' option should only be used
    to work around failures to build or install the nvidia-drm kernel module
    on systems that do not need these features.

  --tmpdir=<path>
    Performs any temporary actions within <path> instead of /tmp. Useful in
    cases where /tmp cannot be used (doesn't exist, is full, is mounted with
    'noexec', etc.).

  ---
    End of options separator. Arguments passed after will be
    passed-through to the NVIDIA-Linux*.run driver installer.

  --help
    Prints this help message.
码农网,只发表在实践过程中,遇到的技术难题,不误导他人。
 楼主| 发表于 2025-3-5 21:32:15 | 显示全部楼层

Ubuntu 24.04 显卡 A10 安装 NVIDIA 驱动

NVTOP 代表 Neat Videocard TOP,一种类似 (h)top 的 GPU 和加速器任务监视器。它可以处理多个 GPU 并以类似 htop 的方式打印有关它们的信息。

目前支持的供应商有 AMD(Linux amdgpu 驱动程序)、Apple(有限的 M1 和 M2 支持)、华为(Ascend)、Intel(Linux i915/Xe 驱动程序)、NVIDIA(Linux 专有驱动程序)、Qualcomm Adreno(Linux MSM 驱动程序)、Broadcom VideoCore(Linux v3d 驱动程序)。

安装 NVTOP


QQ截图20250305213205.jpg
https://github.com/Syllo/nvtop
码农网,只发表在实践过程中,遇到的技术难题,不误导他人。
您需要登录后才可以回帖 登录 | 注册[Register]

本版积分规则

免责声明:
码农网所发布的一切软件、编程资料或者文章仅限用于学习和研究目的;不得将上述内容用于商业或者非法用途,否则,一切后果请用户自负。本站信息来自网络,版权争议与本站无关。您必须在下载后的24个小时之内,从您的电脑中彻底删除上述内容。如果您喜欢该程序,请支持正版软件,购买注册,得到更好的正版服务。如有侵权请邮件与我们联系处理。

Mail To:help@itsvse.com

QQ|手机版|小黑屋|架构师 ( 鲁ICP备14021824号-2 )|网站地图

GMT+8, 2025-3-21 21:23

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表