You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@singa.apache.org by ka...@apache.org on 2017/01/03 05:31:06 UTC

[9/9] incubator-singa git commit: SINGA-289 Update SINGA website automatically using Jenkins Add Dockerfile for generating html files from doc/. Add a shell script (jenkins_doc.sh) to build the documentation and udpate svn repo. Update the tool/jenkins/R

SINGA-289 Update SINGA website automatically using Jenkins
Add Dockerfile for generating html files from doc/.
Add a shell script (jenkins_doc.sh) to build the documentation and udpate svn repo.
Update the tool/jenkins/README.md with instructions to set up the Jenkins job for documentation update.
Move doc/notebook into doc/en/docs/notebook as the notebooks depend on the APIs in doc/en/docs/.
to add docker file for runtime


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

Branch: refs/heads/master
Commit: f94ec89fce05d4cd1a7a4d9171a263ea0d724291
Parents: 330c879
Author: wangwei <wa...@comp.nus.edu.sg>
Authored: Thu Dec 29 20:48:46 2016 +0800
Committer: wangwei <wa...@comp.nus.edu.sg>
Committed: Sat Dec 31 17:37:54 2016 +0800

----------------------------------------------------------------------
 doc/README.md                                   |  32 ++
 doc/build.sh                                    |  19 +-
 doc/conf.py                                     |   8 +-
 doc/en/develop/contribute-code.md               |  11 +-
 doc/en/develop/contribute-docs.md               |  28 --
 doc/en/develop/how-contribute.md                |   2 -
 doc/en/docs/neural-net.md                       |   1 -
 doc/en/docs/notebook/README.md                  |   3 +
 doc/en/docs/notebook/index.ipynb                |  65 +++
 doc/en/docs/notebook/mlp.ipynb                  | 419 +++++++++++++++++++
 doc/en/docs/notebook/rbm.ipynb                  | 347 +++++++++++++++
 doc/en/docs/notebook/regression.ipynb           | 278 ++++++++++++
 doc/en/docs/notebook/utils.py                   | 138 ++++++
 doc/en/index.rst                                |   2 +-
 doc/notebook/README.md                          |   3 -
 doc/notebook/index.ipynb                        |  65 ---
 doc/notebook/mlp.ipynb                          | 419 -------------------
 doc/notebook/rbm.ipynb                          | 347 ---------------
 doc/notebook/regression.ipynb                   | 278 ------------
 doc/notebook/utils.py                           | 138 ------
 tool/jenkins/README.md                          |  42 +-
 tool/jenkins/docker/ubuntu14.04/Dockerfile      |  43 --
 .../jenkins/docker/ubuntu14.04/devel/Dockerfile |  43 ++
 tool/jenkins/docker/ubuntu16.04/Dockerfile      |  38 --
 .../jenkins/docker/ubuntu16.04/devel/Dockerfile |  38 ++
 .../docker/ubuntu16.04/runtime/Dockerfile       |  25 ++
 tool/jenkins/jenkins_doc.sh                     |  36 ++
 27 files changed, 1483 insertions(+), 1385 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/f94ec89f/doc/README.md
----------------------------------------------------------------------
diff --git a/doc/README.md b/doc/README.md
new file mode 100644
index 0000000..7630566
--- /dev/null
+++ b/doc/README.md
@@ -0,0 +1,32 @@
+# How to Contribute Documentation
+
+
+## Website
+This document gives step-by-step instructions for deploying [Singa website](http://singa.incubator.apache.org).
+
+Singa website is built by [Sphinx](http://www.sphinx-doc.org) 1.4.4 from a source tree stored in git: https://github.com/apache/incubator-singa/tree/master/doc.
+
+To install Sphinx on Ubuntu:
+
+    $ apt-get install python-sphinx
+
+To install the markdown support for Sphinx:
+
+    $ pip install recommonmark
+
+You can build the website by executing the following command from the doc folder:
+
+    $ ./build.sh html
+
+Committers can update the [SINGA website](http://singa.apache.org/en/index.html) by following these steps:
+
+    $ cd _build
+    $ svn co https://svn.apache.org/repos/asf/incubator/singa/site/trunk
+    $ cp -r html/* trunk
+    # svn add <newly added html files>
+    $ svn commit -m "commit messages" --username  <committer ID> --password <password>
+
+
+## CPP API
+
+To generate docs, run "doxygen" from the doc folder (Doxygen >= 1.8 recommended)

http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/f94ec89f/doc/build.sh
----------------------------------------------------------------------
diff --git a/doc/build.sh b/doc/build.sh
index eb5b90c..c0873a9 100755
--- a/doc/build.sh
+++ b/doc/build.sh
@@ -22,17 +22,18 @@ BUILDDIR="_build"
 LANG_ARR=(en zh)
 
 if [ "$1"x = "clean"x ]; then
-	rm -rf $BUILDDIR/*
-	rm -rf en/docs/examples
-	echo "clean up $BUILDDIR"
+  rm -rf $BUILDDIR/*
+  rm -rf en/docs/examples
+  echo "clean up $BUILDDIR"
 fi
 
 
 if [ "$1"x = "html"x ]; then
-	cp -rf ../examples en/docs/
-	for (( i=0; i<${#LANG_ARR[@]}; i++)) do
-		echo "building language ${LANG_ARR[i]} ..."
-		$SPHINXBUILD -b html -c . -d $BUILDDIR/doctree ${LANG_ARR[i]} $BUILDDIR/html/${LANG_ARR[i]}
-	done
-	echo "<script language=\"javascript\" type=\"text/javascript\">window.location.href='en/index.html';</script>" > $BUILDDIR/html/index.html
+  cp -rf ../examples en/docs/
+  cp README.md en/develop/contribute-docs.md
+  for (( i=0; i<${#LANG_ARR[@]}; i++)) do
+    echo "building language ${LANG_ARR[i]} ..."
+    $SPHINXBUILD -b html -c . -d $BUILDDIR/doctree ${LANG_ARR[i]} $BUILDDIR/html/${LANG_ARR[i]}
+  done
+  echo "<script language=\"javascript\" type=\"text/javascript\">window.location.href='en/index.html';</script>" > $BUILDDIR/html/index.html
 fi

http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/f94ec89f/doc/conf.py
----------------------------------------------------------------------
diff --git a/doc/conf.py b/doc/conf.py
index 08e391e..3c49952 100755
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -34,8 +34,8 @@
 #
 import os
 import sys
-sys.path.insert(0, os.path.abspath('.'))
-sys.path.insert(1, os.path.abspath('../build/python/'))
+#sys.path.insert(0, os.path.abspath('.'))
+#sys.path.insert(1, os.path.abspath('../build/python/'))
 
 # -- General configuration ------------------------------------------------
 from recommonmark.parser import CommonMarkParser
@@ -79,9 +79,9 @@ author = u'moaz'
 # built documents.
 #
 # The short X.Y version.
-version = u'1.0.0'
+version = u'1.0'
 # The full version, including alpha/beta/rc tags.
-release = u'1.0.0'
+release = u'1.0.1'
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.

http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/f94ec89f/doc/en/develop/contribute-code.md
----------------------------------------------------------------------
diff --git a/doc/en/develop/contribute-code.md b/doc/en/develop/contribute-code.md
index 98e5aee..39d11f8 100644
--- a/doc/en/develop/contribute-code.md
+++ b/doc/en/develop/contribute-code.md
@@ -1,13 +1,12 @@
 ## How to Contribute Code
 
-_____
 
 ### Coding Style
 
 The SINGA codebase follows the [Google C++ Style Guide](http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml).
 
 To check if your code follows the style, you can use the provided cpplint tool:
-    
+
     $ ./tool/cpplint.py YOUR_FILE
 
 
@@ -49,12 +48,12 @@ the work to the project under the project's open source license. Further commits
 to your new branch will be added to this pull request automatically by Github.
 
 * Wait for one committer to review the patch. If no conflicts, the committers will merge it with
-the master branch. The merge should a) not use rebase b) disable fast forward merge c) check the 
+the master branch. The merge should a) not use rebase b) disable fast forward merge c) check the
 commit message format and test the code/feature.
 
 * If there are too many small commit messages, you will be told to squash your commits into fewer meaningful
 commits. If your commit message does not follow the format (i.e., SINGA-xxxx), you will be told to
 reword your commit message. Both changes can be done using interactive git rebase. Once you
-get the commits corrected, push them to you own github again. Your pull request 
-will be automatically updated. For details, please refer to 
-[Rebase Pull Requests](https://github.com/edx/edx-platform/wiki/How-to-Rebase-a-Pull-Request).
\ No newline at end of file
+get the commits corrected, push them to you own github again. Your pull request
+will be automatically updated. For details, please refer to
+[Rebase Pull Requests](https://github.com/edx/edx-platform/wiki/How-to-Rebase-a-Pull-Request).

http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/f94ec89f/doc/en/develop/contribute-docs.md
----------------------------------------------------------------------
diff --git a/doc/en/develop/contribute-docs.md b/doc/en/develop/contribute-docs.md
deleted file mode 100644
index c32c623..0000000
--- a/doc/en/develop/contribute-docs.md
+++ /dev/null
@@ -1,28 +0,0 @@
-# How to Contribute Documentation
-
-___
-
-
-## Website
-This document gives step-by-step instructions for deploying [Singa website](http://singa.incubator.apache.org).
-
-Singa website is built by [Sphinx](http://www.sphinx-doc.org) 1.4.4 from a source tree stored in git: https://github.com/apache/incubator-singa/tree/master/doc.
-
-To install Sphinx on Ubuntu:
-
-    $ apt-get install python-sphinx
-
-To install the markdown support for Sphinx:
-
-    $ pip install recommonmark
-
-You can build the website by executing the following command from the doc folder:
-
-    $ ./build.sh html
-
-The procedure for contributing documentation is the same as [contributing code](contribute-code.html).
-
-
-## CPP API
-
-To generate docs, run "doxygen" from the doc folder (Doxygen >= 1.8 recommended)

http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/f94ec89f/doc/en/develop/how-contribute.md
----------------------------------------------------------------------
diff --git a/doc/en/develop/how-contribute.md b/doc/en/develop/how-contribute.md
index 4e7670b..8e8e5c4 100644
--- a/doc/en/develop/how-contribute.md
+++ b/doc/en/develop/how-contribute.md
@@ -1,7 +1,5 @@
 # How to Contribute to SINGA
 
-___
-
 As with any open source project, there are several ways you can help:
 
 * Join the [mailing list](../community/mail-lists.html) and answer other user's questions.

http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/f94ec89f/doc/en/docs/neural-net.md
----------------------------------------------------------------------
diff --git a/doc/en/docs/neural-net.md b/doc/en/docs/neural-net.md
index c10baf8..0a97f21 100644
--- a/doc/en/docs/neural-net.md
+++ b/doc/en/docs/neural-net.md
@@ -1,6 +1,5 @@
 # Neural Net
 
----
 
 `NeuralNet` in SINGA represents an instance of user's neural net model. As the
 neural net typically consists of a set of layers, `NeuralNet` comprises

http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/f94ec89f/doc/en/docs/notebook/README.md
----------------------------------------------------------------------
diff --git a/doc/en/docs/notebook/README.md b/doc/en/docs/notebook/README.md
new file mode 100644
index 0000000..ee7b018
--- /dev/null
+++ b/doc/en/docs/notebook/README.md
@@ -0,0 +1,3 @@
+These are some examples in IPython notebooks.
+
+You can open them in [notebook viewer](http://nbviewer.jupyter.org/github/apache/incubator-singa/blob/master/doc/notebook/index.ipynb).

http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/f94ec89f/doc/en/docs/notebook/index.ipynb
----------------------------------------------------------------------
diff --git a/doc/en/docs/notebook/index.ipynb b/doc/en/docs/notebook/index.ipynb
new file mode 100644
index 0000000..7f1fc7c
--- /dev/null
+++ b/doc/en/docs/notebook/index.ipynb
@@ -0,0 +1,65 @@
+{
+ "cells": [
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "![Apache Singa](http://singa.apache.org/en/_static/singa.png)"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "Welcome to this tutorial for Apache SINGA using Jupyter Notebook.\n",
+    "\n",
+    "Please install PySINGA before running these tutorials.\n",
+    "\n",
+    "1. [Regression](http://nbviewer.jupyter.org/github/apache/incubator-singa/blob/master/doc/notebook/regression.ipynb )\n",
+    "\n",
+    "2. [MLP Tutorial](http://nbviewer.jupyter.org/github/apache/incubator-singa/blob/master/doc/notebook/mlp.ipynb)\n",
+    "\n",
+    "3. [RBM Tutorial](\n",
+    "http://nbviewer.jupyter.org/github/apache/incubator-singa/blob/master/doc/notebook/rbm.ipynb)\n",
+    "\n",
+    "\n",
+    "To learn more about Jupyter, please check [IPython in Depth](https://www.youtube.com/watch?v=xe_ATRmw0KM).\n",
+    "\n",
+    "If you want to use PySINGA and jupyter notebooks in virtual environment, please use conda virtual environment and install the following extension. Then you can select the kernel of the virtual environment in the browser. "
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "conda install nb_conda_kernel"
+   ]
+  }
+ ],
+ "metadata": {
+  "anaconda-cloud": {},
+  "kernelspec": {
+   "display_name": "Python [default]",
+   "language": "python",
+   "name": "python2"
+  },
+  "language_info": {
+   "codemirror_mode": {
+    "name": "ipython",
+    "version": 2
+   },
+   "file_extension": ".py",
+   "mimetype": "text/x-python",
+   "name": "python",
+   "nbconvert_exporter": "python",
+   "pygments_lexer": "ipython2",
+   "version": "2.7.12"
+  }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 1
+}