-
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 of ssh service, like
Host *
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]
# scp authorized_key root@SlaveContainer:~/.ssh/
Please change the MasterContainer and SlaveContainer to fit yourself hostname/ip.
# cd /opt/caffe
# python scripts/run_benchmark.py
Please change the hostfile, network and netmask field of scripts/benchmark_config_default.json by your own conditions.
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.