torch-luarocks在服务器安装软件

fatal: unable to connect to github.com:
github.com[0: 192.30.255.112]: errno=Connection timed out
github.com[1: 192.30.255.113]: errno=Connection timed out


Error: Failed cloning git repository.

安装了torch,但是需要一些其他的库,如nn cudnn等,然而rockspec文件中的url为git型,根据公司对网络的要求,这在服务器上并不能直接安装,所以需要手动下载数据然后在把url的路径更改了
如:

git clone https://github.com******
package = "cunn"
version = "scm-1"

source = {
   url = "/data/xxx/config/torch_pkgs/cunn/",
}

description = {
   summary = "Torch CUDA Neural Network Implementation",
   detailed = [[
   ]],
   homepage = "https://github.com/torch/cunn",
   license = "BSD"
}

dependencies = {
   "torch >= 7.0",
   "nn >= 1.0",
   "cutorch >= 1.0"
}

build = {
   type = "command",
   build_command = [[
cmake -E make_directory build && cd build && cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$(LUA_BINDIR)/.." -DCMAKE_INSTALL_PREFIX="$(PREFIX)" && $(MAKE) -j$(getconf _NPROCESSORS_ONLN) install
]],
   install_command = "cd build"
}
luarocks install 本地路径+cunn-scm-1.rockspec

最后使用luarocks list查看是否安装成功了

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值