美文网首页
非root用户 CUDA-10.1 10.2安装

非root用户 CUDA-10.1 10.2安装

作者: 昵称己存在 | 来源:发表于2019-10-16 22:13 被阅读0次

    2019年10月16日 更新
    !! 不要用 cuda_10.1.168_418.67_linux.run 这个版本,非root没有成功。。。,

    1. 下载 https://developer.nvidia.com/compute/cuda/10.1/Prod/local_installers/cuda_10.1.105_418.39_linux.run
    chmod +x cuda_10.1.168_418.67_linux.run
    ./cuda_10.1.168_418.67_linux.run
    

    3 . accpet

    ┌──────────────────────────────────────────────────────────────────────────────┐
    │  End User License Agreement                                                  │
    │  --------------------------                                                  │
    │                                                                              │
    │  NVIDIA Software License Agreement and CUDA Supplement to                    │
    │  Software License Agreement.                                                 │
    │                                                                              │
    │                                                                              │
    │  Preface                                                                     │
    │  -------                                                                     │
    │                                                                              │
    │  The Software License Agreement in Chapter 1 and the Supplement              │
    │  in Chapter 2 contain license terms and conditions that govern               │
    │  the use of NVIDIA software. By accepting this agreement, you                │
    │  agree to comply with all the terms and conditions applicable                │
    │  to the product(s) included herein.                                          │
    │                                                                              │
    │                                                                              │
    │  NVIDIA Driver                                                               │
    │                                                                              │
    │                                                                              │
    │──────────────────────────────────────────────────────────────────────────────│
    │ Do you accept the above EULA? (accept/decline/quit):                         │
    │ accept                                                                       │
    └──────────────────────────────────────────────────────────────────────────────┘
    
    ┌──────────────────────────────────────────────────────────────────────────────┐
    │ CUDA Installer                                                               │
    │ - [ ] Driver                                                                 │
    │      [ ] 418.67                                                              │
    │ + [X] CUDA Toolkit 10.1                                                      │
    │   [X] CUDA Samples 10.1                                                      │
    │   [X] CUDA Demo Suite 10.1                                                   │
    │   [X] CUDA Documentation 10.1                                                │
    │   Options                                                                    │
    │   Install                                                                    │
    │                                                                              │
    │                                                                              │
    │ Up/Down: Move | Left/Right: Expand | 'Enter': Select | 'A': Advanced options │
    └──────────────────────────────────────────────────────────────────────────────┘
    

    默认前面的 X表示选中, 方向键移动,Driver要取消,

    1. 在第二行 + [X] CUDA Toolkit 10.1 ,按 A,进入Advanced options , 如下所示:
    ┌──────────────────────────────────────────────────────────────────────────────┐
    │ CUDA Toolkit                                                                 │
    │   Change Toolkit Install Path                                                │
    │   [ ] Create symbolic link from /usr/local/cuda                              │
    │ - [ ] Create desktop menu shortcuts                                          │
    │      [ ] All users                                                           │
    │      [ ] Yes                                                                 │
    │      [ ] No                                                                  │
    │   [ ] Install manpage documents to /usr/share/man                            │
    │   Done                                                                       │
    │                                                                              │
    │ Up/Down: Move | Left/Right: Expand | 'Enter': Select | 'A': Advanced options │
    └──────────────────────────────────────────────────────────────────────────────┘
    

    Change Toolkit Install Path一行上面Enter, 进入修改路径:修改为非root的路径

    ┌──────────────────────────────────────────────────────────────────────────────┐
    │ Change Toolkit Install Path                                                  │
    │ /home/xxx/local/cuda-10.1/                                        │
    │                                                                              │
    │                                                                              │
    │ 'Enter': Finish                                                              │
    └──────────────────────────────────────────────────────────────────────────────┘
    

    确认后,取消上上幅图的所有,最后如上上图所示。

    1. 修改 Options选项下面的 default path.
      选择一个自己的/home/xxx/Documents
      Note: 这个路径最后不要带/

    不修改的话可能会有以下的错误:

    [WARNING]: Unable to write to directory: /usr/lib/x86_64-linux-gnu/
    [ERROR]: Unable to write to /usr/lib/x86_64-linux-gnu/! Change default library locations using --librarypath=<path>
    

    Install 即可!

    安装成功:

    ===========
    = Summary =
    ===========
    
    Driver:   Not Selected
    Toolkit:  Installed in  /home/xxx/usr/local/cuda-10.2/
    Samples:  Not Selected
    
    Please make sure that
     -   PATH includes /home/xxx/usr/local/cuda-10.2/bin
     -   LD_LIBRARY_PATH includes /home/xxx/usr/local/cuda-10.2/lib64, or, add /home/xxx/usr/local/cuda-10.2/lib64 to /etc/ld.so.conf and run ldconfig as root
    
    To uninstall the CUDA Toolkit, run cuda-uninstaller in /home/xxx/usr/local/cuda-10.2/bin
    
    Please see CUDA_Installation_Guide_Linux.pdf in /home/xxx/usr/local/cuda-10.2/doc/pdf for detailed information on setting up CUDA.
    ***WARNING: Incomplete installation! This installation did not install the CUDA Driver. A driver of version at least 440.00 is required for CUDA 10.2 functionality to work.
    To install the driver using this installer, run the following command, replacing <CudaInstaller> with the name of this run file:
        sudo <CudaInstaller>.run --silent --driver
    
    Logfile is /tmp/cuda-installer.log
    

    相关文章

      网友评论

          本文标题:非root用户 CUDA-10.1 10.2安装

          本文链接:https://www.haomeiwen.com/subject/zmxpmctx.html