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 2020/02/11 05:31:06 UTC
[singa] branch dev updated: SINGA-487 Include NCCL 2.4.8 and MPICH
3.3.2
This is an automated email from the ASF dual-hosted git repository.
wangwei pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/singa.git
The following commit(s) were added to refs/heads/dev by this push:
new 7f41083 SINGA-487 Include NCCL 2.4.8 and MPICH 3.3.2
new f247661 Merge pull request #593 from chrishkchris/docker_dist
7f41083 is described below
commit 7f410836927adcc7b106fadd54bdd6960bad400d
Author: Chris Yeung <ch...@yahoo.com.hk>
AuthorDate: Thu Feb 6 23:39:20 2020 +0800
SINGA-487 Include NCCL 2.4.8 and MPICH 3.3.2
---
cmake/Dependencies.cmake | 6 +++---
tool/docker/devel/ubuntu/cuda10/Dockerfile | 25 ++++++++++++++++++++++++-
tool/docker/devel/ubuntu/cuda9/Dockerfile | 25 ++++++++++++++++++++++++-
3 files changed, 51 insertions(+), 5 deletions(-)
diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake
index 2c50d7e..a4257a6 100644
--- a/cmake/Dependencies.cmake
+++ b/cmake/Dependencies.cmake
@@ -151,9 +151,9 @@ IF(USE_DNNL)
ENDIF()
IF(USE_DIST)
- FIND_PATH(MPI_INCLUDE_DIR NAME "mpi.h" PATHS "/home/ubuntu/mpich-3.3/build/include/")
- FIND_LIBRARY(MPI_LIBRARIES NAME "mpi" PATHS "/home/ubuntu/mpich-3.3/build/lib")
- FIND_LIBRARY(MPICXX_LIBRARIES NAME "mpicxx" PATHS "/home/ubuntu/mpich-3.3/build/lib")
+ FIND_PATH(MPI_INCLUDE_DIR NAME "mpi.h" PATHS "$ENV{HOME}/mpich-3.3.2/build/include/")
+ FIND_LIBRARY(MPI_LIBRARIES NAME "mpi" PATHS "$ENV{HOME}/mpich-3.3.2/build/lib")
+ FIND_LIBRARY(MPICXX_LIBRARIES NAME "mpicxx" PATHS "$ENV{HOME}/mpich-3.3.2/build/lib")
MESSAGE(STATUS "Found MPI at ${MPI_INCLUDE_DIR}")
INCLUDE_DIRECTORIES(${MPI_INCLUDE_DIR})
LIST(APPEND SINGA_LINKER_LIBS ${MPI_LIBRARIES})
diff --git a/tool/docker/devel/ubuntu/cuda10/Dockerfile b/tool/docker/devel/ubuntu/cuda10/Dockerfile
index 813472a..f32de00 100644
--- a/tool/docker/devel/ubuntu/cuda10/Dockerfile
+++ b/tool/docker/devel/ubuntu/cuda10/Dockerfile
@@ -72,11 +72,34 @@ RUN mkdir /var/run/sshd \
&& sed -ri 's/UsePAM yes/#UsePAM yes/g' /etc/ssh/sshd_config \
&& mkdir /root/.ssh
+# build nccl
+RUN git clone https://github.com/NVIDIA/nccl.git $HOME/nccl \
+ && cd $HOME/nccl \
+ && git checkout v2.4.8-1 \
+ && make -j src.build \
+ && apt-get update \
+ && apt install build-essential devscripts debhelper fakeroot -y \
+ && make pkg.debian.build \
+ && dpkg -i build/pkg/deb/libnccl2_2.4.8-1+cuda10.0_amd64.deb \
+ && dpkg -i build/pkg/deb/libnccl-dev_2.4.8-1+cuda10.0_amd64.deb
+
+# build mpiexec
+RUN wget http://www.mpich.org/static/downloads/3.3.2/mpich-3.3.2.tar.gz -P $HOME \
+ && cd $HOME \
+ && tar xfz mpich-3.3.2.tar.gz \
+ && cd mpich-3.3.2 \
+ && ./configure --prefix=$HOME/mpich-3.3.2/build --disable-fortran 2>&1 | tee c.txt \
+ && make 2>&1 | tee m.txt \
+ && make install 2>&1 | tee mi.txt \
+ && PATH=$HOME/mpich-3.3.2/build/bin:$PATH \
+ && export PATH
+
# build singa
RUN git clone https://github.com/apache/singa.git $HOME/singa \
&& cd $HOME/singa \
+ && git checkout dev \
&& mkdir build && cd build \
- && /usr/local/bin/cmake -DENABLE_TEST=ON -DUSE_CUDA=ON -DUSE_PYTHON3=ON -DUSE_DNNL=ON ..
+ && /usr/local/bin/cmake -DENABLE_TEST=ON -DUSE_CUDA=ON -DUSE_PYTHON3=ON -DUSE_DNNL=ON -DUSE_DIST=ON ..
RUN cd $HOME/singa/build && make && make install
WORKDIR $HOME/singa
diff --git a/tool/docker/devel/ubuntu/cuda9/Dockerfile b/tool/docker/devel/ubuntu/cuda9/Dockerfile
index 884a218..04fa40e 100644
--- a/tool/docker/devel/ubuntu/cuda9/Dockerfile
+++ b/tool/docker/devel/ubuntu/cuda9/Dockerfile
@@ -76,11 +76,34 @@ RUN mkdir /var/run/sshd \
# dump environment variables into files, so that ssh can see also
&& env | grep _ >> /etc/environment
+# build nccl
+RUN git clone https://github.com/NVIDIA/nccl.git $HOME/nccl \
+ && cd $HOME/nccl \
+ && git checkout v2.4.8-1 \
+ && make -j src.build \
+ && apt-get update \
+ && apt install build-essential devscripts debhelper fakeroot -y \
+ && make pkg.debian.build \
+ && dpkg -i build/pkg/deb/libnccl2_2.4.8-1+cuda10.0_amd64.deb \
+ && dpkg -i build/pkg/deb/libnccl-dev_2.4.8-1+cuda10.0_amd64.deb
+
+# build mpiexec
+RUN wget http://www.mpich.org/static/downloads/3.3.2/mpich-3.3.2.tar.gz -P $HOME \
+ && cd $HOME \
+ && tar xfz mpich-3.3.2.tar.gz \
+ && cd mpich-3.3.2 \
+ && ./configure --prefix=$HOME/mpich-3.3.2/build --disable-fortran 2>&1 | tee c.txt \
+ && make 2>&1 | tee m.txt \
+ && make install 2>&1 | tee mi.txt \
+ && PATH=$HOME/mpich-3.3.2/build/bin:$PATH \
+ && export PATH
+
# build singa
RUN git clone https://github.com/apache/singa.git $HOME/singa \
&& cd $HOME/singa \
+ && git checkout dev \
&& mkdir build && cd build \
- && cmake -DENABLE_TEST=ON -DUSE_CUDA=ON -DUSE_DNNL=ON -DUSE_PYTHON3=ON ..
+ && cmake -DENABLE_TEST=ON -DUSE_CUDA=ON -DUSE_PYTHON3=ON -DUSE_DNNL=ON -DUSE_DIST=ON ..
RUN cd $HOME/singa/build && make && make install
WORKDIR $HOME/singa