-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.base
More file actions
134 lines (112 loc) · 5.05 KB
/
Dockerfile.base
File metadata and controls
134 lines (112 loc) · 5.05 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
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
134
ARG BASE_IMAGE=osrf/ros:humble-desktop
FROM $BASE_IMAGE
ARG DEBIAN_FRONTEND=noninteractive
ARG UID=1000
# User
RUN useradd -d /ulstu -m \
-u 1000 -U \
-s /usr/bin/bash \
-G dialout \
-c "Ulstu Robotics" ulstu && \
echo "ulstu ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
# Essentials
RUN apt-get update && apt-get install --no-install-recommends -y -o Dpkg::Options::="--force-overwrite" \
ros-humble-navigation2 \
ros-humble-nav2-bringup \
ros-humble-rviz2 \
ros-humble-teleop-twist-keyboard \
ros-humble-dynamixel-sdk \
ros-humble-can-msgs \
ros-humble-ruckig \
ros-humble-laser-filters \
ros-humble-domain-bridge \
ros-humble-rmw-cyclonedds-cpp \
ros-humble-ros2-control \
ros-humble-ros2-controllers \
ros-humble-rqt-common-plugins \
ros-humble-nav2-common \
ros-humble-dynamixel-workbench-toolbox \
ros-humble-behaviortree-cpp \
libopencv-dev \
python3-pip \
python3-pil \
alsa \
libxshmfence1 \
libgtk-3-dev \
git \
git-lfs \
curl \
wget \
vim \
rsync \
dialog \
nano \
software-properties-common \
fuse
RUN apt install --yes xvfb ffmpeg lsb-release g++ make libavcodec-extra libglu1-mesa libegl1 libxkbcommon-x11-dev libxcb-keysyms1 libxcb-image0 libxcb-icccm4 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcomposite-dev libxtst6 libnss3
RUN curl -sL https://deb.nodesource.com/setup_18.x | bash - && \
apt-get update && apt-get install -y nodejs
# VS Code https://code.visualstudio.com/sha/download?build=stable&os=linux-deb-x64
RUN curl -L -o /tmp/vscode.deb \
'https://code.visualstudio.com/sha/download?build=stable&os=linux-deb-x64' && \
apt-get install -y /tmp/vscode.deb && \
rm -f /tmp/vscode.deb
#ENV DONT_PROMPT_WSL_INSTALL=No_Prompt_please
# RUN su ulstu -c 'code --install-extension eamodio.gitlens' && \
# su ulstu -c 'code --install-extension ms-python.python' && \
# su ulstu -c 'code --install-extension ms-vscode.cpptools-extension-pack' && \
# su ulstu -c 'code --install-extension usernamehw.errorlens' && \
# su ulstu -c 'code --install-extension redhat.vscode-xml' && \
# su ulstu -c 'code --install-extension ms-iot.vscode-ros'
# VS Code server
# RUN su ulstu -c 'curl -fsSL https://code-server.dev/install.sh | sh' && \
# su ulstu -c 'code-server --install-extension eamodio.gitlens' && \
# su ulstu -c 'code-server --install-extension ms-python.python' && \
# su ulstu -c 'code-server --install-extension ms-vscode.cpptools-extension-pack' && \
# su ulstu -c 'code-server --install-extension usernamehw.errorlens' && \
# su ulstu -c 'code-server --install-extension redhat.vscode-xml' && \
# su ulstu -c 'code-server --install-extension ms-iot.vscode-ros'
RUN su ulstu -c 'curl -fsSL https://code-server.dev/install.sh | sh'
# Webots
RUN curl -L -o /tmp/webots.deb \
'https://github.com/cyberbotics/webots/releases/download/R2023b/webots_2023b_amd64.deb'
RUN apt-get update && \
apt-get install -y /tmp/webots.deb && \
rm -f /tmp/webots.deb && \
mkdir -p /ulstu/.config/Cyberbotics
# Groot
# RUN curl -L -o /opt/Groot2.AppImge \
# 'https://s3.us-west-1.amazonaws.com/download.behaviortree.dev/groot2_linux_installer/Groot2-v1.5.2-x86_64.AppImage' && \
# chmod +x /opt/Groot2.AppImge && \
# ln -sf /opt/Groot2.AppImge /usr/bin/groot2
RUN pip3 install --no-cache-dir scipy transforms3d fastseg prometheus_client cameratransform cherrypy pyyaml lapx ultralytics pyserial json-rpc shapely pyproj geopy tensorflow scikit-learn
#HOTFIX: https://github.com/ros-controls/ros2_controllers/issues/482
RUN wget -O /tmp/diff_drive_controller.deb http://snapshots.ros.org/humble/2022-11-23/ubuntu/pool/main/r/ros-humble-diff-drive-controller/ros-humble-diff-drive-controller_2.12.0-1jammy.20221108.202153_amd64.deb && \
apt install -y --allow-downgrades /tmp/diff_drive_controller.deb && \
rm -f /tmp/diff_drive_controller.deb
# User config
COPY ./config/bashrc /tmp/bashrc
COPY ./config/vscode-server/config.yaml /ulstu/.config/code-server/config.yaml
COPY ./config/vscode/. /ulstu/ros2_ws/.vscode/
COPY ./config/Cyberobotics/. /ulstu/.config/Cyberbotics/
COPY --chmod=755 ./config/setup.sh /usr/bin/
RUN cat /tmp/bashrc >> /ulstu/.bashrc && \
rm -f /tmp/bashrc && \
mkdir -p /ulstu/repositories && \
mkdir -p /ulstu/ros2_ws/src && \
chown -R ulstu:ulstu /ulstu
USER ulstu
# Webots ROS2 from source (version 2023.1.3)
RUN cd /ulstu/ros2_ws/src && \
git clone --recurse-submodules --branch 2023.1.3 https://github.com/cyberbotics/webots_ros2.git
# && \
# chown -R ulstu:ulstu /ulstu/ros2_ws
#RUN sudo -E rosdep init
RUN apt-get install -y python3-vcstool
RUN rosdep --rosdistro "${ROS_DISTRO}" update
RUN cd /ulstu/ros2_ws && yes | rosdep --rosdistro "${ROS_DISTRO}" install -r --from-paths src --ignore-src
RUN pip3 install matplotlib scipy --upgrade
WORKDIR /ulstu/ros2_ws
EXPOSE 31415
EXPOSE 8008
EXPOSE 1234