Skip to content

Commit

Permalink
SINGA-480 Update documentations
Browse files Browse the repository at this point in the history
reorganize the pages
  • Loading branch information
nudles committed Aug 10, 2019
1 parent 80948aa commit 7a6330e
Show file tree
Hide file tree
Showing 13 changed files with 182 additions and 158 deletions.
43 changes: 18 additions & 25 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# limitations under the License.

# Directives for doing spell check only for python comments
# cSpell:includeRegExp #.*
# cSpell:includeRegExp #.*
# cSpell:includeRegExp ("""|''')[^]*

# This file is execfile()d with the current directory set to its
Expand All @@ -44,7 +44,6 @@
sys.path.append(os.path.abspath('../python/'))
sys.path.append(os.path.abspath('../build/python/'))


# -- General configuration ------------------------------------------------
from recommonmark.parser import CommonMarkParser

Expand Down Expand Up @@ -143,7 +142,6 @@
# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = False


# -- Options for HTML output ----------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
Expand Down Expand Up @@ -172,7 +170,7 @@
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
#
html_logo = '/singa.png'
html_logo = '_static/singa.png'

# The name of an image file (relative to this directory) to use as a favicon of
# the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
Expand Down Expand Up @@ -268,21 +266,21 @@
# -- Options for LaTeX output ---------------------------------------------

latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#
# 'papersize': 'letterpaper',
# The paper size ('letterpaper' or 'a4paper').
#
# 'papersize': 'letterpaper',

# The font size ('10pt', '11pt' or '12pt').
#
# 'pointsize': '10pt',
# The font size ('10pt', '11pt' or '12pt').
#
# 'pointsize': '10pt',

# Additional stuff for the LaTeX preamble.
#
# 'preamble': '',
# Additional stuff for the LaTeX preamble.
#
# 'preamble': '',

# Latex figure (float) alignment
#
# 'figure_align': 'htbp',
# Latex figure (float) alignment
#
# 'figure_align': 'htbp',
}

# Grouping the document tree into LaTeX files. List of tuples
Expand Down Expand Up @@ -319,30 +317,25 @@
#
# latex_domain_indices = True


# -- Options for manual page output ---------------------------------------

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'incubator-singa', u'incubator-singa Documentation',
[author], 1)
]
man_pages = [(master_doc, 'incubator-singa', u'incubator-singa Documentation',
[author], 1)]

# If true, show URL addresses after external links.
#
# man_show_urls = False


# -- Options for Texinfo output -------------------------------------------

# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'incubator-singa', u'incubator-singa Documentation',
author, 'incubator-singa', 'One line description of project.',
'Miscellaneous'),
(master_doc, 'incubator-singa', u'incubator-singa Documentation', author,
'incubator-singa', 'One line description of project.', 'Miscellaneous'),
]

# Documents to append as an appendix to all manuals.
Expand Down
27 changes: 19 additions & 8 deletions doc/en/community/team-list.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ The SINGA community has developers mainly from National University of Singapore,
+--------------------+--------------------------------+-----------------------------------------------+
| Haibo Chen | [email protected] | NetEase |
+--------------------+--------------------------------+-----------------------------------------------+
| Anh Dinh | [email protected] | National University of Singapore |
| Anh Dinh | [email protected] | Singapore University of Technology and Design |
+--------------------+--------------------------------+-----------------------------------------------+
| Jinyang Gao | [email protected] | National University of Singapore |
| Jinyang Gao | [email protected] | DAMO Academy, Alibaba Group |
+--------------------+--------------------------------+-----------------------------------------------+
| Xin Ji | [email protected] | National University of Singapore |
| Xin Ji | [email protected] | Visenze |
+--------------------+--------------------------------+-----------------------------------------------+
| Chonho Lee | [email protected] | Osaka University |
+--------------------+--------------------------------+-----------------------------------------------+
Expand All @@ -62,23 +62,34 @@ The SINGA community has developers mainly from National University of Singapore,
+--------------------+--------------------------------+-----------------------------------------------+
| Anthony K. H. Tung | [email protected] | National University of Singapore |
+--------------------+--------------------------------+-----------------------------------------------+
| Ji Wang | [email protected] | National University of Singapore |
| Ji Wang | [email protected] | Hangzhou MZH Technologies |
+--------------------+--------------------------------+-----------------------------------------------+
| Sheng Wang | [email protected] | National University of Singapore |
| Sheng Wang | [email protected] | DAMO Academy, Alibaba Group |
+--------------------+--------------------------------+-----------------------------------------------+
| Wei Wang | [email protected] | National University of Singapore |
+--------------------+--------------------------------+-----------------------------------------------+
| Yuan Wang | [email protected] | NetEase |
+--------------------+--------------------------------+-----------------------------------------------+
| Wenfeng Wu | [email protected] | National University of Singapore |
+--------------------+--------------------------------+-----------------------------------------------+
| Zhongle Xie | [email protected] | National University of Singapore |
| Zhongle Xie | [email protected] | Hangzhou MZH Technologies |
+--------------------+--------------------------------+-----------------------------------------------+
| Meihui Zhang | [email protected] | Singapore University of Technology and Design |
| Meihui Zhang | [email protected] | Beijing Institute of Technology |
+--------------------+--------------------------------+-----------------------------------------------+
| Kaiping Zheng | [email protected] | National University of Singapore |
+--------------------+--------------------------------+-----------------------------------------------+
| Moaz Reyad | [email protected] | University of Genoa |
+--------------------+--------------------------------+-----------------------------------------------+
| Chang Yao | [email protected] | yzBigdata |
| Chang Yao | [email protected] | Hangzhou MZH Technologies |
+--------------------+--------------------------------+-----------------------------------------------+



How to become a SINGA committer
--------------------------------

SINGA committers are members that have write access to SINGA code and documentation repositories. They can contribute by themselves and accept other contributions.

Becoming a SINGA committer requires understanding the Apache Way and being an active member in the SINGA project. An active member participates on mailing lists, answers questions, contributes code, tests and documentation, presents SINGA in talks and seminars, verifies releases and report issues or feature requests.

New committers can be suggested by current committers or PPMC members, and voted upon by the PPMC according to Apache guidelines. You can start by talking to other committers and ask for their advice and guidance.
52 changes: 35 additions & 17 deletions doc/en/docs/build.md → doc/en/develop/build.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->

# Build SINGA from Source


Expand All @@ -7,6 +26,7 @@ The source files could be downloaded either as a
$ git clone https://github.com/apache/incubator-singa.git
$ cd incubator-singa/

If you want to contribute code to SINGA, refer to [this page]() for the steps and requirements.

## Use Conda to build SINGA

Expand Down Expand Up @@ -59,7 +79,7 @@ Each specific SINGA package is identified by the version and build string. To in

conda install -c <anaconda username> -c conda-forge singa=2.1.0.dev=cpu_py36

To make the installation command simple, we create the following additional packages which depend on the latest CPU and GPU SINGA packages.
To make the installation command simple, you can create the following additional packages which depend on the latest CPU and GPU SINGA packages.

# for singa-cpu
conda build tool/conda/cpu/ --python=3.6
Expand Down Expand Up @@ -88,7 +108,7 @@ To build SINGA with GPU, MKLDNN, Python and unit tests, run the following instru
pip install .

The details of the CMake options are explained in the last section of this page.
The last command install the Python package. You can also run `pip install -e .`, which creates symlinks instead of copying files into python the site-package folder.
The last command install the Python package. You can also run `pip install -e .`, which creates symlinks instead of copying the Python files into the site-package folder.

If SINGA is compiled with ENABLE_TEST=ON, you can run the unit tests by

Expand All @@ -97,10 +117,13 @@ If SINGA is compiled with ENABLE_TEST=ON, you can run the unit tests by
You can see all the testing cases with testing results. If SINGA passes all
tests, then you have successfully installed SINGA.


## Use native tools to Build SINGA on Centos7

Building from source will be different for Centos7 as package names differ.Follow the instructions given below.

### Installing dependencies

Basic packages/libraries

sudo yum install freetype-devel libXft-devel ncurses-devel openblas-devel blas-devel lapack devel atlas-devel kernel-headers unzip wget pkgconfig zip zlib-devel libcurl-devel cmake curl unzip dh-autoreconf git python-devel glog-devel protobuf-devel
Expand Down Expand Up @@ -142,7 +165,7 @@ Instructions for building on Windows with Python support can be found [here](ins

## More details about the compilation options

### USE_MODULES
### USE_MODULES (deprecated)

If protobuf and openblas are not installed, you can compile SINGA together with them

Expand All @@ -164,7 +187,7 @@ the following environment variables

### USE_PYTHON

Similar to compile CPP code, PySINGA is compiled by
Option for compiling the Python wrapper for SINGA,

$ cmake -DUSE_PYTHON=ON ..
$ make
Expand All @@ -178,7 +201,7 @@ Users are encouraged to install the CUDA and
[cuDNN](https://developer.nvidia.com/cudnn) for running SINGA on GPUs to
get better performance.

SINGA has been tested over CUDA 9, and cuDNN 7. If cuDNN is
SINGA has been tested over CUDA 9/10, and cuDNN 7. If cuDNN is
installed into non-system folder, e.g. /home/bob/local/cudnn/, the following
commands should be executed for cmake and the runtime to find it

Expand Down Expand Up @@ -249,19 +272,14 @@ This setting is used to build the Debian package. Set PACKAGE=ON and build the p

## FAQ

* Q: Error from 'import singa' using PySINGA installed from wheel.
* Q: Error from 'import singa'

A: Please check the detailed error from `python -c "from singa import _singa_wrap"`. Sometimes it is
caused by the dependent libraries, e.g. there are multiple versions of protobuf, missing of cudnn, numpy version mismatch. Following
steps show the solutions for different cases
1. Check the cudnn and cuda and gcc versions, cudnn5 and cuda7.5 and gcc4.8/4.9 are preferred. if gcc is 5.0, then downgrade it.
If cudnn is missing or not match with the wheel version, you can download the correct version of cudnn into ~/local/cudnn/ and
A: Please check the detailed error from `python -c "from singa import _singa_wrap"`. Sometimes it is caused by the dependent libraries, e.g. there are multiple versions of protobuf, missing of cudnn, numpy version mismatch. Following steps show the solutions for different cases
1. Check the cudnn and cuda. If cudnn is missing or not match with the wheel version, you can download the correct version of cudnn into ~/local/cudnn/ and

$ echo "export LD_LIBRARY_PATH=/home/<yourname>/local/cudnn/lib64:$LD_LIBRARY_PATH" >> ~/.bashrc

2. If it is the problem related to protobuf, then download the newest whl files which have [compiled protobuf and openblas into the whl](https://issues.apache.org/jira/browse/SINGA-255) file of PySINGA.
Or you can install protobuf from source into a local folder, say ~/local/;
Decompress the tar file, and then
2. If it is the problem related to protobuf. You can install protobuf (3.6.1) from source into a local folder, say ~/local/; Decompress the tar file, and then

$ ./configure --prefix=/home/<yourname>local
$ make && make install
Expand Down Expand Up @@ -366,7 +384,7 @@ This setting is used to build the Debian package. Set PACKAGE=ON and build the p

After this, you can build glog again.

* Q: When using virtual environment, everytime I run pip install, it would reinstall numpy. However, the numpy would not be used when I `import numpy`
* Q: When using virtual environment, every time I run pip install, it would reinstall numpy. However, the numpy would not be used when I `import numpy`

A: It could be caused by the `PYTHONPATH` which should be set to empty when you are using virtual environment to avoid the conflicts with the path of
the virtual environment.
Expand All @@ -377,7 +395,7 @@ This setting is used to build the Debian package. Set PACKAGE=ON and build the p

$ export CPLUS_INCLUDE_PATH=`python -c "import numpy; print numpy.get_include()"`:$CPLUS_INCLUDE_PATH

* Q: When I run PySINGA in Mac OS X, I got the error "Fatal Python error: PyThreadState_Get: no current thread Abort trap: 6"
* Q: When I run SINGA in Mac OS X, I got the error "Fatal Python error: PyThreadState_Get: no current thread Abort trap: 6"

A: This error happens typically when you have multiple version of Python on your system and you installed SINGA via pip (this problem is resolved for installation via conda),
e.g, the one comes with the OS and the one installed by Homebrew. The Python linked by PySINGA must be the same as the Python interpreter.
Expand All @@ -387,4 +405,4 @@ This setting is used to build the Debian package. Set PACKAGE=ON and build the p

$ cmake -DPYTHON_LIBRARY=`python-config --prefix`/lib/libpython2.7.dylib -DPYTHON_INCLUDE_DIR=`python-config --prefix`/include/python2.7/ ..

If installed PySINGA from binary packages, e.g. debian or wheel, then you need to change the python interpreter, e.g., reset the $PATH to put the correct path of Python at the front position.
If installed PySINGA from binary packages, e.g. debian or wheel, then you need to change the python interpreter, e.g., reset the $PATH to put the correct path of Python at the front position.
Loading

0 comments on commit 7a6330e

Please sign in to comment.