ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

With the latest ROS LTS melodic based off from Ubuntu Bionic, ros:melodic-ros-base-bionic comes with libglvnd0 pre installed, so all that is needed is to set the missing Nvidia environmental variables:

FROM ros:melodic-ros-base-bionic

# nvidia-container-runtime
ENV NVIDIA_VISIBLE_DEVICES \
    ${NVIDIA_VISIBLE_DEVICES:-all}
ENV NVIDIA_DRIVER_CAPABILITIES \
    ${NVIDIA_DRIVER_CAPABILITIES:+$NVIDIA_DRIVER_CAPABILITIES,}graphics

As can be shown here for bionic, although not so yet for stretch:

$ docker run -it --rm ros:melodic-ros-base-bionic dpkg -l libglvnd0
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                    Version          Architecture     Description
+++-=======================-================-================-================================
ii  libglvnd0:amd64         1.0.0-2ubuntu2   amd64            Vendor neutral GL dispatch library

I've updated the wiki, however this should eventually work its way as well into the desktop images with this PR: https://github.com/osrf/docker_images/pull/165

With the latest ROS LTS melodic based off from Ubuntu Bionic, ros:melodic-ros-base-bionic comes with libglvnd0 pre installed, so all that is needed is to set the missing Nvidia environmental variables:

FROM ros:melodic-ros-base-bionic

# nvidia-container-runtime
ENV NVIDIA_VISIBLE_DEVICES \
    ${NVIDIA_VISIBLE_DEVICES:-all}
ENV NVIDIA_DRIVER_CAPABILITIES \
    ${NVIDIA_DRIVER_CAPABILITIES:+$NVIDIA_DRIVER_CAPABILITIES,}graphics

As can be shown here for bionic, although not so yet for stretch:

$ docker run -it --rm ros:melodic-ros-base-bionic dpkg -l libglvnd0
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                    Version          Architecture     Description
+++-=======================-================-================-================================
+++-=======================-================-================-=============================
ii  libglvnd0:amd64         1.0.0-2ubuntu2   amd64            Vendor neutral GL dispatch library

I've updated the wiki, however this should eventually work its way as well into the desktop images with this PR: https://github.com/osrf/docker_images/pull/165

With the latest ROS LTS melodic based off from Ubuntu Bionic, ros:melodic-ros-base-bionic comes with libglvnd0 pre installed, so all that is needed is to set the missing Nvidia environmental variables:

FROM ros:melodic-ros-base-bionic

# nvidia-container-runtime
ENV NVIDIA_VISIBLE_DEVICES \
    ${NVIDIA_VISIBLE_DEVICES:-all}
ENV NVIDIA_DRIVER_CAPABILITIES \
    ${NVIDIA_DRIVER_CAPABILITIES:+$NVIDIA_DRIVER_CAPABILITIES,}graphics

As can be shown here for bionic, although not so yet for stretch:

$ docker run -it --rm ros:melodic-ros-base-bionic dpkg -l libglvnd0
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                    Version          Architecture     Description
+++-=======================-================-================-=============================
+++-=======================-================-================-===========================
ii  libglvnd0:amd64         1.0.0-2ubuntu2   amd64            Vendor neutral GL dispatch library

I've updated the wiki, however this should eventually work its way as well into the desktop images with this PR: https://github.com/osrf/docker_images/pull/165