You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@singa.apache.org by wa...@apache.org on 2017/01/16 08:02:32 UTC
[4/5] incubator-singa git commit: SINGA-276 Create docker images
SINGA-276 Create docker images
Update installation page with instructions of using SINGA Docker image.
Project: http://git-wip-us.apache.org/repos/asf/incubator-singa/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-singa/commit/9ea8b539
Tree: http://git-wip-us.apache.org/repos/asf/incubator-singa/tree/9ea8b539
Diff: http://git-wip-us.apache.org/repos/asf/incubator-singa/diff/9ea8b539
Branch: refs/heads/master
Commit: 9ea8b539e8dd6b007abcfdfc5b042b5e71342a84
Parents: 9a0a3fd
Author: wangwei <wa...@comp.nus.edu.sg>
Authored: Fri Jan 13 14:41:42 2017 +0800
Committer: wangwei <wa...@comp.nus.edu.sg>
Committed: Fri Jan 13 14:44:08 2017 +0800
----------------------------------------------------------------------
doc/en/docs/installation.md | 13 +++++++++++++
tool/docker/README.md | 1 +
tool/docker/build.sh | 31 ++++++++++++++++---------------
3 files changed, 30 insertions(+), 15 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/9ea8b539/doc/en/docs/installation.md
----------------------------------------------------------------------
diff --git a/doc/en/docs/installation.md b/doc/en/docs/installation.md
index ac5bded..e9bac99 100755
--- a/doc/en/docs/installation.md
+++ b/doc/en/docs/installation.md
@@ -113,6 +113,19 @@ Download the deb file and install it via
To create the Debian packages, please refer to the README.md file under `SINGA_ROOT/tool/debian`.
+
+## Use SINGA Docker Images
+
+A list of Docker images with SINGA installed are available on [Dockerhub](https://hub.docker.com/r/nusdbsystem/singa/).
+To use the image, run
+
+ # for images built without CUDA
+ $ docker run -it nusdbsystem/singa:<tag> /bin/bash
+ # for images built with CUDA support
+ $ nvidia-docker run -it nusdbsystem/singa:<tag> /bin/bash
+
+All available tags and descriptions are on [Dockerhub](https://hub.docker.com/r/nusdbsystem/singa/) and [Github](https://github.com/apache/incubator-singa/blob/master/tool/docker/README.md)
+
## Compile SINGA from source on Linux and Mac OS
The source files could be downloaded either as a [tar.gz file](https://dist.apache.org/repos/dist/dev/incubator/singa/), or as a git repo
http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/9ea8b539/tool/docker/README.md
----------------------------------------------------------------------
diff --git a/tool/docker/README.md b/tool/docker/README.md
index 132a696..d766cbc 100644
--- a/tool/docker/README.md
+++ b/tool/docker/README.md
@@ -5,6 +5,7 @@
| Tag | OS version | devel/runtime | Device|CUDA/CUDNN|
|:----|:-----------|:--------------|:------|:---------|
|runtime| Ubuntu16.04|runtime|CPU|-|
+|runtime| Ubuntu16.04|runtime|CPU|-|
|runtime-cuda| Ubuntu16.04|runtime|GPU|CUDA8.0+CUDNN5|
|devel| Ubuntu16.04|devel|CPU|-|
|devel-cuda| Ubuntu16.04|devel|GPU|CUDA8.0+CUDNN5|
http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/9ea8b539/tool/docker/build.sh
----------------------------------------------------------------------
diff --git a/tool/docker/build.sh b/tool/docker/build.sh
index bc3b488..bc4ec40 100755
--- a/tool/docker/build.sh
+++ b/tool/docker/build.sh
@@ -22,30 +22,31 @@
# ./build.sh PUSH would push the images to dockerhub/nusdbsystem and then delete the local image
# (used by Jenkins to avoid dangling images from multiple building)
+echo "###################"
echo "build singa:runtime"
-docker build tool/docker/runtime/ --force-rm -t nusdbsystem/singa:runtime
-if [ $1 = "PUSH" ]; then
- docker push nusdbsystem/singa:runtime
- docker rmi nusdbsystem/singa:runtime
-fi
+echo "###################"
+docker build tool/docker/runtime/ --force-rm -t nusdbsystem/singa:runtime -t nusdbsystem/singa:latest
+echo "###################"
echo "build singa:runtime-cuda"
+echo "###################"
docker build tool/docker/runtime/cuda --force-rm -t nusdbsystem/singa:runtime-cuda
-if [ $1 = "PUSH" ]; then
- docker push nusdbsystem/singa:runtime-cuda
- docker rmi nusdbsystem/singa:runtime-cuda
-fi
+echo "###################"
echo "build singa:devel"
+echo "###################"
docker build tool/docker/devel/ --force-rm -t nusdbsystem/singa:devel
-if [ $1 = "PUSH" ]; then
- docker push nusdbsystem/singa:devel
- docker rmi nusdbsystem/singa:devel
-fi
+echo "###################"
echo "build singa:devel-cuda"
+echo "###################"
docker build tool/docker/devel/cuda --force-rm -t nusdbsystem/singa:devel-cuda
+
if [ $1 = "PUSH" ]; then
- docker push nusdbsystem/singa:devel-cuda
- docker rmi nusdbsystem/singa:devel-cuda
+ echo "##########################################"
+ echo "Push to Dockerhub and delete local images"
+ echo "#########################################"
+
+ docker push nusdbsystem/singa
+ docker rmi -f `docker images nusdbsystem/singa -q`
fi