Well, we don't really support Torch7 with a regular Lua build. But you could get it to run by doing two things:
1/ in your Lua, set package.path and package.cpath to the ones that are in torch:
$ torch
> print(package.path)
...
> print(package.cpath)
...
$ lua
> package.path = ...
> package.cpath = ...
After that you can require 'torch' from Lua, it will find everything.
2/ But it will crash as soon as you make a function call in the torch library.
The reason is that torch is built in c++ mode, and our lua, that's embedded in torch, as well.
A regular Lua is built in C, so there's a compat problem there. The way around is to rebuild
torch in C.
....
Torch has a bunch of complex dependencies, and I usually find it easier to build existing libraries
(socket, bitop, ...) against torch, and always use torch, instead of lua.