lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Tue, Nov 22, 2016 at 7:15 AM, Geoff Leyland
<geoff_leyland@fastmail.fm> wrote:
> Hi,
>
> I'm trying to install torch's nn module onto an existing installation of lua (not th), but, unfortunately, there are two modules named "nn" - the torch one, and the nanomsg one, and I get the nanomsg one.  Is there any way of telling luarocks which I'd like to install?  I could change my ~/.luarocks/config*.lua to only look at the torch repository while I install, but I fear that will just lead to pain in the long run?
>
> Thanks in advance!
> Geoff
>

Hi Geoff,

You can use `--server` to use torch repository (with fallback to the
default repository) only for one command:

luarocks install
--server=https://raw.githubusercontent.com/torch/rocks/master nn

Alternatively, edit your config to make this effect permanent (this is
what torch installer does):

rocks_servers = {
   "https://raw.githubusercontent.com/torch/rocks/master";,
   {
     "https://luarocks.org";,
     "https://raw.githubusercontent.com/rocks-moonscript-org/moonrocks-mirror/master/";,
     "http://luafr.org/moonrocks/";,
     "http://luarocks.logiceditor.com/rocks";,
   }
}

This way you'll have to use `--server` in the opposite case when you
want to prioritize
luarocks repository over torch repository, but otherwise there
shouldn't be any problems.

-- Best regards,
-- Peter Melnichenko