-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathDockerfile
133 lines (96 loc) · 4.82 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
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
FROM osrf/ros:melodic-desktop-full
ARG ROS_USER
ENV ROS_USER="${ROS_USER}"
ARG R_GID
ENV R_GID="${R_GID}"
ARG R_UID
ENV R_UID="${R_UID}"
RUN echo "$ROS_USER"
RUN useradd -m $ROS_USER && \
echo "$ROS_USER:$ROS_USER" | chpasswd && \
usermod --shell /bin/bash $ROS_USER && \
usermod -aG sudo $ROS_USER && \
echo "$ROS_USER ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers.d/$ROS_USER && \
chmod 0440 /etc/sudoers.d/$ROS_USER && \
# Replace 1000 with your user/group id
usermod --uid $R_UID $ROS_USER && \
groupmod --gid $R_GID $ROS_USER
COPY pulse-client.conf /etc/pulse/client.conf
RUN apt-get update -y && apt-get install -y python-rosdep python-rosinstall python-rosinstall-generator python-wstool build-essential python-pip python3-pip unzip libpulse0 pulseaudio pulseaudio-utils libcanberra-gtk* curl libjsoncpp-dev python-catkin-tools ros-melodic-webrtc ros-melodic-sound-play ros-melodic-rosauth groff ros-melodic-tts
RUN export GTK_PATH=/usr/lib/x86_64-linux-gnu/gtk-2.0
RUN mkdir /home/$ROS_USER/flo_data \
&& mkdir /home/$ROS_USER/catkin_ws/src -p
RUN chown -R $ROS_USER /home/$ROS_USER
USER $ROS_USER
RUN HOME="/home/$ROS_USER"\
&& export HOME
RUN /ros_entrypoint.sh pip2 install 'mutagen==1.43.0' --user
RUN pip3 install -U boto3
USER root
WORKDIR /aws-temp
RUN curl "https://s3.amazonaws.com/aws-cli/awscli-bundle-1.19.112.zip" -o "awscli-bundle.zip" \
&& unzip awscli-bundle.zip
RUN ./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws \
WORKDIR /aws-temp
RUN rm awscli-bundle.zip && rm -r awscli-bundle
USER $ROS_USER
RUN /ros_entrypoint.sh rosdep update --include-eol-distros
WORKDIR /home/$ROS_USER/catkin_ws/src
RUN git clone --single-branch --branch ros1-develop https://github.com/fkie/async_web_server_cpp.git
WORKDIR /home/$ROS_USER/catkin_ws/src
RUN git clone --single-branch --branch develop https://github.com/RobotWebTools/webrtc_ros.git \
&& cd webrtc_ros \
&& git checkout a2a19da \
&& cd webrtc \
&& touch CATKIN_IGNORE
# RUN git clone https://github.com/anht-nguyen/webrtc_ros.git
WORKDIR /home/$ROS_USER/catkin_ws/src
RUN git clone https://github.com/RobotWebTools/tf2_web_republisher.git
WORKDIR /home/$ROS_USER/catkin_ws/src
RUN git clone --single-branch --branch nousub https://github.com/mjsobrep/rosbridge_suite.git
WORKDIR /home/$ROS_USER/catkin_ws
RUN /ros_entrypoint.sh rosdep install --from-paths src --ignore-src -r -y --skip-keys "realsense2_camera realsense2_description rosbridge_suite rosbridge_server rosbridge_library rosbridge_msgs video_stream_opencv"
WORKDIR /home/$ROS_USER/catkin_ws
RUN /ros_entrypoint.sh catkin build
# Replace catkin_make with catkin_tools (eg: catkin build)
# RUN /ros_entrypoint.sh catkin build #webrtc_ros
# RUN /ros_entrypoint.sh catkin_make
# RUN /ros_entrypoint.sh catkin_make --build-space build2
WORKDIR /home/$ROS_USER/catkin_ws/src/FloSystem
COPY ./flo_core/CMakeLists.txt ./flo_core/
COPY ./flo_core/package.xml ./flo_core/
COPY ./flo_core_defs/CMakeLists.txt ./flo_core_defs/
COPY ./flo_core_defs/package.xml ./flo_core_defs/
COPY ./flo_face/flo_face/CMakeLists.txt ./flo_face/flo_face/
COPY ./flo_face/flo_face/package.xml ./flo_face/flo_face/
COPY ./flo_face/flo_face_defs/CMakeLists.txt ./flo_face/flo_face_defs/
COPY ./flo_face/flo_face_defs/package.xml ./flo_face/flo_face_defs/
COPY ./flo_humanoid/CMakeLists.txt ./flo_humanoid/
COPY ./flo_humanoid/package.xml ./flo_humanoid/
COPY ./flo_humanoid_defs/CMakeLists.txt ./flo_humanoid_defs/
COPY ./flo_humanoid_defs/package.xml ./flo_humanoid_defs/
COPY ./flo_telepresence/CMakeLists.txt ./flo_telepresence/
COPY ./flo_telepresence/package.xml ./flo_telepresence/
COPY ./flo_web/CMakeLists.txt ./flo_web/
COPY ./flo_web/package.xml ./flo_web/
COPY ./system_monitor/CMakeLists.txt ./system_monitor/
COPY ./system_monitor/package.xml ./system_monitor/
WORKDIR /home/$ROS_USER/catkin_ws
RUN /ros_entrypoint.sh rosdep install --from-paths src --ignore-src -r -y --skip-keys "realsense2_camera realsense2_description rosbridge_suite rosbridge_server rosbridge_library rosbridge_msgs video_stream_opencv"
WORKDIR /home/$ROS_USER/catkin_ws/src/FloSystem
COPY ./ ./
WORKDIR /home/$ROS_USER/catkin_ws
RUN /ros_entrypoint.sh catkin build
RUN /ros_entrypoint.sh catkin config --install
# RUN /ros_entrypoint.sh catkin_make
# RUN /ros_entrypoint.sh catkin_make install
#RUN echo "source /catkin_ws/devel/setup.bash" >> /root/.bashrc
USER root
RUN head -n -1 /ros_entrypoint.sh > /tmp.sh \
&& mv /tmp.sh /ros_entrypoint.sh \
&& echo 'source "/home/$ROS_USER/catkin_ws/devel/setup.bash"' >> /ros_entrypoint.sh \
&& echo 'exec $@' >> /ros_entrypoint.sh \
&& chmod +x /ros_entrypoint.sh
USER $ROS_USER
ENTRYPOINT ["/ros_entrypoint.sh"]
CMD ["bash"]