singa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wang...@apache.org
Subject [3/5] incubator-singa git commit: SINGA-89 Add Docker support
Date Wed, 21 Oct 2015 05:37:46 GMT
SINGA-89 Add Docker support

Fixed an error in the Dockerfile for building Mesos: the `install.sh` script sources the wrong
`.bashrc` file.

Updated README.md to fix a typo and add more notes.


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

Branch: refs/heads/master
Commit: 5277935b2fddd5f57b9df28174a5311a3bcaae49
Parents: 4567ed8
Author: Anh Dinh <ug93tad@gmail.com>
Authored: Tue Oct 20 17:19:12 2015 +0800
Committer: Anh Dinh <ug93tad@gmail.com>
Committed: Tue Oct 20 17:30:49 2015 +0800

----------------------------------------------------------------------
 tool/docker/README.md        | 20 ++++++++++++++------
 tool/docker/mesos/.bashrc    |  2 +-
 tool/docker/mesos/install.sh |  2 +-
 3 files changed, 16 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/5277935b/tool/docker/README.md
----------------------------------------------------------------------
diff --git a/tool/docker/README.md b/tool/docker/README.md
index cfc3192..fd33e7e 100644
--- a/tool/docker/README.md
+++ b/tool/docker/README.md
@@ -3,7 +3,7 @@ This guide explains how to set up a development environment for SINGA. A cluster
 1. [Build SINGA base](#build_base)
 2. [Build SINGA with Mesos and Hadoop](#build_mesos)
 3. [Pre-built images](#pre_built)
-4. [Launch stand-alone SINGA](#launch_stand_alone)
+4. [Launch and stop SINGA (stand alone mode)](#launch_stand_alone)
 5. [Launch pseudo-distributed SINGA on one node](#launch_pseudo)
 6. [Launch fully distributed SINGA on multiple nodes](#launch_distributed)
 
@@ -14,7 +14,7 @@ This guide explains how to set up a development environment for SINGA. A
cluster
  
 ````
 $ cd tool/docker/singa
-$ sudo docker built -t singa/base . 
+$ sudo docker build -t singa/base . 
 $ sudo docker images
 REPOSITORY             TAG                 IMAGE ID            CREATED             VIRTUAL
SIZE
 singa/base             latest              XXXX                XXX                 2.01 GB
@@ -42,6 +42,8 @@ singa/mesos             latest              XXXX                XXX
    *Figure 2. singa/mesos Docker image, containing Hadoop and Mesos built on
 top of SINGA. The default namenode address for Hadoop is `node0:9000`*
 
+**Notes** A common failure observed during the build process is caused by network failure
occuring when downloading dependencies. Simply re-run the build command. 
+
 --
 
 <a name="pre_built"></a>
@@ -63,9 +65,8 @@ weaveworks/weave       1.1.1               XXXX                11 days ago
 --
 
 <a name="launch_stand_alone"></a>
-#### Launch stand-alone SINGA
-To launch a test environment for a single-node SINGA training, simply start a
-container from `singa/base` image. The following starts a container called
+#### Launch and stop SINGA in stand-alone mode
+To launch a test environment for a single-node SINGA training, simply start a container from
`singa/base` image. The following starts a container called
 `XYZ`, then launches a shell in the container: 
 
 ````
@@ -77,7 +78,14 @@ $ sudo docker exec -it XYZ /bin/bash
 
    *Figure 3. Launch SINGA in stand-alone mode: single node training*
 
-Inside the launched container, the SINGA source directory can be found at `/root/incubator-singa`
+Inside the launched container, the SINGA source directory can be found at `/root/incubator-singa`.

+
+**Stopping the container**
+
+````
+$ sudo docker stop XYZ
+$ sudo docker rm ZYZ
+````
 
 --
 

http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/5277935b/tool/docker/mesos/.bashrc
----------------------------------------------------------------------
diff --git a/tool/docker/mesos/.bashrc b/tool/docker/mesos/.bashrc
index 4a649ac..407fd65 100644
--- a/tool/docker/mesos/.bashrc
+++ b/tool/docker/mesos/.bashrc
@@ -1,7 +1,7 @@
 export LIBRARY_PATH=/opt/OpenBLAS/lib:$LIBRARY_PATH
 export LD_LIBRARY_PATH=/opt/OpenBLAS/lib:/usr/local/lib:$LD_LIBRARY_PATH
 export CPLUS_INCLUDE_PATH=/opt/OpenBLAS/include:$CPLUS_INCLUDE_PATH
-export PATH=$PATH:/opt/jdk1.8.0_60/bin:/opt/bin
+export PATH=/opt/jdk1.8.0_60/bin:/opt/bin:$PATH
 export HADOOP_HOME=/opt/hadoop-2.6.0
 export PATH=$PATH:$HADOOP_HOME/bin:$HADOOP_HOME/sbin
 export JAVA_HOME=/opt/jdk1.8.0_60

http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/5277935b/tool/docker/mesos/install.sh
----------------------------------------------------------------------
diff --git a/tool/docker/mesos/install.sh b/tool/docker/mesos/install.sh
index 560fbab..87233c1 100644
--- a/tool/docker/mesos/install.sh
+++ b/tool/docker/mesos/install.sh
@@ -1,5 +1,5 @@
 #!/bin/bash
-source ~/.bashrc
+source /root/.bashrc
 #download
 cd /opt
 wget -c http://archive.apache.org/dist/mesos/0.22.0/mesos-0.22.0.tar.gz


Mime
View raw message