1.首先安装一些依赖包
1 yum -y install gcc-c++ qt-devel qt readline libreadline-java readline-devel git cmake gcc curl
2.开始安装torch7
1 #!/bin/sh 2 3 ###################################################################### 4 # Torch install 5 # 6 # This script installs Torch7, and a few extra packages 7 # (penlight, optim, parallel, image). 8 # 9 # The install is done via Luarocks, which enables package 10 # versions. This is the recommended method to deploy Torch, 11 # torch-pkg is being deprecated. 12 # 13 # Once this script has been run once, you should be able to run 14 # extra luarocks commands, and in particular install new packages: 15 # $ luarocks install json 16 # $ torch 17 # > require 'json' 18 # 19 ###################################################################### 20 21 # Prefix: 22 #PREFIX=${PREFIX-/usr/local} 23 PREFIX=$1 24 len_prefix=`echo $PREFIX|awk '{print length($0)}'` 25 if [ $len_prefix -eq 0 ];then 26 echo -e "