alt

Как установить CUDA 9.2?
Как установить CUDA 10.1?
Как создать модуль?

CUDA 9.2

Скачать CUDA 9.2 для Centos 7 можно тут.

$ chmod +x cuda_9.2.148_396.37_linux.run
$ ./cuda_9.2.148_396.37_linux.run
  Do you accept the previously read EULA? accept
  Install NVIDIA Accelerated Graphics Driver for Linux-x86_64 396.37? no
  Install the CUDA 9.2 Toolkit? yes
  Enter Toolkit Location: /nfs/software/cuda/v9.2
  Do you want to install a symbolic link at /usr/local/cuda? no
  Install the CUDA 9.2 Samples? no

CUDA 10.1

Скачать CUDA 10.1 для Centos 7 можно тут.

$ chmod +x cuda_10.1.run
$ ./cuda_10.1.run
  Do you accept the previously read EULA? accept
  Install the CUDA 10.1 Toolkit? yes
  Enter Toolkit Location: /nfs/software/cuda/v10.1
  Do you want to install a symbolic link at /usr/local/cuda? no
  Install the CUDA 10.1 Samples? no

CREATE MODULE

$ cat /etc/modulefiles/cuda/v9.2
  #%Module1.0
  proc ModulesHelp { } {
    global version
      puts stderr "Modulefile for cuda v9.2"
      }
      set version v9.2
      module-whatis "Modulefile for cuda v9.2"
      # Our environment
      setenv MAINDIR /nfs/software/cuda/v9.2
      prepend-path PATH $env(MAINDIR)/bin
      prepend-path C_INCLUDE_PATH $env(MAINDIR)/include
      prepend-path CPLUS_INCLUDE_PATH $env(MAINDIR)/include
      prepend-path LIBRARY_PATH $env(MAINDIR)/lib64/stubs
      prepend-path LIBRARY_PATH $env(MAINDIR)/lib64
      prepend-path LD_LIBRARY_PATH $env(MAINDIR)/lib64/stubs
      prepend-path LD_LIBRARY_PATH $env(MAINDIR)/lib64
  $ module add cuda/v9.2
  $ nvcc --version
  Cuda compilation tools, release 9.2, V9.2.148

CHECK MODULE

Ссылка на мой скрипт для проверки модуль-файла

$ ./check-modulefiles /etc/modulefiles/cuda/v9.2
  /nfs/software/cuda/v9.2/bin            0
  /nfs/software/cuda/v9.2/include        0
  /nfs/software/cuda/v9.2/include        0
  /nfs/software/cuda/v9.2/lib64/stubs    0
  /nfs/software/cuda/v9.2/lib64          0
  /nfs/software/cuda/v9.2/lib64/stubs    0
  /nfs/software/cuda/v9.2/lib64          0