-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile.base
59 lines (47 loc) · 1.9 KB
/
Dockerfile.base
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
FROM osrf/ros:kinetic-desktop-full-xenial AS deplist
COPY . /package
# Delete all files not named "package.xml" or "requirements.txt"
RUN cd /package && \
find . -type f ! -name 'package.xml' ! -name 'requirements.txt' -delete
FROM osrf/ros:kinetic-desktop-full-xenial
# nvidia-docker hooks
LABEL com.nvidia.volumes.needed="nvidia_driver"
ENV PATH /usr/local/nvidia/bin:${PATH}
ENV LD_LIBRARY_PATH /usr/local/nvidia/lib:/usr/local/nvidia/lib64:${LD_LIBRARY_PATH}
# Install pip
RUN apt-get update && \
apt-get install -y python-pip sudo && \
pip install --upgrade pip
#&& \
#rm -rf /var/lib/apt/lists/
# setup Catkin workspace
# RUN apt-get update && apt-get install -y catkin && rm -rf /var/lib/apt/lists/
RUN bash -c "source ros_entrypoint.sh && \
mkdir -p /catkin_ws/src && \
cd /catkin_ws/src && \
catkin_init_workspace && \
cd .. && catkin_make && \
echo 'source /catkin_ws/devel/setup.bash' >> /ros_entrypoint.sh && \
echo 'source /ros_entrypoint.sh' >> /root/.bashrc && \
echo 'set +e' >> /root/.bashrc"
# Add dependencies
COPY --from=deplist /package /catkin_ws/src/iarc-2017
# For now, ignore the 3D simulator becacuse it needs such big dependencies
RUN rm -rf \
/catkin_ws/src/iarc-2017/iarc_sim_3d \
/catkin_ws/src/iarc-2017/libraries/irobot_create_description
# Install dependencies
RUN bash -c "source ros_entrypoint.sh && \
apt-get update && rosdep update && \
rosdep install -y --ignore-src --from-paths /catkin_ws/src && \
pip install -r catkin_ws/src/**/requirements.txt"
# rm -rf ~/.ros/rosdep && rm -rf /var/lib/apt/lists/
COPY docker/ui /bin/ui
# install package
COPY . /catkin_ws/src/iarc-2017
# For now, ignore the 3D simulator becacuse it needs such big dependencies
RUN rm -rf \
/catkin_ws/src/iarc-2017/iarc_sim_3d \
/catkin_ws/src/iarc-2017/libraries/irobot_create_description
RUN bash -c "source ros_entrypoint.sh && \
cd /catkin_ws && catkin_make"