Created
March 13, 2019 02:29
-
-
Save moriarty/6667d6f139b0fd80dba1f497e9d69373 to your computer and use it in GitHub Desktop.
Dockerfile nvidia-docker2 ros-kinetic-desktop-full fetch gazebo7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
FYI @narora1
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
Inside this Dockefile I then reverted some commits, and ran
catkin build
https://gist.github.com/moriarty/4baa481f52d3abebe1ea2c6fe92c99d5