-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.cuda
More file actions
61 lines (35 loc) · 1.62 KB
/
Copy pathDockerfile.cuda
File metadata and controls
61 lines (35 loc) · 1.62 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
FROM althack/ros2:humble-cuda-dev-2025-03-01
SHELL ["/bin/bash", "-c"]
ENV ROS_DISTRO=humble
# Add ROS repository and update the GPG keys
RUN curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | apt-key add - \
&& echo "deb http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" > /etc/apt/sources.list.d/ros2.list
ARG USERID=2000
RUN apt-get update \
&& useradd -rm -d /home/dockuser -s /bin/bash -g root -G sudo -u ${USERID} dockuser -p "$(openssl passwd -1 dockuser)" \
&& apt-get install -y python3-pip \
&& apt-get install -y ros-humble-cv-bridge \
&& apt-get clean
RUN pip install torch torchvision==0.21.0
WORKDIR /bt_workspace
RUN mkdir src
WORKDIR /bt_workspace/src
# Clone behaviour Tree cpp library
RUN git clone https://github.com/BehaviorTree/BehaviorTree.CPP.git && cd BehaviorTree.CPP && git checkout 4.6.2
RUN git clone https://github.com/BehaviorTree/BehaviorTree.ROS2.git
WORKDIR /bt_workspace/
RUN rosdep update
# Install ros dependencies
RUN rosdep install --from-paths src -y --ignore-src
# Build the library and source it
RUN source /opt/ros/humble/setup.bash && colcon build --symlink-install
RUN source /bt_workspace/install/setup.bash
WORKDIR /ws
RUN mkdir src
WORKDIR /ws/src
RUN git clone https://github.com/micro-ROS/system_modes.git && cd system_modes && git checkout 682ecb7
WORKDIR /ws
RUN colcon build
RUN echo "source /opt/ros/humble/setup.bash" >> /home/dockuser/.bashrc && echo "source /bt_workspace/install/setup.bash" >> /home/dockuser/.bashrc && echo "source /ws/install/setup.bash" >> /home/dockuser/.bashrc
ADD ./ros_ws /ros_ws
WORKDIR /ros_ws