Repository: incubator-singa
Updated Branches:
  refs/heads/master a3f34cb07 -> e8e466068


update installation page for instructions of using conda to install singa
export the protobuf path when compiling singa on osx using travis


Project: http://git-wip-us.apache.org/repos/asf/incubator-singa/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-singa/commit/e8e46606
Tree: http://git-wip-us.apache.org/repos/asf/incubator-singa/tree/e8e46606
Diff: http://git-wip-us.apache.org/repos/asf/incubator-singa/diff/e8e46606

Branch: refs/heads/master
Commit: e8e466068231f71ed22793801e78509ba2db5217
Parents: a3f34cb
Author: wangwei <[email protected]>
Authored: Sat Feb 25 23:13:26 2017 +0800
Committer: wangwei <[email protected]>
Committed: Sun Feb 26 00:25:02 2017 +0800

----------------------------------------------------------------------
 doc/en/docs/installation.md | 121 +++++++--------------------------------
 python/setup.py.in          |   8 +--
 tool/jenkins/jenkins_doc.sh |   3 +-
 tool/travis/build.sh        |  11 ++--
 tool/travis/depends.sh      |   2 +-
 5 files changed, 36 insertions(+), 109 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/e8e46606/doc/en/docs/installation.md
----------------------------------------------------------------------
diff --git a/doc/en/docs/installation.md b/doc/en/docs/installation.md
index 116f629..7772cc0 100755
--- a/doc/en/docs/installation.md
+++ b/doc/en/docs/installation.md
@@ -1,109 +1,38 @@
 # Installation
 
+## From Conda
 
-## From wheel
+Conda is a package manager provided by 
[Anaconda](https://www.continuum.io/downloads) or 
[Miniconda](https://conda.io/miniconda.html).
+Currently, SINGA has conda packages (Python2.7) for Linux and MacOSX.
 
-Users can download the pre-compiled wheel files to install PySINGA.
-PySINGA has been tested on Linux (Ubunu 14.04 and 16.04) and Mac OS (10.11 and 
10.12).
+### Linux
 
-### Pre-requisite
-
-Python 2.7 and pip are required
-
-    # For Ubuntu
-    $ sudo apt-get install python2.7-dev python-pip
-
-    # For Mac
-    $ brew tap homebrew/python
-    $ brew install python
+1. CPU only
 
-Note for Mac OS, you need to configure the (python) paths correctly if 
multiple python versions are installed.
-Refer to FAQ for the errors and solutions.
+        conda install -c nusdbsystem singa
 
-### Virtual environment
+2. GPU via CUDA+cuDNN
 
-Users are recommended to use PySINGA in python virtual environment.
+        conda install -c nusdbsystem singa-cudax.y-cudnnz
 
-To use pip with virtual environment,
+    where `x.y,z` is one of <8.0, 5>, <7.5, 5> and <7.5, 4>.
+    Users need to install CUDA and cuDNN before installing SINGA.
+    If cuDNN is not in system folders (e.g., /usr/local), export the folder of 
libcudnn.so to LD_LIBRARY_PATH
 
-    # install virtualenv
-    $ pip install virtualenv
-    $ virtualenv pysinga
-    $ source pysinga/bin/activate
 
-To use anaconda with virtual environment,
+### Mac OSX
 
-    $ conda create --name pysinga python=2
-    $ source activate pysinga
+Only the CPU version is available,
 
+    conda config --add channels conda-forge
+    conda install -c nusdbsystem singa
 
-Note that in python virtual environment, you may need to reset the 
`PYTHONPATH` to empty
-to avoid the conflicts of system path and virtual environment path.
 
+If there is no error message from
 
-### Instructions
+    python -c "from singa import tensor"
 
-Currently, the following wheel files are available,
-
-<table border="1">
-  <tr>
-    <th>OS</th>
-    <th>Device</th>
-    <th>CUDA/cuDNN</th>
-    <th>Link</th>
-  </tr>
-  <tr>
-    <td>Ubuntu14.04</td>
-    <td>CPU</td>
-    <td>-</td>
-    <td><a 
href="http://comp.nus.edu.sg/~dbsystem/singa/assets/file/wheel/linux/latest/ubuntu14.04-cpp/";>latest</a>,
 <a 
href="http://www.comp.nus.edu.sg/~dbsystem/singa/assets/file/wheel/linux";>history</a></td>
-  </tr>
-  <tr>
-    <td>Ubuntu14.04</td>
-    <td>GPU</td>
-    <td>CUDA7.5+cuDNN4</td>
-    <td><a 
href="http://comp.nus.edu.sg/~dbsystem/singa/assets/file/wheel/linux/latest/ubuntu14.04-cuda7.5-cudnn4/";>latest</a>,
 <a 
href="http://www.comp.nus.edu.sg/~dbsystem/singa/assets/file/wheel/linux";>history</a></td>
-  </tr>
-  <tr>
-    <td>Ubuntu14.04</td>
-    <td>GPU</td>
-    <td>CUDA7.5+cuDNN5</td>
-    <td><a 
href="http://comp.nus.edu.sg/~dbsystem/singa/assets/file/wheel/linux/latest/ubuntu14.04-cuda7.5-cudnn5/";>latest</a>,
 <a 
href="http://www.comp.nus.edu.sg/~dbsystem/singa/assets/file/wheel/linux";>history</a></td>
-  </tr>
-  <tr>
-    <td>Ubuntu16.04</td>
-    <td>CPU</td>
-    <td>-</td>
-    <td><a 
href="http://comp.nus.edu.sg/~dbsystem/singa/assets/file/wheel/linux/latest/ubuntu16.04-cpp/";>latest</a>,
 <a 
href="http://www.comp.nus.edu.sg/~dbsystem/singa/assets/file/wheel/linux";>history</a></td>
-  </tr>
-  <tr>
-    <td>Ubuntu16.04</td>
-    <td>GPU</td>
-    <td>CUDA8.0+cuDNN5</td>
-    <td><a 
href="http://comp.nus.edu.sg/~dbsystem/singa/assets/file/wheel/linux/latest/ubuntu16.04-cuda8.0-cudnn5/";>latest</a>,
 <a 
href="http://www.comp.nus.edu.sg/~dbsystem/singa/assets/file/wheel/linux";>history</a></td>
-  </tr>
-  <tr>
-    <td>MacOSX10.11</td>
-    <td>CPU</td>
-    <td>-</td>
-    <td><a 
href="http://comp.nus.edu.sg/~dbsystem/singa/assets/file/wheel/macosx/latest/macosx10.11-cpp/";>latest</a>,
 <a 
href="http://www.comp.nus.edu.sg/~dbsystem/singa/assets/file/wheel/macosx";>history</a></td>
-  </tr>
-  <tr>
-    <td>MacOSX10.12</td>
-    <td>CPU</td>
-    <td>-</td>
-    <td><a 
href="http://comp.nus.edu.sg/~dbsystem/singa/assets/file/wheel/macosx/latest/macosx10.12-cpp/";>latest</a>,
 <a 
href="http://www.comp.nus.edu.sg/~dbsystem/singa/assets/file/wheel/macosx";>history</a></td>
-  </tr>
-</table>
-
-Download the whl file and execute the following command to install PySINGA,
-
-    $ pip install --upgrade <path to the whel file>
-
-To install the wheel file compiled with CUDA, you need to install CUDA and 
export the `LD_LIBRARY_PATH` to cuDNN before running the above instruction.
-
-If you have sudo right, you can run the above commands using `sudo pip 
install` without python virtual environment.
-The option `--upgrade` may cause errors sometimes, in which case you can 
ignore it.
+then SINGA is installed successfully.
 
 ## From Debian Package
 
@@ -126,25 +55,19 @@ The following Debian packages (on architecture: amd64) are 
available
     <td>Ubuntu14.04</td>
     <td>GPU</td>
     <td>CUDA7.5+cuDNN4</td>
-    <td>coming soon</td>
+    <td>-</td>
   </tr>
   <tr>
     <td>Ubuntu14.04</td>
     <td>GPU</td>
     <td>CUDA7.5+cuDNN5</td>
-    <td>coming soon</td>
-  </tr>
-  <tr>
-    <td>Ubuntu16.04</td>
-    <td>CPU</td>
     <td>-</td>
-    <td><a 
href="http://comp.nus.edu.sg/~dbsystem/singa/assets/file/debian/latest/ubuntu16.04-cpp/python-singa.deb";>latest</a>,
 <a 
href="http://www.comp.nus.edu.sg/~dbsystem/singa/assets/file/debian";>history</a></td>
   </tr>
   <tr>
-    <td>Ubuntu16.04</td>
+    <td>Ubuntu14.04</td>
     <td>GPU</td>
     <td>CUDA8.0+cuDNN5</td>
-    <td>coming soon</td>
+    <td>-</td>
   </tr>
 </table>
 
@@ -166,7 +89,7 @@ The source files could be downloaded either as a [tar.gz 
file](https://dist.apac
 The following libraries are required
 * cmake (>=2.8)
 * gcc (>=4.8.1) or Clang
-* google protobuf (>=2.5,<3)
+* google protobuf (>=2.5)
 * blas (tested with openblas >=0.2.10)
 * swig(>=3.0.10) for compiling PySINGA
 * numpy(>=1.11.0) for compiling PySINGA

http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/e8e46606/python/setup.py.in
----------------------------------------------------------------------
diff --git a/python/setup.py.in b/python/setup.py.in
index dbe779c..6b3e5b5 100644
--- a/python/setup.py.in
+++ b/python/setup.py.in
@@ -54,13 +54,13 @@ setup(
 
     keywords='deep learning singa apache',
 
-    packages= ['rafiki','singa', 'singa.proto'],
+    packages=['rafiki', 'singa', 'singa.proto'],
 
-    #py_modules=["singa"],
+    # py_modules=["singa"],
 
     install_requires=[
         'numpy>=1.11.0',
-        'protobuf>=2.5.0,<3',
+        'protobuf>=2.5.0',
         'unittest-xml-reporting',
         'flask>=0.10.1',
         'flask_cors>=3.0.2',
@@ -81,7 +81,7 @@ setup(
     #have to be included in MANIFEST.in as well.
 
     package_data={
-        'singa': ['_singa_wrap.*'],
+        'singa': ['_singa_wrap.so'],
     },
 
     #Although 'package_data' is the preferred approach, in some case you may

http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/e8e46606/tool/jenkins/jenkins_doc.sh
----------------------------------------------------------------------
diff --git a/tool/jenkins/jenkins_doc.sh b/tool/jenkins/jenkins_doc.sh
index 0498081..e88daf2 100644
--- a/tool/jenkins/jenkins_doc.sh
+++ b/tool/jenkins/jenkins_doc.sh
@@ -21,7 +21,8 @@
 # This script is used by Jenkins to update SINGA website
 
 echo Install PySINGA, generate HTML files and update SINGA website
-pip install --upgrade 
http://www.comp.nus.edu.sg/~dbsystem/singa/assets/file/wheel/linux/latest/ubuntu16.04-cpp/singa-1.1.0-py2-none-any.whl
+# pip install --upgrade 
http://www.comp.nus.edu.sg/~dbsystem/singa/assets/file/wheel/linux/latest/ubuntu16.04-cpp/singa-1.1.0-py2-none-any.whl
+conda update singa
 COMMIT=`git rev-parse --short HEAD`
 cd doc
 # generate the html files

http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/e8e46606/tool/travis/build.sh
----------------------------------------------------------------------
diff --git a/tool/travis/build.sh b/tool/travis/build.sh
index b1b8851..e59a1cc 100644
--- a/tool/travis/build.sh
+++ b/tool/travis/build.sh
@@ -20,11 +20,14 @@ if [[ "$TRAVIS_SECURE_ENV_VARS" == "false" ]];
 then
   if [[ "$TRAVIS_OS_NAME" == "osx" ]];
   then
-    export CMAKE_LIBRARY_PATH=/usr/local/opt/openblas/lib:$CMAKE_LIBRARY_PATH;
-    export 
CMAKE_INCLUDE_PATH=/usr/local/opt/openblas/include:$CMAKE_INCLUDE_PATH;
+    export 
CMAKE_LIBRARY_PATH=/usr/local/opt/openblas/lib:/usr/local/opt/protobuf/lib:$CMAKE_LIBRARY_PATH;
+    export 
CMAKE_INCLUDE_PATH=/usr/local/opt/openblas/include:/usr/local/opt/protobuf/include:$CMAKE_INCLUDE_PATH;
+    mkdir build && cd build;
+    cmake -DUSE_CUDA=OFF -DUSE_PYTHON=OFF -DENABLE_TEST=ON 
-DProtobuf_PROTOC_EXECUTABLE=/usr/local/opt/protobuf/bin/protoc ..;
+  else
+    mkdir build && cd build;
+    cmake -DUSE_CUDA=OFF -DUSE_PYTHON=OFF -DENABLE_TEST=ON ..
   fi
-  mkdir build && cd build;
-  cmake -DUSE_CUDA=OFF -DUSE_PYTHON=OFF -DENABLE_TEST=ON ..;
   make;
   ./bin/test_singa --gtest_output=xml:./../gtest.xml;
 else

http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/e8e46606/tool/travis/depends.sh
----------------------------------------------------------------------
diff --git a/tool/travis/depends.sh b/tool/travis/depends.sh
index 7a32d29..a90cdd4 100644
--- a/tool/travis/depends.sh
+++ b/tool/travis/depends.sh
@@ -26,7 +26,7 @@ then
   else
     brew update;
     brew tap homebrew/science;
-    brew install openblas protobuf260;
+    brew install openblas protobuf;
   fi
 else
   # install miniconda

Reply via email to