- Install and test Docker CE. You can find instructions on how to do this here. Make sure to add your user to the docker group, and log out and in before continuing.
- Pull Docker image
docker pull shadowrobot/dexterous-hand:kinetic
- DIRECT NVIDIA IMAGE
docker pull shadowrobot/dexterous-hand:kinetic-nvidia-ide
- Assuming NVidia GPU
- Install instructions are here. However, they instruct you to install the
nvidia-docker-2
package; don't. Instead, install thenvidia-docker
package. You may also have to install thenvidia-modprobe
package. - Download docker_nvidialize.sh script using
wget https://raw.githubusercontent.com/shadow-robot/sr-build-tools/master/docker/utils/docker_nvidialize.sh
- Run
./docker_nvidialize.sh shadowrobot/dexterous-hand:kinetic
- Check
docker images
forshadowrobot/dexterous-hand:kinetic-nvidia
entry, if everything has gone correctly.
- Install instructions are here. However, they instruct you to install the
- Assuming NVidia
nvidia-docker run -it -e DISPLAY -e LOCAL_USER_ID=$(id -u) -v /tmp/.X11-unix:/tmp/.X11-unix:rw --net=host --privileged shadowrobot/dexterous-hand:kinetic-nvidia
- Assuming NO NVidia
docker run -it -e DISPLAY -e LOCAL_USER_ID=$(id -u) -v /tmp/.X11-unix:/tmp/.X11-unix:rw --net=host --privileged shadowrobot/dexterous-hand:kinetic
- Wait for container to start up, it will take a while. A new Terminator window will pop up when ready. Pull up UMD-specific branch of
sr_config
:
roscd sr_config
git checkout shadowrobot_170911
Add this to bashrc
if you don't want to type it each time.
- By default, there are no
net-tools
installed on the image. Run:
sudo apt update
sudo apt install net-tools
- To run the ShadowHand use
roslaunch sr_ethercat_hand_config sr_rhand.launch eth_port:=XXXX
whereXXXX
can be found usingifconfig
and selecting the port with no IP configuration.
- Once set up completely, type
exit
to exit the container. - To see exited containers, type
docker ps -a
to see containers and their status. - To see images, type
docker images -a
to see images and their IDs. - To save an exited container to its own image, use
docker commit CONTAINER_ID NEW_NAME
to save a latest image of the container, with changes. - Stop and remove all containers using:
docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)
- Create persistent storage for host <--> container communication using Docker volumes
- Create a new folder on the host system, which will be mounted into your container, such as
/file/to/path
- Append new
-v
parameter to whatever launch sequence you choose:
-v /path/to/file:/path/on/container:rw
Current config launch:
nvidia-docker run -it -e DISPLAY -e LOCAL_USER_ID=$(id -u) -v /tmp/.X11-unix:/tmp/.X11-unix:rw -v /home/kanishka/Documents/Projects/shadowhand/vol/:/mnt/code/:rw --net=host --privileged shadowrobot/dexterous-hand:kinetic-nvidia-ide
roslaunch sr_ethercat_hand_config sr_rhand.launch eth_port:=enxa0cec8126817
docker commit $(docker ps -aq) shadowrobot/dexterous-hand:kinetic-nvidia-ide
docker stop $(docker ps -aq)
docker rm $(docker ps -aq)