Modified: incubator/singa/site/trunk/en/docs/install_macos1013.html URL: http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/docs/install_macos1013.html?rev=1831260&r1=1831259&r2=1831260&view=diff ============================================================================== --- incubator/singa/site/trunk/en/docs/install_macos1013.html (original) +++ incubator/singa/site/trunk/en/docs/install_macos1013.html Wed May 9 15:25:26 2018 @@ -344,9 +344,7 @@ jupyter notebook <script type="text/javascript"> jQuery(function () { - - SphinxRtdTheme.Navigation.enableSticky(); - + SphinxRtdTheme.Navigation.enable(true); }); </script>
Added: incubator/singa/site/trunk/en/docs/install_win.html URL: http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/docs/install_win.html?rev=1831260&view=auto ============================================================================== --- incubator/singa/site/trunk/en/docs/install_win.html (added) +++ incubator/singa/site/trunk/en/docs/install_win.html Wed May 9 15:25:26 2018 @@ -0,0 +1,454 @@ + + + +<!DOCTYPE html> +<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]--> +<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]--> +<head> + <meta charset="utf-8"> + + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + + <title>Building SINGA on Windows — incubator-singa 1.1.0 documentation</title> + + + + + + + + + + + + + + + + + <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" /> + <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> + <link rel="index" title="Index" href="../genindex.html" /> + <link rel="search" title="Search" href="../search.html" /> + <link href="../_static/style.css" rel="stylesheet" type="text/css"> + + + + <script src="../_static/js/modernizr.min.js"></script> + +</head> + +<body class="wy-body-for-nav"> + + + <div class="wy-grid-for-nav"> + + + <nav data-toggle="wy-nav-shift" class="wy-nav-side"> + <div class="wy-side-scroll"> + <div class="wy-side-nav-search"> + + + + <a href="../index.html" class="icon icon-home"> incubator-singa + + + + + <img src="../_static/singa.png" class="logo" alt="Logo"/> + + </a> + + + + + <div class="version"> + latest + </div> + + + + +<div role="search"> + <form id="rtd-search-form" class="wy-form" action="../search.html" method="get"> + <input type="text" name="q" placeholder="Search docs" /> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + </form> +</div> + + + </div> + + <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation"> + + + + + + + <ul> +<li class="toctree-l1"><a class="reference internal" href="../downloads.html">Download SINGA</a></li> +<li class="toctree-l1"><a class="reference internal" href="index.html">Documentation</a></li> +</ul> +<p class="caption"><span class="caption-text">Development</span></p> +<ul> +<li class="toctree-l1"><a class="reference internal" href="../develop/schedule.html">Development Schedule</a></li> +<li class="toctree-l1"><a class="reference internal" href="../develop/how-contribute.html">How to Contribute to SINGA</a></li> +<li class="toctree-l1"><a class="reference internal" href="../develop/contribute-code.html">How to Contribute Code</a></li> +<li class="toctree-l1"><a class="reference internal" href="../develop/contribute-docs.html">How to Contribute to Documentation</a></li> +</ul> +<p class="caption"><span class="caption-text">Community</span></p> +<ul> +<li class="toctree-l1"><a class="reference internal" href="../community/source-repository.html">Source Repository</a></li> +<li class="toctree-l1"><a class="reference internal" href="../community/mail-lists.html">Project Mailing Lists</a></li> +<li class="toctree-l1"><a class="reference internal" href="../community/issue-tracking.html">Issue Tracking</a></li> +<li class="toctree-l1"><a class="reference internal" href="../community/team-list.html">The SINGA Team</a></li> +</ul> + + + + </div> + </div> + </nav> + + <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"> + + + <nav class="wy-nav-top" aria-label="top navigation"> + + <i data-toggle="wy-nav-top" class="fa fa-bars"></i> + <a href="../index.html">incubator-singa</a> + + </nav> + + + <div class="wy-nav-content"> + + <div class="rst-content"> + + + + + + + + + + + + + + + + + +<div role="navigation" aria-label="breadcrumbs navigation"> + + <ul class="wy-breadcrumbs"> + + <li><a href="../index.html">Docs</a> »</li> + + <li>Building SINGA on Windows</li> + + + <li class="wy-breadcrumbs-aside"> + + + + </li> + + </ul> + + + <hr/> +</div> + <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article"> + <div itemprop="articleBody"> + + <div class="section" id="building-singa-on-windows"> +<h1>Building SINGA on Windows<a class="headerlink" href="#building-singa-on-windows" title="Permalink to this headline">¶</a></h1> +<p>The process of building SINGA from source on Microsoft Windows has three parts: install dependencies, build SINGA source, and (optionally) install the python module.</p> +<div class="section" id="install-dependencies"> +<h2>1. Install Dependencies<a class="headerlink" href="#install-dependencies" title="Permalink to this headline">¶</a></h2> +<p>You may create a folder for building the dependencies.</p> +<p>The dependencies are:</p> +<ul> +<li><dl class="first docutils"> +<dt>Compiler and IDE</dt> +<dd><ul class="first last simple"> +<li>Visual Studio. The community edition is free and can be used to build SINGA. <a class="reference external" href="https://www.visualstudio.com/">https://www.visualstudio.com/</a></li> +</ul> +</dd> +</dl> +</li> +<li><dl class="first docutils"> +<dt>CMake</dt> +<dd><ul class="first last simple"> +<li>Can be downloaded from <a class="reference external" href="http://cmake.org/">http://cmake.org/</a></li> +<li>Make sure the path to cmake executable is in the system path, or use full path when calling cmake.</li> +</ul> +</dd> +</dl> +</li> +<li><dl class="first docutils"> +<dt>SWIG</dt> +<dd><ul class="first last simple"> +<li>Can be downloaded from <a class="reference external" href="http://swig.org/">http://swig.org/</a></li> +<li>Make sure the path to swig executable is in the system path, or use full path when calling swig. Use a recent version such as 3.0.12.</li> +</ul> +</dd> +</dl> +</li> +<li><dl class="first docutils"> +<dt>Protocol Buffers</dt> +<dd><ul class="first last simple"> +<li>Download a suitable version such as 2.6.1: <a class="reference external" href="https://github.com/google/protobuf/releases/tag/v2.6.1">https://github.com/google/protobuf/releases/tag/v2.6.1</a> .</li> +<li>Download both protobuf-2.6.1.zip and protoc-2.6.1-win32.zip .</li> +<li>Extract both of them in dependecies folder. Add the path to protoc executable to the system path, or use full path when calling it.</li> +<li>Open the Visual Studio solution which can be found in vsproject folder.</li> +<li>Change the build settings to Release and x64.</li> +<li>build libprotobuf project.</li> +</ul> +</dd> +</dl> +</li> +<li><dl class="first docutils"> +<dt>Openblas</dt> +<dd><ul class="first simple"> +<li>Download a suitable source version such as 0.2.20 from <a class="reference external" href="http://www.openblas.net">http://www.openblas.net</a></li> +<li>Extract the source in the dependecies folder.</li> +<li>If you donât have Perl installed, download a perl environment such as Strawberry Perl (<a class="reference external" href="http://strawberryperl.com/">http://strawberryperl.com/</a>)</li> +<li>Build the Visual Studio solution by running this command in the source folder:</li> +</ul> +<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>cmake -G <span class="s2">"Visual Studio 15 2017 Win64"</span> +</pre></div> +</div> +<ul class="last simple"> +<li>Open the Visual Studio solution and change the build settings to Release and x64.</li> +<li>Build libopenblas project</li> +</ul> +</dd> +</dl> +</li> +<li><dl class="first docutils"> +<dt>Google glog</dt> +<dd><ul class="first last simple"> +<li>Download a suitable version such as 0.3.5 from <a class="reference external" href="https://github.com/google/glog/releases">https://github.com/google/glog/releases</a></li> +<li>Extract the source in the dependencies folder.</li> +<li>Open the Visual Studio solution.</li> +<li>Change the build settings to Release and x64.</li> +<li>Build libglog project</li> +</ul> +</dd> +</dl> +</li> +</ul> +</div> +<div class="section" id="build-singa-source"> +<h2>2. Build SINGA source<a class="headerlink" href="#build-singa-source" title="Permalink to this headline">¶</a></h2> +<ul class="simple"> +<li>Download SINGA source code</li> +<li><dl class="first docutils"> +<dt>Compile the protobuf files:</dt> +<dd><ul class="first last"> +<li>Goto src/proto folder</li> +</ul> +</dd> +</dl> +</li> +</ul> +<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>mkdir python_out +protoc.exe *.proto --python_out python_out +</pre></div> +</div> +<ul class="simple"> +<li><dl class="first docutils"> +<dt>Generate swig interfaces for C++ and Python:</dt> +<dd>Goto src/api</dd> +</dl> +</li> +</ul> +<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>swig -python -c++ singa.i +</pre></div> +</div> +<ul class="simple"> +<li><dl class="first docutils"> +<dt>generate Visual Studio solution for SINGA:</dt> +<dd>Goto SINGA source code root folder</dd> +</dl> +</li> +</ul> +<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>mkdir build +<span class="nb">cd</span> build +</pre></div> +</div> +<ul class="simple"> +<li>Call cmake and add the paths in your system similar to the following example:</li> +</ul> +<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>cmake -G <span class="s2">"Visual Studio 15 2017 Win64"</span> ^ + -DGLOG_INCLUDE_DIR<span class="o">=</span><span class="s2">"D:/WinSinga/dependencies/glog-0.3.5/src/windows"</span> ^ + -DGLOG_LIBRARIES<span class="o">=</span><span class="s2">"D:/WinSinga/dependencies/glog-0.3.5/x64/Release"</span> ^ + -DCBLAS_INCLUDE_DIR<span class="o">=</span><span class="s2">"D:/WinSinga/dependencies/openblas-0.2.20/lapack-netlib/CBLAS/include"</span> ^ + -DCBLAS_LIBRARIES<span class="o">=</span><span class="s2">"D:/WinSinga/dependencies/openblas-0.2.20/lib/RELEASE"</span> ^ + -DProtobuf_INCLUDE_DIR<span class="o">=</span><span class="s2">"D:/WinSinga/dependencies/protobuf-2.6.1/src"</span> ^ + -DProtobuf_LIBRARIES<span class="o">=</span><span class="s2">"D:/WinSinga/dependencies/protobuf-2.6.1/vsprojects/x64/Release"</span> ^ + -DProtobuf_PROTOC_EXECUTABLE<span class="o">=</span><span class="s2">"D:/WinSinga/dependencies/protoc-2.6.1-win32/protoc.exe"</span> ^ + .. +</pre></div> +</div> +<ul class="simple"> +<li>Open the generated solution in Visual Studio</li> +<li>Change the build settings to Release and x64</li> +<li>Add the singa_wrap.cxx file from src/api to the singa_objects project</li> +<li>In the singa_objects project, open Additional Include Directories.</li> +<li>Add Python include path</li> +<li>Add numpy include path</li> +<li>Add protobuf include path</li> +<li>In the preprocessor definitions of the singa_objects project, add USE_GLOG</li> +<li>Build singa_objects project</li> +<li><dl class="first docutils"> +<dt>In singa project:</dt> +<dd><ul class="first last"> +<li>add singa_wrap.obj to Object Libraries</li> +<li>change target name to _singa_wrap</li> +<li>change target extension to .pyd</li> +<li>change configuration type to Dynamic Library (.dll)</li> +<li>goto Additional Library Directories and add the path to python, openblas, protobuf and glog libraries</li> +<li>goto Additional Dependencies and add libopenblas.lib, libglog.lib and libprotobuf.lib</li> +</ul> +</dd> +</dl> +</li> +<li>build singa project</li> +</ul> +</div> +<div class="section" id="install-python-module"> +<h2>3. Install Python module<a class="headerlink" href="#install-python-module" title="Permalink to this headline">¶</a></h2> +<ul class="simple"> +<li>Change _singa_wrap.so to _singa_wrap.pyd in build/python/setup.py</li> +<li>Copy the files in src/proto/python_out to build/python/singa/proto</li> +<li>Optionally create and activate a virtual environment:</li> +</ul> +<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>mkdir SingaEnv +virtualenv SingaEnv +SingaEnv<span class="se">\S</span>cripts<span class="se">\a</span>ctivate +</pre></div> +</div> +<ul class="simple"> +<li>goto build/python folder and run:</li> +</ul> +<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>python setup.py install +</pre></div> +</div> +<ul class="simple"> +<li>Make _singa_wrap.pyd, libglog.dll and libopenblas.dll available by adding them to the path or by copying them to singa package folder in the python site-packages</li> +<li>Verify that SINGA is installed by running:</li> +</ul> +<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>python -c <span class="s2">"from singa import tensor"</span> +</pre></div> +</div> +<p>A video tutorial for the build process can be found here:</p> +<table border="1" class="docutils"> +<colgroup> +<col width="100%" /> +</colgroup> +<tbody valign="top"> +<tr class="row-odd"><td><a class="reference external" href="https://www.youtube.com/watch?v=cteER7WeiGk"><img alt="video" class="align-middle" src="https://img.youtube.com/vi/cteER7WeiGk/0.jpg" /></a></td> +</tr> +</tbody> +</table> +</div> +</div> + + + </div> + + </div> + <footer> + + + <hr/> + + <div role="contentinfo"> + <p> + © Copyright 2018 The Apache Software Foundation. All rights reserved. Apache SINGA, Apache, the Apache feather logo, and the Apache SINGA project logos are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.. + + </p> + </div> + Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. + +</footer> + + </div> + </div> + + </section> + + </div> + + + + + + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT:'../', + VERSION:'1.1.0', + LANGUAGE:'None', + COLLAPSE_INDEX:false, + FILE_SUFFIX:'.html', + HAS_SOURCE: true, + SOURCELINK_SUFFIX: '.txt' + }; + </script> + <script type="text/javascript" src="../_static/jquery.js"></script> + <script type="text/javascript" src="../_static/underscore.js"></script> + <script type="text/javascript" src="../_static/doctools.js"></script> + + + + + + <script type="text/javascript" src="../_static/js/theme.js"></script> + + + <script type="text/javascript"> + jQuery(function () { + SphinxRtdTheme.Navigation.enable(true); + }); + </script> + +<div class="rst-versions shift-up" data-toggle="rst-versions" role="note" aria-label="versions"> + <span class="rst-current-version" data-toggle="rst-current-version"> + <span class="fa fa-book"> incubator-singa </span> + v: latest + <span class="fa fa-caret-down"></span> + </span> + <div class="rst-other-versions"> + <dl> + <dt>Languages</dt> + <dd><a href="../../en/index.html">English</a></dd> + <dd><a href="../../zh/index.html">䏿</a></dd> + </dl> + <dl> + <dt>Versions</dt> + <dd><a href="http://singa.apache.org/v0.3.0/">0.3</a></dd> + <dd><a href="http://singa.apache.org/v1.1.0/">1.1</a></dd> + </dl> + + </div> + <a href="http://incubator.apache.org/"> <img src= "../_static/apache.png" style="background-color:white;"> </a> +</div> + + <a href="https://github.com/apache/incubator-singa"> + <img style="position: absolute; top: 0; right: 0; border: 0; z-index: 10000;" + src="https://s3.amazonaws.com/github/ribbons/forkme_right_orange_ff7600.png" + alt="Fork me on GitHub"> +</a> + + + + +</body> +</html> \ No newline at end of file Modified: incubator/singa/site/trunk/en/docs/installation.html URL: http://svn.apache.org/viewvc/incubator/singa/site/trunk/en/docs/installation.html?rev=1831260&r1=1831259&r2=1831260&view=diff ============================================================================== --- incubator/singa/site/trunk/en/docs/installation.html (original) +++ incubator/singa/site/trunk/en/docs/installation.html Wed May 9 15:25:26 2018 @@ -481,39 +481,7 @@ $ make package </div> <div class="section" id="compile-singa-on-windows"> <span id="compile-singa-on-windows"></span><h3>Compile SINGA on Windows<a class="headerlink" href="#compile-singa-on-windows" title="Permalink to this headline">¶</a></h3> -<p>For the dependent library installation, please refer to <a class="reference external" href="dependencies.md">Dependencies</a>. -After all the dependencies are successfully installed, just run the following commands to -generate the VS solution in cmd under singa folder:</p> -<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ md build && cd build -$ cmake -G "Visual Studio 14" -DUSE_CUDA=OFF -DUSE_PYTHON=OFF .. -</pre></div> -</div> -<p>The default project generated by the command is 32-bit version. You can also -specify a 64-bit version project by:</p> -<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ md build && cd build -$ cmake -G "Visual Studio 14 Win64" -DUSE_CUDA=OFF -DUSE_PYTHON=OFF .. -</pre></div> -</div> -<p>If you get error outputs like âCould NOT find xxxxxâ indicating a dependent -library missing, configure your library file and include path for cmake or the system. -For example, you get an error âCould NOT find CBLASâ and suppose you installed -openblas header files at âd:\includeâ and openblas library at âd:\libâ. You should run the -following command to specify your cblas parameters in cmake:</p> -<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ cmake -G "Visual Studio 14" -DUSE_CUDA=OFF -DUSE_PYTHON=OFF -DCBLAS_INCLUDE_DIR="d:\include" -DCBLAS_LIBRARIES="d:\lib\libopenblas.lib" -DProtobuf_INCLUDE_DIR=<include dir of protobuf> -DProtobuf_LIBRARIES=<path to libprotobuf.lib> -DProtobuf_PROTOC_EXECUTABLE=<path to protoc.exe> -DGLOG_INCLUDE_DIR=<include dir of glog> -DGLOG_LIBRARIES=<path to libglog.lib> .. -</pre></div> -</div> -<p>To find out the parameters you need to specify for some special libraries, you -can run the following command:</p> -<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ cmake -LAH -</pre></div> -</div> -<p>If you use cmake GUI tool in windows, make sure you configure the right -parameters for the singa solution by select âAdvancedâ box. After generating the VS project, -open the âsinga.slnâ project file under -the âbuildâ folder and compile it as a normal VS solution. You will find the -unit tests file named âtest_singaâ in the project binary folder. -If you get errors when running test_singa.exe due to libglog.dll/libopenblas.dll missing, -just copy the dll files into the same folder as test_singa.exe</p> +<p>Instructions for building on Windows with Python support can be found <a class="reference external" href="install_win.html">here</a>.</p> </div> </div> <div class="section" id="faq"> @@ -732,9 +700,7 @@ In particular, if you build PySINGA from <script type="text/javascript"> jQuery(function () { - - SphinxRtdTheme.Navigation.enableSticky(); - + SphinxRtdTheme.Navigation.enable(true); }); </script>
