• Ubunt14.04+Nvidia drivers+cuda 8.0


    首先,cuda自带ubuntu driver,但笔者从未试过是否能用。
    Ubuntu linux kernel:
    3.16.0-031600-generic #201408031935 SMP Sun Aug 3 23:36:11 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

    Nvidia driver 是通过apt-get 安装的。

    Cuda 用deb安装,会给你安装一堆nvidia drivers,还卸载不掉。最后还是得用run文件安装。
    run文件安装,又会老是报空间不够。

    cuda安装文档:
    https://docs.nvidia.com/cuda/archive/8.0/cuda-installation-guide-linux/index.html#runfile-installation

    Action Options Used Explanation
    Silent Installation --silent Required for any silent installation. 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= Install the CUDA Toolkit to the directory. If not provided, the default path of /usr/local/cuda-8.0 is used.
    --samples Install the CUDA Samples.
    --samplespath= Install the CUDA Samples to the directory. If not provided, the default path of $(HOME)/NVIDIA_CUDA-8.0_Samples is used.
    --uninstall (DEPRECATED) Unnstall the CUDA Driver.
    Extraction --extract=
    Extracts the individual driver, toolkit, and samples runfile installers to .
    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.
    Overriding Installation Checks --override Ignores compiler, third-party library, and toolkit detection checks which would prevent the CUDA Toolkit and CUDA Samples from installing.
    No OpenGL Libraries --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.
    Overriding Kernel Source --kernel-source-path= Tells the driver installation to use 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.
    Running nvidia-xconfig --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.
    Custom Temporary Directory Selection --tmpdir= Performs any temporary actions within instead of /tmp. Useful in cases where /tmp cannot be used (doesn't exist, is full, is mounted with 'noexec', etc.).
    Show Verbose Output --verbose Prints all logging information to stdout as well as the log file.
    Show Installer Options --help Prints the list of command-line options to stdout.

    使用参数
    --tmpdir=/home/ubuntu/cuda/

    注意,这里有一些博客创建的路径是/opt/usr/,但我还是失败了,又换了一个位置,成功。

    然而,最后我还是把deb安装的nvidia driver卸载掉了,用了cuda内置的driver。因为在deb安装的driver版本比较老,跑不起来cuda的用例:
    sudo /usr/local/cuda-8.0/samples/1_Utilities/deviceQuery/deviceQuery

    为了运行zh.d2l.ai的gpu示例代码,发现运行不了的原因是,gluon默认安装的mxnet不是gpu版本的。

    根据cuda的版本,在conda环境下安装即可。

    conda activate gluon

    pip install -U --pre mxnet-cu80 -i https://pypi.tuna.tsinghua.edu.cn/simple

    使用清华的源安装。

  • 相关阅读:
    JS基础类型和引用类型
    ul的margin撑不开想要的距离的办法
    html中的列表
    BEM的命名规则
    意义模糊的函数签名……文档注释
    最基础,新手入门第一段代码
    Cookie的使用
    用servlet校验密码2
    用servlet进行用户名和密码校验
    登录页面
  • 原文地址:https://www.cnblogs.com/severnvergil/p/14443861.html
Copyright © 2020-2023  润新知