大神的链接点击打开链接
步骤:
sudo apt install git
git clone https://github.com/torch/distro.git ~/torch --recursive
cd torch
sudo bash install-deps
漫长的等待,得到结果:............
Skipping install of OpenBLAS - it is already installed.
==> Torch7's dependencies have been installed
继续安装
sudo ./install.sh
非常漫长的等待
Prefix set to /usr/local/torch/install
Installing Lua version: LUAJIT21
Found CUDA on your machine. Installing CMake 3.6 modules to get up-to-date FindCUDA
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /usr/local/torch/cmake/3.6/build
Install the project...
等待等待等待,,,,,
Do you want to automatically prepend the Torch install location
to PATH and LD_LIBRARY_PATH in your /home/jennifer/.bashrc? (yes/no)
[yes] >>>
yes
Not updating your shell profile.
You might want to
add the following lines to your shell profile:
. /usr/local/torch/install/bin/torch-activate
添加环境变量
sudo gedit ~/.bashrc
添加
. /usr/local/torch/install/bin/torch-activate
保存source ~/.bashrc
输入th,得到下图:
______ __ | Torch7
/ / / _ \/ __/ __/ _ \ | Type ? for help
/_/ \___/_/ \__/_//_/ | https://github.com/torch
| http://torch.ch
测定cudnn是否成功
th> require‘cudnn’