-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
88 lines (65 loc) · 3.58 KB
/
Copy pathDockerfile
File metadata and controls
88 lines (65 loc) · 3.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# syntax=docker/dockerfile:experimental
FROM nvidia/cudagl:10.0-devel-ubuntu18.04
ARG DEBIAN_FRONTEND=noninteractive
ARG UBUNTU_RELEASE=bionic
WORKDIR /usr/local
# cuDNN
RUN --mount=type=bind,source=Installers/Nvidia/,target=/usr/local/Installers/Nvidia/ \
dpkg -i Installers/Nvidia/libcudnn7*
# TensorRT
RUN --mount=type=bind,source=Installers/Nvidia/,target=/usr/local/Installers/Nvidia/ \
dpkg -i Installers/Nvidia/nv-tensorrt-repo-ubuntu1804-cuda10.0-trt7.0.0.11-ga-20191216_1-1_amd64.deb
RUN apt-key add /var/nv-tensorrt-repo-cuda10.0-trt7.0.0.11-ga-20191216/7fa2af80.pub
RUN rm /etc/apt/sources.list.d/nvidia-ml.list
RUN apt-get update
RUN apt-get install -y libnvinfer7=7.0.0-1+cuda10.0 libnvonnxparsers7=7.0.0-1+cuda10.0 libnvparsers7=7.0.0-1+cuda10.0 libnvinfer-plugin7=7.0.0-1+cuda10.0 libnvinfer-dev=7.0.0-1+cuda10.0 libnvonnxparsers-dev=7.0.0-1+cuda10.0 libnvparsers-dev=7.0.0-1+cuda10.0 libnvinfer-plugin-dev=7.0.0-1+cuda10.0 python3-libnvinfer=7.0.0-1+cuda10.0
RUN apt-mark hold libnvinfer7 libnvonnxparsers7 libnvparsers7 libnvinfer-plugin7 libnvinfer-dev libnvonnxparsers-dev libnvparsers-dev libnvinfer-plugin-dev python3-libnvinfer python3-libnvinfer-dev
RUN apt-get install -y tensorrt
# ROS
RUN sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $UBUNTU_RELEASE main" > /etc/apt/sources.list.d/ros-latest.list'
RUN apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
RUN --mount=type=cache,target=/var/cache/apt --mount=type=cache,target=/var/lib/apt \
apt-get update && \
apt-get install -y ros-melodic-desktop-full
RUN echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc
RUN --mount=type=cache,target=/var/cache/apt --mount=type=cache,target=/var/lib/apt \
apt-get install -y python-rosdep python-rosinstall python-rosinstall-generator python-wstool build-essential && \
rosdep init && \
rosdep update
RUN apt-get install -y python-pip && \
pip install catkin_tools
# Gazebo Update
RUN sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable $UBUNTU_RELEASE main" > /etc/apt/sources.list.d/gazebo-stable.list'
RUN curl https://packages.osrfoundation.org/gazebo.key | apt-key add
RUN --mount=type=cache,target=/var/cache/apt --mount=type=cache,target=/var/lib/apt \
apt-get update && \
apt-get install -y gazebo9
# MISC ROS
RUN --mount=type=cache,target=/var/cache/apt --mount=type=cache,target=/var/lib/apt \
apt-get upgrade -y libignition-math2
RUN --mount=type=cache,target=/var/cache/apt --mount=type=cache,target=/var/lib/apt \
apt-get install -y ros-melodic-tf2-sensor-msgs libgoogle-glog-dev ros-melodic-effort-controllers ros-melodic-position-controllers
# CMake
RUN mkdir -p /usr/local/Installers/CMake
WORKDIR /usr/local/Installers/CMake
RUN --mount=type=bind,source=Installers/CMake/,target=/usr/local/Installers/CMake/ \
sh ./install_cmake.sh
WORKDIR /usr/local
ENV PATH=/opt/cmake/bin${PATH:+:${PATH}}
# OpenCV
RUN mkdir -p /usr/local/Installers/OpenCV
WORKDIR /usr/local/Installers/OpenCV
RUN --mount=type=bind,source=Installers/OpenCV/,target=/usr/local/Installers/OpenCV/,rw \
sh ./opencv_build.sh
WORKDIR /usr/local
# Pylon
RUN --mount=type=bind,source=Installers/Pylon/,target=/usr/local/Installers/Pylon/ \
apt-get install -y ./Installers/Pylon/pylon_6.1.1.19861-deb0_amd64.deb
RUN echo "source /opt/pylon/bin/pylon-setup-env.sh /opt/pylon" >> ~/.bashrc
# tkDNN
RUN --mount=type=bind,source=Installers/tkDNN/,target=/usr/local/Installers/tkDNN/,rw \
cd /usr/local/Installers/tkDNN && \
sh ./install_tkDNN.sh
# Cleanup
RUN rm -r -f Installers && \
ldconfig