Skip to content

Instantly share code, notes, and snippets.

@moriarty
Created Mar 13, 2019
Embed
What would you like to do?
Dockerfile nvidia-docker2 ros-kinetic-desktop-full fetch gazebo7
FROM nvidia/opengl:1.0-glvnd-devel-ubuntu16.04
# nvidia-container-runtime
ENV NVIDIA_VISIBLE_DEVICES \
${NVIDIA_VISIBLE_DEVICES:-all}
ENV NVIDIA_DRIVER_CAPABILITIES \
${NVIDIA_DRIVER_CAPABILITIES:+$NVIDIA_DRIVER_CAPABILITIES,}graphics
# install packages
RUN apt-get update && apt-get install -q -y \
dirmngr \
gnupg2 \
lsb-release \
&& rm -rf /var/lib/apt/lists/*
# setup keys
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 421C365BD9FF1F717815A3895523BAEEB01FA116
# setup sources.list
RUN echo "deb http://packages.ros.org/ros/ubuntu `lsb_release -sc` main" > /etc/apt/sources.list.d/ros-latest.list
# install bootstrap tools
RUN apt-get update && apt-get install --no-install-recommends -y \
python-rosdep \
python-rosinstall \
python-vcstools \
&& rm -rf /var/lib/apt/lists/*
# setup environment
ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8
# bootstrap rosdep
RUN rosdep init \
&& rosdep update
# install ros packages
ENV ROS_DISTRO kinetic
RUN apt-get update && apt-get install -y \
ros-kinetic-desktop-full=1.3.2-0* \
&& rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get install -y \
git \
python-catkin-tools \
vim && \
mkdir -p ros/kinetic/src && \
cd ros/kinetic && \
catkin config --init && \
catkin config --extend /opt/ros/kinetic && \
cd src && \
git clone https://github.com/fetchrobotics/fetch_gazebo.git && \
sed -i 's/gazebo9/gazebo7/g' ./fetch_gazebo/fetch_gazebo/package.xml && \
git clone https://github.com/fetchrobotics/fetch_ros.git && \
cd ../ && \
rosdep install -y --from-paths src --ignore-src --rosdistro ${ROS_DISTRO}
RUN apt-get install g++ -y
@moriarty

This comment has been minimized.

Copy link
Owner Author

@moriarty moriarty commented Mar 13, 2019

Inside this Dockefile I then reverted some commits, and ran catkin build

https://gist.github.com/moriarty/4baa481f52d3abebe1ea2c6fe92c99d5

@moriarty

This comment has been minimized.

Copy link
Owner Author

@moriarty moriarty commented Mar 13, 2019

FYI @narora1

@moriarty

This comment has been minimized.

Copy link
Owner Author

@moriarty moriarty commented Mar 13, 2019

the docker file is built on top of nvidia-docker2:

https://gist.github.com/moriarty/8e0bfc320723c96c53a03c1933c5cdbb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment