first shot at local install

This commit is contained in:
koray kavukcuoglu 2012-02-09 22:44:04 -05:00
parent 8eff95d047
commit 87163d971a

View File

@ -66,6 +66,14 @@ function torch.setdefaulttensortype(typename)
end
end
local localinstalldir = paths.concat(os.getenv('HOME'),'.torch','usr')
if paths.dirp(localinstalldir) then
package.path = package.path .. ';' .. paths.concat(localinstalldir,'share','torch','lua','?','init.lua')
package.path = package.path .. ';' .. paths.concat(localinstalldir,'share','torch','lua','?.lua')
package.cpath = package.cpath .. ';' .. paths.concat(localinstalldir,'lib','torch','?.so')
package.cpath = package.cpath .. ';' .. paths.concat(localinstalldir,'lib','torch','?.dylib')
end
torch.setdefaulttensortype('torch.DoubleTensor')
torch.include('torch', 'Tensor.lua')