zoukankan      html  css  js  c++  java
  • 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

    使用清华的源安装。

  • 相关阅读:
    阿里云ECS磁盘性能测试
    阿里云NAS性能测试
    Jumpserver堡垒机容器化部署
    k8s集群中部署RookCeph高可用集群
    使用GitHub Action进行打包并自动推送至OSS
    MYSQL ERROR 1118
    ORACLE cursor_sharing参数导致函数索引失效
    导出微信视频号的视频
    iPad作为扩展屏的几种方案
    AR VR MR XR
  • 原文地址:https://www.cnblogs.com/severnvergil/p/14443861.html
Copyright © 2011-2022 走看看