Extends the osrf/ros:kinetic-desktop-full
image by adding opengl, glvnd and
cuda 8.0. This makes opengl work from any docker environment when used with
nvidia-docker2. Thanks to
phromo for the
baseline. Note that this is currently supported for Linux systems only.
To extend the Dockerfile (e.g. to add more ROS packages or users), take a look at the commented out lines at the end of file.
- Install docker
- Install nvidia-docker using instructions here.
- After cloning this repo, run
sudo docker build -t <image_name> ros-kinetic-nvidia-docker/
- Run the following commands to give docker permission to run on X:
xhost +local:docker
XSOCK=/tmp/.X11-unix
XAUTH=/tmp/.docker.xauth
sudo touch $XAUTH
xauth nlist $DISPLAY | sed -e 's/^..../ffff/' | sudo xauth -f $XAUTH nmerge -
- Start the container:
sudo nvidia-docker run -it --volume=$XSOCK:$XSOCK:rw
--volume=$XAUTH:$XAUTH:rw --env="XAUTHORITY=${XAUTH}"
--env="DISPLAY" <image_name>