安装Luarocks的`cutorch`和`cunn`

问题

我不能安装特定的Luarocks。 我想使用CNN确定3D手部扫描中的关键点。 因此,我想要运行 V2V-PoseNet。 然而,我遇到了一个问题,研究人员建议我尝试:

$luarocks install cutorch
$luarocks install cunn

不幸的是,我收到了没有写入权限的错误消息。 在使用sudo执行时,我得到:

错误:未找到与查询匹配的结果。

我尝试了什么

我正确安装了Torch(th可用),并干净地安装了Luarocks:

$th
  ______             __   |  Torch7 / Debian
 /_  __/__  ________/ /   |  Scientific computing for Lua.
  / / / _ \/ __/ __/ _ \  |  Type ? for help
 /_/  \___/_/  \__/_//_/  |  https://github.com/torch
                          |  http://torch.ch
th>^C ^C

$sudo apt-get install luarocks

然后尝试安装 rocks:

$sudo luarocks install cutorch
$sudo luarocks install cunn

没有sudo命令,它无法正常工作。 上面的安装命令都返回“错误:未找到与查询匹配的结果”。 有类似问题的人被建议手动安装rock。 如果我手动下载cutorch-master,从/rocks文件夹启动终端并运行

$luarocks install cutorch-1.0-0.rockspec

我会收到一个错误消息,即我的用户在/usr/local/lib/luarocks/rocks中'没有写入权限。 当我尝试使用sudo安装时,我得到缺少cutorch 1.0-0的依赖项:torch>= 7.0(未安装)。 我尝试修改了.bashrc,但是那无法成功,尽管我现在已经修复了这个问题。

顺便说一下,Lua本身已经安装:

$lua
Lua 5.1.5  Copyright (C)1994-2012 Lua.org,PUC-Rio

安装

我在Ubuntu 18.04上运行此命令。

我的问题

如何使用Luarocks安装cutorchcunn

点赞
用户282536
用户282536

我没有看到cunn的岩石上传到luarocks服务器:https://luarocks.org/search?q=cunn

你能否请包的作者将其上传到公共服务器?

2018-07-09 06:55:30
用户9552266
用户9552266

我最终找到了解决办法。 我重新设置了Ubuntu 18.04,并根据[文档](http://torch.ch/docs/getting-started.html#_)安装了Torch。

git clone https://github.com/torch/distro.git ~/torch --recursive
cd ~/torch; bash install-deps;
./install.sh
source ~/.bashrc

然后,我安装了[CUDA](https://developer.nvidia.com/compute/cuda/9.2/Prod2/local_installers/cuda_9.2.148_396.37_linux),并运行了它:

sudo sh cuda_9.2.148_396.37_linux.run

在我安装了[cuDNN](https://developer.nvidia.com/compute/machine-learning/cudnn/secure/v7.2.1/prod/9.2_20180806/cudnn-9.2-linux-x64-v7.2.1.38)之后,我能够运行上面的命令。

2018-08-28 10:30:12