Skip to content

Instantly share code, notes, and snippets.

@ethanyanjiali
Last active September 26, 2019 04:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ethanyanjiali/31048d875662e36dbe74a454832b1cff to your computer and use it in GitHub Desktop.
Save ethanyanjiali/31048d875662e36dbe74a454832b1cff to your computer and use it in GitHub Desktop.
Install Horovod with Tensorflow 2.0 on Debian stretch
  • Install gcc/g++ 7+ Add this line to /etc/apt/sources.list
deb http://ftp.de.debian.org/debian buster main 

And then install gcc/g++ 7

sudo apt-get install gcc-7 g++-7
sudo rm /usr/bin/gcc
sudo rm /usr/bin/g++
sudo ln -s /usr/bin/g++-7 /usr/bin/g++
sudo ln -s /usr/bin/gcc-7 /usr/bin/gcc
  • Install OpenMPI
wget https://download.open-mpi.org/release/open-mpi/v4.0/openmpi-4.0.1.tar.gz
gunzip -c openmpi-4.0.1.tar.gz | tar xf -
cd openmpi-4.0.1
./configure --prefix=/usr/local
make all install
  • Install Tensorflow GPU
python3 -m pip install tensorflow-gpu
  • Install Horovod
HOROVOD_NCCL_HOME=/usr/local/nccl2 HOROVOD_GPU_ALLREDUCE=NCCL HOROVOD_WITH_TENSORFLOW=1  python3 -m pip install --no-cache-dir horovod
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment