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
查看是否安装成功了