cuda的slient模式下的安装

实验室的师弟要搞cuda编译,不会安装cuda,其实这个主要原因还是服务器上是不允许个人随意安装软件的,尤其是nvidia的那些东西,很容易把整个服务器搞崩掉,虽然实验室的服务器集群我是唯一的一个管理员,但是也不能随意的安装东西,毕竟搞了快10年的服务器了,这一下没搞好就把服务器干崩掉的事情以前没少发生,因此这里我们就需要在不使用root权限的前提下安装cuda到个人用户空间下。

 

这里我们采用的方式为cuda的slient模式安装,说的直白些就是不使用交互模式进行安装,只输入一次安装命令即可。

 

 

 

假设安装的cuda文件为:cuda_10.2.89_440.33.01_linux.run

为了忽略gcc的版本检查加入 --override 参数;

指定安装cuda toolkit 即可,使用参数: --toolkit 

指定安装到个人空间,使用参数:--installpath=

使用slient模式,使用参数:--silent

./cuda_10.2.89_440.33.01_linux.run  --override --toolkit  --silent --installpath=/data/wangxiaya/cuda-10.2

 

 

----------------------------------------------

 

 

查看CUDA的帮助文档:

 

./cuda_10.2.89_440.33.01_linux.run  -h

 

 

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. The following flags
can be used to customize the actions taken during installation. At
least one of --driver, --uninstall, --toolkit, and --samples must
be passed if running with non-root permissions.

--driver
Install the CUDA Driver.

--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-10.2 is used.

--samples
Install the CUDA Samples.

--samplespath=<path>
Install the CUDA Samples to the <path> directory. If this flag is not
provided, the default path of /data/liuhaidong/NVIDIA_CUDA-10.2_Samples is used.

--librarypath=<path>
Install libraries to the <path> directory. If this flag is not provided,
the default path of your distribution is used. This flag only applies to
libraries installed outside of the CUDA Toolkit path.

--installpath=<path>
Install everything to the <path> directory. This flag sets the same values
as the toolkitpath, samplespath, and librarypath options.

--extract=<path>
Extracts driver runfile and the raw files of the toolkit and samples 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-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.

--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.).

--help
Prints this help message.

 

 

=============================================

 

posted on 2023-02-19 10:53  Angry_Panda  阅读(767)  评论(0)    收藏  举报

导航