Public Repository

Last pushed: a month ago
Short Description
PRIVATE ROS ENVIRONMENT : ROS kinetic + Tensorflow-gpu / cpu
Full Description

1. Install Drivers & Libraries to native OS

2. Start ROS

  • display mode
  • share ( \lib, \dev, \media ) with native OS [ privileged mode ]
  • network mode : bridge
  • port forwarded : 9998, 9999

  • CPU Mode

    docker run -it \
    --name="ros" \
    --privileged \
    --env="DISPLAY" \
    --env="QT_X11_NO_MITSHM=1" \
    --volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" \
    --volume="/media:/media:rw" \
    --volume="/dev:/dev:rw" \
    --volume="/lib:/lib:rw" \
    --publish=9998:9998 \
    --publish=9999:9999 \
    --publish=11311:11311 \
    taehogang/ros-kinetic:latest \
    /bin/bash \
    | xhost +local:ros \
    && docker attach ros

  • GPU Mode ( https://github.com/NVIDIA/nvidia-docker/blob/master/README.md )
    ** Check GPU version in ~/.bashrc ( See "3. Tensorflow installed -> C. Export library path to ~/.bashrc" )

nvidia-docker run -it \
--name="ros" \
--privileged \
--env="DISPLAY" \
--env="QT_X11_NO_MITSHM=1" \
--volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" \
--volume="/media:/media:rw" \
--volume="/dev:/dev:rw" \
--volume="/lib:/lib:rw" \
--publish=9998:9998 \
--publish=9999:9999 \
--publish=11311:11311 \
taehogang/ros-kinetic:1.0-gpu \
/bin/bash \
| xhost +local:ros \
&& docker attach ros

3. Container Components & Information

  • It's based on "ros:kinetic" container

  • Powerline is adopted
    ( https://humb1ec0ding.github.io/2013/11/26/ubuntu-powerline-beautify-the-stateline/ )

  • tmux , vim installed [ *Private ~/.vimrc , ~/.tmux.conf used ]

    apt-get install tmux vim

  • Tensorflow installed

    • A. Ubuntu/Linux 64-bit

      apt-get install python-pip python-dev

    • B-1. CPU ver

      pip install tensorflow

    • B-2. GPU ver

      pip install tensorflow-gpu

    • C. Export library path to ~/.bashrc
      ( <gpu driver version> : change it into version number.
      ie. 375 . can find it in $ nvidia-settings -> NVIDIA Driver Version )

      export PATH=/usr/local/cuda/bin:$PATH
      export LPATH=/usr/lib/nvidia-<gpu driver version>:$LPATH
      export LIBRARY_PATH=/usr/lib/nvidia-<gpu driver version>:$LIBRARY_PATH
      export LD_LIBRARY_PATH=/usr/lib/nvidia-<gpu driver version>:/usr/local/cuda/lib64:/usr/local/cuda/lib:$LD_LIBRARY_PATH
      export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:$/usr/local/cuda/lib"

Docker Pull Command
Owner
taehogang

Comments (0)