-
Notifications
You must be signed in to change notification settings - Fork 491
How to get and run multi node Intel Caffe in Docker
Refer to https://docs.docker.com/install/linux/docker-ce/
# docker pull bvlc/caffe:intel_multinode
# docker run -tid --net host --name test --privileged --shm-size=40G bvlc/caffe:intel_multinode
You also can add other parameters. Such as “-v /host/path:/container/path” to mount local directory.
[host]
# docker exec -ti test /bin/bash
[container]
# ssh-keygen -t rsa # cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys # vi ~/.ssh/config
In ~/.ssh/config file, we should specify Port for each Hostname like following format, otherwise ssh will connect by default 22 port
Host ${hostname} Port 10010
For security, you can modify the root user’s password of container. Default is “123456”.
[Each container]
# ssh-copy-id -i id_rsa.pub MasterContainer
[MasterContainer]
# scp authorized_key root@SlaveContainer:~/.ssh/
Please change the MasterContainer and SlaveContainer to fit yourself hostname/ip.
# cd /opt/caffe # scripts/run_benchmark.sh --topology alexnet --hostfile host.txt --network tcp --netmask eno3
Please change the host.txt file and netmask by your own conditions. Before you run run_benchmark.sh scripts, you need install “bc” command in container.
Use Docker by non-root user Please add non-root user to group docker, and then restart the docker service. If there is no docker group in your host, please create directly.