Sign inSign up

bgloh/ros-tensorflow

By bgloh

•Updated almost 7 years ago

ROS: kinetic, tensorflow, opencv

Image
0

916

bgloh/ros-tensorflow repository overview

ROS : kinetic

dockerfile

FROM "osrf/ros:kinetic-desktop-full"

RUN apt-get update && apt-get install -y \
    tmux \
    curl \
    wget \
    vim \
    sudo \
    libgl1-mesa-glx \
    libgl1-mesa-dri \
    mesa-utils \
    unzip \
    locales \
    ntp \
    whois \
    sudo	\
    nano       

# python code
RUN apt-get install -y git python-dev python-pip
RUN pip install --upgrade pip
RUN pip install -U virtualenv # system-wide install

# virualenv environment setup - DON'T NEED NOW. JUST FOR FUTURE REFERENCE
#RUN virtualenv --system-site-packages -p python3 ./venv
#RUN /bin/bash -c "source ./venv/bin/activate  && pip install --upgrade pip deactivate" 

# TENSORFLOW & KERAS
RUN pip install --user --upgrade tensorflow  
RUN pip install keras

# IPYTHON
RUN pip install ipython

# OPENCV
RUN pip install opencv-python
RUN pip install opencv-contrib-python 

# SCIKIT-LEARN
RUN pip install -U sklearn

# make catkin workspace
RUN mkdir -p ~/catkin_ws/src

# for ros environments
#RUN sh -c 'echo "source '~/catkin_ws/devel/setup.bash'" >> ~/.bashrc'
RUN sh -c 'echo "source '/opt/ros/kinetic/setup.bash'" >> ~/.bashrc'

# entrypoint
COPY ./ros_entrypoint.sh /
RUN chmod +x /ros_entrypoint.sh
ENTRYPOINT ["/ros_entrypoint.sh"]

ros_entrypoint.sh

#!/bin/bash
set -e

# setup ros environment
source "/opt/ros/kinetic/setup.bash"
exec "$@"

⁠how to run docker container with GUI
SOCK=/tmp/.X11-unix
XAUTH=/tmp/.docker.xauth

touch $XAUTH
xauth nlist $DISPLAY | sed -e 's/^..../ffff/' | xauth -f $XAUTH nmerge -

docker run -i -t --rm \
             -v $XAUTH:$XAUTH:rw \
             -v ~/catkin_ws:/catkin_ws \
             -v $XSOCK:$XSOCK \
             -v /dev/dri/:/dev/dri/    \
             --net host  \
             --ipc host  \
             -e XAUTHORITY=$XAUTH \
             -e DISPLAY=$DISPLAY \
             --name ros \
             bgloh/ros-tensorflow   \
             bash

Tag summary

Content type

Image

Digest

Size

1.5 GB

Last updated

almost 7 years ago

docker pull bgloh/ros-tensorflow