Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/torch/torch7.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkoray kavukcuoglu <koray@kavukcuoglu.org>2012-02-10 07:44:04 +0400
committerkoray kavukcuoglu <koray@kavukcuoglu.org>2012-02-10 07:44:04 +0400
commit87163d971afb7273fefcaadf4163999323d88144 (patch)
tree396f81ff42d7871577cd82fe9ddb29723b83299c /init.lua
parent8eff95d0471d22fd2b37979f2bcd3fb113b992e3 (diff)
first shot at local install
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/init.lua b/init.lua
index cb7e3b9..c66f48d 100644
--- a/init.lua
+++ b/init.lua
@@ -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')