forked from rosmed/docker-ubuntu-22.04-ros2-novnc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.slicerros2.lw
75 lines (57 loc) · 3.03 KB
/
Dockerfile.slicerros2.lw
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
################################################################################
# base system
################################################################################
#FROM rosmed/docker-ubuntu-vnc-desktop-base:ismr2023 as system
FROM rosmed/docker-ubuntu-22.04-ros2:ismr2024 as system
## Install Gazebo Ignition
WORKDIR /root
RUN apt-get install -y ros-humble-ros-gz
#
# Copy 3D Silcer
#
WORKDIR /root
RUN mkdir -p /root/slicer/packages
COPY --from=rosmed/docker-ubuntu-22.04-ros2-slicerros2:ismr2024 /root/slicer/packages/Slicer*humble.tar.gz /root/slicer/packages
RUN tar zxvf /root/slicer/packages/Slicer*humble.tar.gz -C /root/slicer \
&& /bin/bash -c 'rm `find /root/slicer/packages/Slicer*.tar.gz`' \
&& /bin/bash -c 'mv `find /root/slicer/Slicer* -maxdepth 0` /root/slicer/Slicer-5.6'
#
# Additional ROS2 packages (dVRK) + ros2 workspace
#
WORKDIR /root
RUN apt update -y \
&& apt install -y python3-vcstool python3-colcon-common-extensions \
&& apt install -y python3-pykdl \
&& apt install -y libxml2-dev libraw1394-dev libncurses5-dev qtcreator swig sox espeak cmake-curses-gui cmake-qt-gui git subversion gfortran libcppunit-dev libqt5xmlpatterns5-dev libbluetooth-dev \
&& apt install -y ros-humble-joint-state-publisher* ros-humble-xacro ros-humble-ament-* ros-humble-ign-ros2-control ros-humble-ros2-control* ros-humble-joint-state-broadcaster
#WORKDIR /root
#RUN mkdir -p /root/ros2_ws/src \
# && cd /root/ros2_ws/src \
# && /bin/bash -c 'source /opt/ros/humble/setup.sh; vcs import --input https://raw.githubusercontent.com/jhu-dvrk/dvrk_robot_ros2/main/dvrk.vcs --recursive'
#
# Install 3D Slicer Extensions
#
COPY --from=rosmed/docker-ubuntu-22.04-ros2-slicerros2:ismr2024 /root/slicer/packages/*git*.tar.gz /root/slicer/packages
COPY slicer/install-extension.py /root/slicer
COPY slicer/install-module.py /root/slicer
COPY slicer/start-slicer-ros2.bash /root
WORKDIR /root
RUN cd /root \
&& chmod 755 start-slicer-ros2.bash
# && /bin/bash -c 'rm `find /root/slicer/packages/*.tar.gz`'
RUN /bin/bash -c "export EXTENSION_DIR=/root/slicer/packages; xvfb-run --auto-servernum /root/slicer/Slicer-5.6/Slicer --no-main-window --no-splash --python-script /root/slicer/install-extension.py"
#
# PLUS Toolkit
#
WORKDIR /root
# RUN apt install -y libqt5x11extras5-dev qtdeclarative5-dev qml-module-qtquick*
COPY --from=rosmed/docker-ubuntu-22.04-ros2-slicerros2:ismr2024 /root/plus /root/plus
# ismr 2024 ROS2 files
WORKDIR /root
#COPY slicer/ismr24.sh /root
RUN apt-get install ros-humble-teleop-twist-keyboard
RUN mkdir -p /root/ismr24_ws \
&& cd /root/ismr24_ws \
&& git clone https://github.com/rosmed/ismr24 src \
&& /bin/bash -c 'source /opt/ros/humble/setup.bash; rosdep update; rosdep install --from-paths src --ignore-src; colcon build --cmake-args -DPlusLib_DIR:PATH=/root/plus/PlusBuild-bin/PlusLib-bin -DVTK_DIR=/root/plus/PlusBuild-bin/vtk-bin'
RUN /bin/bash -c 'echo "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/root/plus/PlusBuild-bin/bin:/root/plus/PlusBuild-bin/vtk-bin/lib" >> /root/.bashrc'