-
Notifications
You must be signed in to change notification settings - Fork 40
/
Dockerfile
54 lines (37 loc) · 1.4 KB
/
Dockerfile
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
FROM nvidia/cuda:10.0-devel-ubuntu16.04
ENV USERNAME simtrack
ENV WORKSPACE /home/$USERNAME/my-ws/
SHELL ["/bin/bash", "-c"]
RUN apt-get update && apt-get install -q -y \
dirmngr \
gnupg2 \
lsb-release \
sudo \
&& rm -rf /var/lib/apt/lists/*
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
RUN echo "deb http://packages.ros.org/ros/ubuntu `lsb_release -sc` main" > /etc/apt/sources.list.d/ros-latest.list
RUN apt-get update && apt-get install --no-install-recommends -y \
python-rosdep \
python-rosinstall \
python-vcstools \
&& rm -rf /var/lib/apt/lists/*
ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8
RUN apt-get update && apt-get install -y \
ros-kinetic-desktop-full \
&& rm -rf /var/lib/apt/lists/*
RUN rosdep init \
&& rosdep update
RUN useradd -ms /bin/bash $USERNAME
RUN echo "${USERNAME} ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
USER $USERNAME
RUN mkdir -p $WORKSPACE/src/simtrack
# docker does not yet support environment-var expansion in command options
COPY --chown=simtrack . $WORKSPACE/src/simtrack
WORKDIR $WORKSPACE
RUN source /opt/ros/kinetic/setup.sh && \
if [ ! -f /etc/ros/rosdep/sources.list.d/20-default.list ]; then sudo rosdep init; fi && \
rosdep update && \
sudo apt-get update && \
rosdep install --from-paths src --ignore-src -y -r && \
sudo rm -rf /var/lib/apt/lists/*