diff options
author | Rui Guo <guorui.xt@gmail.com> | 2016-11-12 10:09:31 +0300 |
---|---|---|
committer | Rui Guo <guorui.xt@gmail.com> | 2016-11-12 10:09:31 +0300 |
commit | 7dc2d51ee2594e222402d9b16d575dbb5d457450 (patch) | |
tree | 8c426c7b2809aac77dbe95d57c571c87b7b436d0 | |
parent | 7c614233483dd2e7c55f0a68d9d57661fa7dfa66 (diff) | |
parent | 89d92a5925eac6df9dc9489d40c44451da187e5f (diff) |
Merge branch 'master' of https://github.com/torch/distro
-rw-r--r-- | build_windows.bat | 143 | ||||
m--------- | exe/trepl | 0 | ||||
m--------- | extra/cudnn | 0 | ||||
m--------- | extra/cunn | 0 | ||||
m--------- | extra/cutorch | 0 | ||||
m--------- | extra/graph | 0 | ||||
m--------- | extra/luaffifb | 0 | ||||
m--------- | extra/nn | 0 | ||||
m--------- | extra/nngraph | 0 | ||||
m--------- | extra/threads | 0 | ||||
-rwxr-xr-x | install-deps | 5 | ||||
-rwxr-xr-x | install.sh | 12 | ||||
-rw-r--r-- | installdeps_win.bat | 149 | ||||
m--------- | pkg/gnuplot | 0 | ||||
m--------- | pkg/paths | 0 | ||||
m--------- | pkg/sundown | 0 | ||||
m--------- | pkg/sys | 0 | ||||
m--------- | pkg/torch | 0 | ||||
-rw-r--r-- | torch-active.bat | 5 | ||||
-rw-r--r-- | win-files/cmake.cmd | 1 | ||||
-rw-r--r-- | win-files/graph-scm-1.rockspec | 27 | ||||
-rw-r--r-- | win-files/luaffi-scm-1.rockspec | 35 | ||||
-rw-r--r-- | win-files/sys-1.1-0.rockspec | 33 | ||||
-rw-r--r-- | win-files/trepl-scm-1.rockspec | 55 |
24 files changed, 378 insertions, 87 deletions
diff --git a/build_windows.bat b/build_windows.bat index c1222ad..3125339 100644 --- a/build_windows.bat +++ b/build_windows.bat @@ -36,70 +36,37 @@ rem git clone --recursive https://github.com/hughperkins/distro -b distro-wi rem cd torch
rem based heavily/entirely on what hiili wrote at https://github.com/torch/torch7/wiki/Windows#using-visual-studio
+setlocal
+call "%VS140COMNTOOLS%\..\..\VC\bin\amd64\vcvars64.bat"
+@echo on
-rem call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"
-call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\vcvars64.bat"
-set "PATH=%PATH%;C:\Program Files\CMake\bin"
-set "PATH=%PATH%;C:\Program Files\Git\bin"
+if "%TORCH_LUA_VERSION%" == "" (
+ SET "TORCH_LUA_VERSION=LUAJIT21"
+)
-set "BASE=%CD%"
-set "TORCH_INSTALL=%CD%\install"
+set "PATH=%PATH%;C:\Program Files\CMake\bin;C:\Program Files\Git\"
+rem check if git and cmake is there
-echo BASE: %BASE%
+set BASE=%~dp0
+set "THIS_DIR=%BASE%"
+set "PREFIX=%BASE%\install"
-rem rmdir /s /q "%BASE%\soft"
-mkdir "%BASE%\soft"
+set "CMAKE_LIBRARY_PATH=%BASE%/include:%BASE%/lib:%CMAKE_LIBRARY_PATH%"
+set "CMAKE_PREFIX_PATH=%PREFIX%"
-rmdir /s /q pkg\torch
-git submodule update --init pkg/torch
-if errorlevel 1 exit /B 1
-rem git submodule update --init --recursive
-
-rem install msys64
-rem compared to the instructions on the website, using bash direclty is synchronous, and puts the output into our
-rem console/jenkins
-rem we install it here, since it's a bit non-standard (cf 7zip, cmake, msvc2015, which I think are reasonably standard?)
-rem we need it, because we need a fortran compiler
-cd /d "%BASE%\soft"
-powershell.exe -Command (new-object System.Net.WebClient).DownloadFile('https://sourceforge.net/projects/msys2/files/Base/x86_64/msys2-base-x86_64-20160205.tar.xz/download', 'msys2-base-x86_64-20160205.tar.xz')
-if errorlevel 1 exit /B 1
-"c:\program files\7-Zip\7z.exe" x msys2-base-x86_64-20160205.tar.xz
-if errorlevel 1 exit /B 1
-"c:\program files\7-Zip\7z.exe" x msys2-base-x86_64-20160205.tar >nul
-if errorlevel 1 exit /B 1
-cmd /c msys64\usr\bin\bash --login exit
-cmd /c msys64\usr\bin\bash --login -c "pacman -Syu --noconfirm"
-cmd /c msys64\usr\bin\bash --login -c "pacman -Sy git tar make mingw-w64-x86_64-gcc mingw-w64-x86_64-gcc-fortran --noconfirm"
-
-rem install lapack; I debated whether to put it in 'build' or 'installdeps', but decided 'build' is maybe better,
-rem on the basis that it might be less stable, subject to changes/bugs/tweaks than eg 7zip install?
-rem (and also it is architecture specific etc, probalby subject to device-specific optimizations?)
-cd /d "%BASE%\soft"
-powershell.exe -Command (new-object System.Net.WebClient).DownloadFile('http://www.netlib.org/lapack/lapack-3.6.1.tgz', 'lapack-3.6.1.tgz')
-if errorlevel 1 exit /B 1
-"c:\program files\7-Zip\7z.exe" x lapack-3.6.1.tgz
-if errorlevel 1 exit /B 1
-"c:\program files\7-Zip\7z.exe" x lapack-3.6.1.tar >nul
-if errorlevel 1 exit /B 1
-dir lapack-3.6.1
-cd lapack-3.6.1
-mkdir build
-cd build
-set "SOFT=%BASE%\soft"
-cmd /c %BASE%\soft\msys64\usr\bin\bash.exe --login "%BASE%\win-files\install_lapack.sh"
+git submodule update --init --recursive
+
+echo BASE: %BASE%
echo luajit-rocks
-git clone https://github.com/torch/luajit-rocks.git
-if errorlevel 1 exit /B 1
-cd luajit-rocks
-mkdir build
-cd build
-cmake .. -DCMAKE_INSTALL_PREFIX=%BASE%/install -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release
-if errorlevel 1 exit /B 1
+mkdir "%BASE%\build"
+cd "%BASE%\build"
+cmake ..\exe\luajit-rocks -DWITH_%TORCH_LUA_VERSION%=ON -DCMAKE_INSTALL_PREFIX=%PREFIX% -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release
+if errorlevel 1 goto :error
nmake
-if errorlevel 1 exit /B 1
-cmake -DCMAKE_INSTALL_PREFIX=%BASE%/install -G "NMake Makefiles" -P cmake_install.cmake -DCMAKE_BUILD_TYPE=Release
-if errorlevel 1 exit /B 1
+if errorlevel 1 goto :error
+cmake -DCMAKE_INSTALL_PREFIX=%PREFIX% -G "NMake Makefiles" -P cmake_install.cmake -DCMAKE_BUILD_TYPE=Release
+if errorlevel 1 goto :error
set "LUA_CPATH=%BASE%/install/?.DLL;%BASE%/install/LIB/?.DLL;?.DLL"
set "LUA_DEV=%BASE%/install"
@@ -116,11 +83,62 @@ copy "%BASE%\win-files\cmake.cmd" "%BASE%\install" if errorlevel 1 exit goto :error
echo did copy of cmake
-rem cd "%BASE%\pkg"
-cd "%BASE%\pkg\torch"
-git checkout 7bbe17917ea560facdc652520e5ea01692e460d3
-cmd /c luarocks make "%BASE%\win-files\torch-scm-1.rockspec"
-if errorlevel 1 exit /B 1
+echo "Installing common Lua packages"
+cd %THIS_DIR%extra\luafilesystem
+cmd /c luarocks make rockspecs/luafilesystem-1.6.3-1.rockspec
+if errorlevel 1 goto :error
+cd %THIS_DIR%extra\penlight
+cmd /c luarocks make
+if errorlevel 1 goto :error
+cd %THIS_DIR%extra\lua-cjson
+cmd /c luarocks make
+if errorlevel 1 goto :error
+
+echo "Installing core Torch packages"
+cd %THIS_DIR%extra\luaffifb
+cmd /c luarocks make %Base%/win-files/luaffi-scm-1.rockspec
+if errorlevel 1 goto :error
+cd %THIS_DIR%pkg\sundown
+cmd /c luarocks make rocks/sundown-scm-1.rockspec
+if errorlevel 1 goto :error
+cd %THIS_DIR%pkg\cwrap
+cmd /c luarocks make rocks/cwrap-scm-1.rockspec
+if errorlevel 1 goto :error
+cd %THIS_DIR%pkg\paths
+cmd /c luarocks make rocks/paths-scm-1.rockspec
+if errorlevel 1 goto :error
+cd %THIS_DIR%pkg\torch
+cmd /c luarocks make %Base%/win-files/torch-scm-1.rockspec
+if errorlevel 1 goto :error
+cd %THIS_DIR%pkg\dok
+cmd /c luarocks make rocks/dok-scm-1.rockspec
+if errorlevel 1 goto :error
+cd %THIS_DIR%exe\trepl
+cmd /c luarocks make %Base%/win-files/trepl-scm-1.rockspec
+if errorlevel 1 goto :error
+cd %THIS_DIR%pkg\sys
+cmd /c luarocks make %Base%/win-files/sys-1.1-0.rockspec
+if errorlevel 1 goto :error
+cd %THIS_DIR%pkg\xlua
+cmd /c luarocks make xlua-1.0-0.rockspec
+if errorlevel 1 goto :error
+cd %THIS_DIR%extra\nn
+cmd /c luarocks make rocks/nn-scm-1.rockspec
+if errorlevel 1 goto :error
+cd %THIS_DIR%extra\graph
+cmd /c luarocks make %Base%/win-files/graph-scm-1.rockspec
+if errorlevel 1 goto :error
+cd %THIS_DIR%extra\nngraph
+cmd /c luarocks make
+if errorlevel 1 goto :error
+cd %THIS_DIR%pkg\image
+cmd /c luarocks make image-1.1.alpha-0.rockspec
+if errorlevel 1 goto :error
+cd %THIS_DIR%pkg\optim
+cmd /c luarocks make optim-1.0.5-0.rockspec
+if errorlevel 1 goto :error
+
+popd
luajit -e "require('torch')"
if errorlevel 1 exit /B 1
@@ -128,6 +146,9 @@ if errorlevel 1 exit /B 1 luajit -e "require('torch'); torch.test()"
if errorlevel 1 exit /B 1
+luajit -e "require('nn'); nn.test()"
+if errorlevel 1 exit /B 1
+
goto :eof
:error
diff --git a/exe/trepl b/exe/trepl -Subproject 47fec15d184fd613c3e5425f9dd5dbb11adef5f +Subproject f588b72e89788902d59f1eab968b7f9849f3f5f diff --git a/extra/cudnn b/extra/cudnn -Subproject a8cac6da1967e84c603301418f60a70b17e6c4f +Subproject d6e0ce57c32b6944140aeefcf696ed218c1b220 diff --git a/extra/cunn b/extra/cunn -Subproject b612429a80f0812a77eb7fec39d883d06aab63b +Subproject 7cff722b9f0e5c17793e8470551c6de7a8d6c1f diff --git a/extra/cutorch b/extra/cutorch -Subproject 8c3f15a9497bb23519ee3d60a765d223e001ab1 +Subproject a5429e37b32a2681eb00f0bb0d96b9b542b7ca8 diff --git a/extra/graph b/extra/graph -Subproject f6062bc79455cb5da77601f7b6ed6f919c735a8 +Subproject 47afe90ed1f047ff672deb5416aebcc7db05130 diff --git a/extra/luaffifb b/extra/luaffifb -Subproject d1c9712bfaaa73f9bc064227f120320e97fff51 +Subproject 610ce4dc6de318c8f0eb027f052be081349097b diff --git a/extra/nn b/extra/nn -Subproject a8e63f2da3d3d84a7e1eed917572901a9ffba5d +Subproject 7acd33d2f0f2caf5118404d40768c9cb2828f64 diff --git a/extra/nngraph b/extra/nngraph -Subproject e9fb022accf22feefd2b0b26a1aa72678560aed +Subproject f6aeb887333e5282b8497c53285bbe379f749f1 diff --git a/extra/threads b/extra/threads -Subproject f0464d81308956a67680c5bf5ebe36e7f5c0d01 +Subproject 1eaaf59925c4fff44a794e2ba6b3c734f37d6e7 diff --git a/install-deps b/install-deps index b417541..5f540d3 100755 --- a/install-deps +++ b/install-deps @@ -138,8 +138,11 @@ elif [[ "$(uname)" == 'Linux' ]]; then elif [[ "$DISTRO" = "debian" ]]; then distribution="debian" debian_major_version="$VERSION" + elif [[ "$DISTRO" = "neon" ]]; then + distribution="ubuntu" + ubuntu_major_version="${VERSION%%.*}" else - echo '==> Only Ubuntu, elementary OS, Fedora, Archlinux, OpenSUSE, Debian and CentOS distributions are supported.' + echo '==> Only Ubuntu, elementary OS, Fedora, Archlinux, OpenSUSE, Debian, CentOS and KDE neon distributions are supported.' exit 1 fi @@ -92,22 +92,22 @@ eval "$setup_lua_env_cmd" echo "Installing common Lua packages" cd ${THIS_DIR}/extra/luafilesystem && $PREFIX/bin/luarocks make rockspecs/luafilesystem-1.6.3-1.rockspec || exit 1 -cd ${THIS_DIR}/extra/penlight && $PREFIX/bin/luarocks make || exit 1 -cd ${THIS_DIR}/extra/lua-cjson && $PREFIX/bin/luarocks make || exit 1 +cd ${THIS_DIR}/extra/penlight && $PREFIX/bin/luarocks make penlight-scm-1.rockspec || exit 1 +cd ${THIS_DIR}/extra/lua-cjson && $PREFIX/bin/luarocks make lua-cjson-2.1devel-1.rockspec || exit 1 echo "Installing core Torch packages" -cd ${THIS_DIR}/extra/luaffifb && $PREFIX/bin/luarocks make || exit 1 +cd ${THIS_DIR}/extra/luaffifb && $PREFIX/bin/luarocks make luaffi-scm-1.rockspec || exit 1 cd ${THIS_DIR}/pkg/sundown && $PREFIX/bin/luarocks make rocks/sundown-scm-1.rockspec || exit 1 cd ${THIS_DIR}/pkg/cwrap && $PREFIX/bin/luarocks make rocks/cwrap-scm-1.rockspec || exit 1 cd ${THIS_DIR}/pkg/paths && $PREFIX/bin/luarocks make rocks/paths-scm-1.rockspec || exit 1 cd ${THIS_DIR}/pkg/torch && $PREFIX/bin/luarocks make rocks/torch-scm-1.rockspec || exit 1 cd ${THIS_DIR}/pkg/dok && $PREFIX/bin/luarocks make rocks/dok-scm-1.rockspec || exit 1 -cd ${THIS_DIR}/exe/trepl && $PREFIX/bin/luarocks make || exit 1 +cd ${THIS_DIR}/exe/trepl && $PREFIX/bin/luarocks make trepl-scm-1.rockspec || exit 1 cd ${THIS_DIR}/pkg/sys && $PREFIX/bin/luarocks make sys-1.1-0.rockspec || exit 1 cd ${THIS_DIR}/pkg/xlua && $PREFIX/bin/luarocks make xlua-1.0-0.rockspec || exit 1 cd ${THIS_DIR}/extra/nn && $PREFIX/bin/luarocks make rocks/nn-scm-1.rockspec || exit 1 cd ${THIS_DIR}/extra/graph && $PREFIX/bin/luarocks make rocks/graph-scm-1.rockspec || exit 1 -cd ${THIS_DIR}/extra/nngraph && $PREFIX/bin/luarocks make || exit 1 +cd ${THIS_DIR}/extra/nngraph && $PREFIX/bin/luarocks make nngraph-scm-1.rockspec || exit 1 cd ${THIS_DIR}/pkg/image && $PREFIX/bin/luarocks make image-1.1.alpha-0.rockspec || exit 1 cd ${THIS_DIR}/pkg/optim && $PREFIX/bin/luarocks make optim-1.0.5-0.rockspec || exit 1 @@ -121,7 +121,7 @@ fi # Optional packages echo "Installing optional Torch packages" cd ${THIS_DIR}/pkg/gnuplot && $PREFIX/bin/luarocks make rocks/gnuplot-scm-1.rockspec -cd ${THIS_DIR}/exe/env && $PREFIX/bin/luarocks make +cd ${THIS_DIR}/exe/env && $PREFIX/bin/luarocks make env-scm-1.rockspec cd ${THIS_DIR}/extra/nnx && $PREFIX/bin/luarocks make nnx-0.1-1.rockspec cd ${THIS_DIR}/exe/qtlua && $PREFIX/bin/luarocks make rocks/qtlua-scm-1.rockspec cd ${THIS_DIR}/pkg/qttorch && $PREFIX/bin/luarocks make rocks/qttorch-scm-1.rockspec diff --git a/installdeps_win.bat b/installdeps_win.bat index f56a760..e8f4675 100644 --- a/installdeps_win.bat +++ b/installdeps_win.bat @@ -1,3 +1,4 @@ +setlocal
rem This is very imperfect, since it assumes a lot of stuff is done by hand
rem But its a start
rem based heavily on hiili's instructions at https://github.com/torch/torch7/wiki/Windows#using-visual-studio
@@ -14,36 +15,146 @@ rem rem Note that this script isnt really standalone currently. You kind of have to copy and paste a few lines at a
rem time into the terminal really
-"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"
-set "PATH=%PATH%;C:\Program Files\CMake\bin"
-
powershell Set-ExecutionPolicy unrestricted
-mkdir C:\Downloads
-set DOWNLOADS=C:\Downloads
+SET "UN7ZIP=%ProgramFiles%\7-Zip\7z.exe"
+SET "CMAKE=%ProgramFiles%\CMake\bin\cmake.exe"
+
+set BASE=%~dp0
+set "THIS_DIR=%BASE%"
+set "PREFIX=%BASE%\install"
+mkdir /D "%BASE%\soft"
+pushd "%BASE%"
rem download stuff
-cd /d "%DOWNLOADS%"
+cd /d "%BASE%\soft"
+
+if not exist "%ProgramFiles%\7-Zip\7z.exe" (
+ Call :Install7Zip
+ if errorlevel 1 exit /B 1
+)
+
+if not exist "%ProgramFiles%\CMake\bin\cmake.exe" (
+ CALL :InstallCMake
+ if errorlevel 1 exit /B 1
+)
+
+if not exist "%ProgramFiles%\Git\bin\git.exe" (
+ CALL :InstallGit
+ if errorlevel 1 exit /B 1
+)
+
+IF "%VS140COMNTOOLS%" == "" (
+echo Please go to https://www.visualstudio.com/products/visual-studio-express-vs to install VS 2015 Comminity edition
+rem this will bring up the downloa dpage. you still need to click through it, but it saves all those ie security dialogs...
+rem download the vs2015 community edition, and then open it, run it, install it
+ GOTO :EOF
+)
+
+rem setup VCVARS
+call "%VS140COMNTOOLS%\..\..\VC\bin\amd64\vcvars64.bat"
+
+if not exist %TORCH_INSTALL%\bin\edit.dll (
+ CALL :DownloadsLibEdit
+ if errorlevel 1 exit /B 1
+)
+
+if not exist %TORCH_INSTALL%\libopenblas.dll (
+ CALL :InstallOpenBlas
+ if errorlevel 1 exit /B 1
+)
+popd
+GOTO :EOF
+
+REM Functions
+
+:Install7Zip
powershell.exe -Command (new-object System.Net.WebClient).DownloadFile('http://7-zip.org/a/7z920-x64.msi', '7x920-x64.msi')
msiexec /passive /i 7x920-x64.msi
-rem poor man's sleep :-P
-ping -n 10 127.0.0.1
+sleep 30
+EXIT /B
-powershell.exe -Command (new-object System.Net.WebClient).DownloadFile('https://cmake.org/files/v3.6/cmake-3.6.2-win64-x64.msi', 'cmake-3.6.2-win64-x64.msi')
+:InstallCMake
+powershell.exe -Command "(new-object System.Net.WebClient).DownloadFile('https://cmake.org/files/v3.6/cmake-3.6.2-win64-x64.msi', 'cmake-3.6.2-win64-x64.msi')"
msiexec /passive /i cmake-3.6.2-win64-x64.msi
-rem poor man's sleep :-P
-ping -n 10 127.0.0.1
+sleep 30
+EXIT /B
+:InstallGit
powershell.exe -Command (new-object System.Net.WebClient).DownloadFile('https://github.com/git-for-windows/git/releases/download/v2.9.2.windows.1/Git-2.9.2-64-bit.exe', 'Git-2.9.2-64-bit.exe')
Git-2.9.2-64-bit.exe /silent
-ping -n 30 127.0.0.1
+sleep 30
+Exit /B
-rem install firefox, because it makes downloading visual studio express easier
-powershell.exe -Command (new-object System.Net.WebClient).DownloadFile('https://download.mozilla.org/?product=firefox-48.0.2-SSL"&"os=win"&"lang=en-US', 'firefox-48.0.2.exe')
-firefox-48.0.2 /s
-ping -n 10 127.0.0.1
+:InstallMsys
+powershell.exe -Command (new-object System.Net.WebClient).DownloadFile('https://sourceforge.net/projects/msys2/files/Base/x86_64/msys2-base-x86_64-20160205.tar.xz/download', 'msys2-base-x86_64-20160205.tar.xz')
+if errorlevel 1 exit /B 1
+"%UN7ZIP%" x msys2-base-x86_64-20160205.tar.xz
+if errorlevel 1 exit /B 1
+"%UN7ZIP%" x msys2-base-x86_64-20160205.tar >nul
+if errorlevel 1 exit /B 1
+cmd /c msys64\usr\bin\bash --login exit
+cmd /c msys64\usr\bin\bash --login -c "pacman -Syu --noconfirm"
+cmd /c msys64\usr\bin\bash --login -c "pacman -Sy make mingw-w64-x86_64-gcc mingw-w64-x86_64-gcc-fortran --noconfirm"
+Exit /B
-"c:\Program Files (x86)\Mozilla Firefox\firefox.exe" "https://www.visualstudio.com/products/visual-studio-express-vs"
-rem this will bring up the downloa dpage. you still need to click through it, but it saves all those ie security dialogs...
-rem download the vs2015 community edition, and then open it, run it, install it
+:DownloadsLibEdit
+powershell.exe -Command (new-object System.Net.WebClient).DownloadFile('http://downloads.sourceforge.net/project/mingweditline/wineditline-2.101.zip', 'wineditline-2.101.zip')
+if errorlevel 1 exit /B 1
+"%UN7ZIP%" x wineditline-2.101.zip
+if errorlevel 1 exit /B 1
+cd wineditline-2.101
+mkdir build
+cd build
+"%CMAKE%" .. -DCMAKE_INSTALL_PREFIX=%PREFIX% -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release
+if errorlevel 1 exit /B 1
+NMake
+if errorlevel 1 exit /B 1
+mkdir %PREFIX%\bin\
+copy src\edit.dll %PREFIX%\bin\edit.dll
+mkdir %PREFIX%\include\readline
+copy ..\include\editline\readline.h %PREFIX%\include\readline\readline.h
+mkdir %PREFIX%\lib\
+copy src\edit.lib %PREFIX%\lib\libedit.lib
+copy src\edit_static.lib %PREFIX%\lib\libedit_static.lib
+EXIT /B
+
+:DownloadLapack
+powershell.exe -Command (new-object System.Net.WebClient).DownloadFile('http://www.netlib.org/lapack/lapack-3.6.1.tgz', 'lapack-3.6.1.tgz')
+if errorlevel 1 exit /B 1
+"%UN7ZIP%" x lapack-3.6.1.tgz
+if errorlevel 1 exit /B 1
+"%UN7ZIP%" x lapack-3.6.1.tar >nul
+if errorlevel 1 exit /B 1
+EXIT /B
+
+:InstallOpenBlas
+set BASE=%~dp0
+set "TORCH_INSTALL=%BASE%\install"
+
+echo BASE: %BASE%
+
+rem install msys64
+rem compared to the instructions on the website, using bash direclty is synchronous, and puts the output into our
+rem console/jenkins
+rem we install it here, since it's a bit non-standard (cf 7zip, cmake, msvc2015, which I think are reasonably standard?)
+rem we need it, because we need a fortran compiler
+cd /d "%BASE%\soft"
+if not exist "%BASE%\soft\msys64" (
+ call :InstallMsys
+)
+
+rem Keep openblas in install-dep since the script can handle rerun
+cd /d "%BASE%\soft"
+if not exist "%BASE%\soft\lapack-3.6.1" (
+ CALL :DownloadLapack
+)
+
+cd lapack-3.6.1
+mkdir build
+cd build
+set "SOFT=%BASE%\soft"
+cmd /c %BASE%\soft\msys64\usr\bin\bash.exe --login "%BASE%\win-files\install_lapack.sh"
+
+Exit /B
\ No newline at end of file diff --git a/pkg/gnuplot b/pkg/gnuplot -Subproject dd56a75911f73c15d063ef5de7e067fb6bf6aaf +Subproject 1badc6af7835e85f42ce4cef6e3ef09f477e92a diff --git a/pkg/paths b/pkg/paths -Subproject 68d579a2d3b1b0bb03a11637632e6e699b14ad8 +Subproject 2bc6460199cb4c2b37796060ec02edf1e646e7a diff --git a/pkg/sundown b/pkg/sundown -Subproject 17ea705429f818cd9b290c0879b577607bc6e87 +Subproject 4324669b1adbde92cef2dbf4550428a13a03ca6 diff --git a/pkg/sys b/pkg/sys -Subproject 512e61a3e23fa3fd5bf84f09f380131552c2fff +Subproject f073f057d3fd2148866eaa0444a62ababfdf935 diff --git a/pkg/torch b/pkg/torch -Subproject 1e5a315d03c91286d859512574d3b0b25e12d51 +Subproject 78de5cd4032bc2cb4d6197e891ebc3ad1a116a0 diff --git a/torch-active.bat b/torch-active.bat new file mode 100644 index 0000000..c36e2bb --- /dev/null +++ b/torch-active.bat @@ -0,0 +1,5 @@ +set BASE=%~dp0 +set "LUA_CPATH=%BASE%/install/?.DLL;%BASE%/install/LIB/?.DLL;?.DLL" +set "LUA_DEV=%BASE%/install" +set "LUA_PATH=%BASE%/install/?;%BASE%/install/luarocks/?;%BASE%/install/luarocks/?.lua;%BASE%/install/pkg/?;%BASE%/install/pkg/?.lua;%BASE%/install/?.lua;%BASE%/install/lua/?.lua;%BASE%/install/lua/?/init.lua" +set "PATH=%PATH%;%BASE%\install;%BASE%\install\bin"
\ No newline at end of file diff --git a/win-files/cmake.cmd b/win-files/cmake.cmd index 34ff622..93f847d 100644 --- a/win-files/cmake.cmd +++ b/win-files/cmake.cmd @@ -1,3 +1,4 @@ +setlocal
set "PATH=%PATH%;C:\Program Files\CMake\bin"
if %1 == -E (
diff --git a/win-files/graph-scm-1.rockspec b/win-files/graph-scm-1.rockspec new file mode 100644 index 0000000..1260131 --- /dev/null +++ b/win-files/graph-scm-1.rockspec @@ -0,0 +1,27 @@ +package = "graph" +version = "scm-1" + +source = { + url = "git://github.com/torch/graph", + tag = "master" +} + +description = { + summary = "Graph package for Torch", + homepage = "https://github.com/torch/graph", + license = "UNKNOWN" +} + +dependencies = { + "torch >= 7.0" +} + +build = { + type = "builtin", + modules = { + ['graph.init'] = 'init.lua', + ['graph.graphviz'] = 'graphviz.lua', + ['graph.Node'] = 'Node.lua', + ['graph.Edge'] = 'Edge.lua' + } +} diff --git a/win-files/luaffi-scm-1.rockspec b/win-files/luaffi-scm-1.rockspec new file mode 100644 index 0000000..c84cc71 --- /dev/null +++ b/win-files/luaffi-scm-1.rockspec @@ -0,0 +1,35 @@ +package = "luaffi" +version = "scm-1" + +source = { + url = "git://github.com/facebook/luaffifb.git", +} + +description = { + summary = "FFI library for calling C functions from lua", + detailed = [[ + ]], + homepage = "https://github.com/facebook/luaffifb", + license = "BSD" +} + +dependencies = { + "lua >= 5.1", +} + +build = { + type = "builtin", + noexp = true, + modules = { + ['ffi'] = { + incdirs = { + "dynasm" + }, + sources = { + "call.c", "ctype.c", "ffi.c", "parser.c", + } + }, + ['ffi.libtest'] = 'test.c', + ['ffi.test'] = 'test.lua' + } +} diff --git a/win-files/sys-1.1-0.rockspec b/win-files/sys-1.1-0.rockspec new file mode 100644 index 0000000..704f621 --- /dev/null +++ b/win-files/sys-1.1-0.rockspec @@ -0,0 +1,33 @@ +package = "sys" +version = "1.1-0" + +source = { + url = "git://github.com/torch/sys" +} + +description = { + summary = "A system library for Torch", + detailed = [[ +Provides system functionalities for Torch. + ]], + homepage = "https://github.com/torch/sys", + license = "BSD" +} + +dependencies = { + "torch >= 7.0", +} + +build = { + type = "builtin", + modules = { + ['sys.init'] = 'init.lua', + ['sys.fpath'] = 'fpath.lua', + ['sys.colors'] = 'colors.lua', + libsys = { + sources = { + "sys.c" + } + } + } +} diff --git a/win-files/trepl-scm-1.rockspec b/win-files/trepl-scm-1.rockspec new file mode 100644 index 0000000..710f4cd --- /dev/null +++ b/win-files/trepl-scm-1.rockspec @@ -0,0 +1,55 @@ +package = "trepl" +version = "scm-1" + +source = { + url = "git://github.com/torch/trepl", + branch = "master", +} + +description = { + summary = "An embedabble, Lua-only REPL for Torch.", + detailed = [[ +An embedabble, Lua-only REPL for Torch. + ]], + homepage = "https://github.com/torch/trepl", + license = "BSD" +} + +dependencies = { + "torch >= 7.0", + "penlight >= 1.1.0", +} + +build = { + type = "builtin", + modules = { + ['trepl.init'] = 'init.lua', + ['trepl.colors'] = 'colors.lua', + ['trepl.colorize'] = 'colorize.lua', + ['readline'] = { + sources = {'readline.c'}, + libraries = {'readline'} + }, + ['treplutils'] = { + sources = {'utils.c'}, + } + }, + platforms = { + windows = { + modules = { + ['readline'] = { + sources = {'readline.c'}, + defines = {"EDITLINE"}, + incdirs = {"../../install/include"}, + libdirs = {"../../install/lib"}, + libraries = {'libedit_static', 'User32'} + } + } + } + }, + install = { + bin = { + 'th' + } + } +} |