diff options
author | koray kavukcuoglu <koray@kavukcuoglu.org> | 2012-02-10 07:44:04 +0400 |
---|---|---|
committer | koray kavukcuoglu <koray@kavukcuoglu.org> | 2012-02-10 07:44:04 +0400 |
commit | 87163d971afb7273fefcaadf4163999323d88144 (patch) | |
tree | 396f81ff42d7871577cd82fe9ddb29723b83299c /init.lua | |
parent | 8eff95d0471d22fd2b37979f2bcd3fb113b992e3 (diff) |
first shot at local install
Diffstat (limited to 'init.lua')
-rw-r--r-- | init.lua | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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') |