Skip to content

Instantly share code, notes, and snippets.

@moriarty
Created March 13, 2019 02:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save moriarty/6667d6f139b0fd80dba1f497e9d69373 to your computer and use it in GitHub Desktop.
Save moriarty/6667d6f139b0fd80dba1f497e9d69373 to your computer and use it in GitHub Desktop.
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
Copy link
Author

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

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

@moriarty
Copy link
Author

FYI @narora1

@moriarty
Copy link
Author

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