Linux
服务器个人账户下配置torch7
# 本操作指令综合了几个链接(见文末)。
# 服务器配置
## 1、系统版本##
(torch7) ***@user:~/torch$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.3 LTS
Release: 14.04
Codename: trusty
## 2、cuda版本
(torch7) ***@user:~/torch$ nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2017 NVIDIA Corporation
Built on Fri_Sep__1_21:08:03_CDT_2017
Cuda compilation tools, release 9.0, V9.0.176
## 3、cudnn版本
(torch7) ***@user:~/torch$ cat /usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR -A 2
#define CUDNN_MAJOR 6
#define CUDNN_MINOR 0
#define CUDNN_PATCHLEVEL 20
--
#define CUDNN_VERSION (CUDNN_MAJOR * 1000 + CUDNN_MINOR * 100 + CUDNN_PATCHLEVEL)
#include "driver_types.h"
一、安装指令
curl -s https://raw.githubusercontent.com/torch/ezinstall/master/install-deps | bash
git clone https://github.com/torch/distro.git ~/torch --recursive
sudo TORCH_NVCC_FLAGS="-D__CUDA_NO_HALF_OPERATORS__" ./install.sh
. /home2/****/torch/install/bin/torch-activate
source ~/.bashrc
二、测试
1、测试torch7
是否安装成功
(torch7) ***@user:~/torch$ th
______ __ | Torch7
/_ __/__ ________/ / | Scientific computing for Lua.
/ / / _ \/ __/ __/ _ \ | Type ? for help
/_/ \___/_/ \__/_//_/ | https://github.com/torch
| http://torch.ch
2、测试cudnn
是否可用
th> require'cudnn'
三、参考文献
[1] https://blog.youkuaiyun.com/zhangxin4832/article/details/79219192
[2] https://blog.youkuaiyun.com/xiaozhun07/article/details/49865785
[3] https://blog.youkuaiyun.com/jainszhang/article/details/82777762
[4] https://github.com/torch/distro
[5] http://torch.ch/docs/getting-started.html#_