From 5a164749b33a09330e1b7e46aa62a77a029adfa7 Mon Sep 17 00:00:00 2001 From: Benjamin Jacob Reji Date: Wed, 26 May 2021 16:14:45 +0400 Subject: [PATCH] added steps to run horovod on multiple containers --- sample-run/run.txt | 27 +++++++++++++++++++ .../docker-ubuntu-sshd-gpu/Dockerfile | 2 +- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 sample-run/run.txt diff --git a/sample-run/run.txt b/sample-run/run.txt new file mode 100644 index 0000000..9262f1e --- /dev/null +++ b/sample-run/run.txt @@ -0,0 +1,27 @@ +Create 3 vm using ./p2prc --CreateVM 0.0.0.0 --Ports=1 --GPU + +then on each run + +sudo apt clean && sudo apt update && sudo apt -y install cmake ccache nano +sudo ln -s /usr/local/cuda-11.2 /usr/local/cuda +export PATH=${HOME}/.local/bin:$PATH && export PATH=/usr/local/cuda-11.2/bin${PATH:+:${PATH}} && export LD_LIBRARY_PATH=/usr/local/cuda-11.2/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} +wget -c https://raw.githubusercontent.com/horovod/horovod/master/examples/tensorflow2/tensorflow2_synthetic_benchmark.py + +pip install --no-cache-dir horovod[tensorflow] + +# this will test if its locally install properly +horovodrun -np 1 python3 tensorflow2_synthetic_benchmark.py + +then configure machine1 ssh/config file like +Host host1 + HostName 0.0.0.0 + Port 39751 + +Host host2 + HostName 0.0.0.0 + Port 34779 + +and ensure that the ssh can be connected and ssh keys are copied using ssh-copy-id command + +then run +horovodrun -np 2 -H host1:1,host2:1 python3 tensorflow2_synthetic_benchmark.py diff --git a/server/docker/containers/docker-ubuntu-sshd-gpu/Dockerfile b/server/docker/containers/docker-ubuntu-sshd-gpu/Dockerfile index 06b8200..f3fe442 100644 --- a/server/docker/containers/docker-ubuntu-sshd-gpu/Dockerfile +++ b/server/docker/containers/docker-ubuntu-sshd-gpu/Dockerfile @@ -10,7 +10,7 @@ # from consol/ubuntu-xfce-vnc # due to dependency issues vnc is still work in progress -from nvidia/cuda:11.2.2-cudnn8-runtime-ubuntu20.04 +from nvidia/cuda:11.2.2-cudnn8-devel-ubuntu20.04 # Switch to root user to install additional software USER 0