-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
135 lines (99 loc) · 3.7 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
134
135
from ubuntu:20.04
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get -y update && apt -y install \
gcc git \
wget vim curl \
python3-pip cmake automake \
build-essential \
apt-utils flex bison mona ccache
# installing spot using apt
RUN wget -q -O - https://www.lrde.epita.fr/repo/debian.gpg | apt-key add -
SHELL ["/bin/bash", "-c"]
RUN pip3 install pyyaml numpy bidict networkx graphviz ply pybullet pyperplan==1.3 cython IPython svgwrite matplotlib imageio lark-parser==0.9.0 sympy==1.6.1
RUN echo 'deb https://www.lrde.epita.fr/repo/debian/ stable/' >> /etc/apt/sources.list
# try --allow-unauthenticated if authentication fails
RUN apt-get -y update && apt-get -y install spot \
libspot-dev \
spot-doc
# Add the ROS GPG key and repository
RUN wget https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc && \
apt-key add ros.asc && \
sh -c 'echo "deb http://packages.ros.org/ros/ubuntu focal main" > /etc/apt/sources.list.d/ros-latest.list'
# Update the package list again
RUN apt-get update
# Install ROS Noetic and rosdep
RUN apt-get install -y \
ros-noetic-desktop-full \
python3-rosdep \
python3-rosinstall \
python3-rosinstall-generator \
python3-wstool \
python3-catkin-tools \
ros-noetic-moveit \
ros-noetic-moveit-visual-tools \
ros-noetic-moveit-planners-ompl \
ros-noetic-moveit-ros-planning-interface \
ros-noetic-moveit-commander \
ros-noetic-moveit-simple-controller-manager \
ros-noetic-moveit-ros-control-interface \
ros-noetic-moveit-ros-visualization \
ros-noetic-vrpn-client-ros \
ros-noetic-franka-control \
ros-noetic-panda-moveit-config
# Install required libraries for Qt X11
RUN apt-get update && apt-get install -y \
libxcb-xinerama0 \
libqt5gui5 \
libqt5widgets5 \
x11-apps
# Initialize rosdep
RUN rosdep init && \
rosdep update
# install eigen
RUN wget https://gitlab.com/libeigen/eigen/-/archive/3.4.0/eigen-3.4.0.tar.gz
RUN tar -xzvf eigen-3.4.0.tar.gz
RUN cd eigen-3.4.0 && mkdir build && cd build
WORKDIR /eigen-3.4.0/build
RUN cmake -DCMAKE_CXX_COMPILER=g++ -DCMAKE_C_COMPILER=gcc ..
RUN make && make install
# Clean up unnecessary ROS files
RUN rm -rf ros.asc
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
# Set environment variables
ENV PATH="/usr/local/bin:${PATH}"
ENV ROS_DISTRO noetic
#### SETUP RELATED TO PLANNER
# installing system packages
ADD cudd_and_wrapper/cudd /cudd
ADD cudd_and_wrapper/PyDD /PyDD
ADD ./ /root/symbolic_planning/src
RUN rm -rf /root/symbolic_planning/src/cudd && rm -rf /root/symbolic_planning/src/PyDD
#### SETUP RELATED TO SIMULATOR ####
# Create a catkin workspace
RUN mkdir -p /root/ws/src
WORKDIR /root/ws
RUN rosdep update
RUN /bin/bash -c "source /opt/ros/noetic/setup.bash"
RUN /bin/bash -c "echo 'export PATH=/usr/lib/ccache:$PATH' >> $HOME/.bashrc && source $HOME/.bashrc"
WORKDIR /root/ws/src
RUN git clone https://github.com/peteramorese/taskit.git
#### INSTALLATION RELATED TO SIMULATOR ####
WORKDIR /root/ws
RUN catkin config --install --extend /opt/ros/${ROS_DISTRO} --cmake-args -DCMAKE_BUILD_TYPE=Release
# Build the workspace
RUN catkin build
RUN echo 'source ~/ws/devel/setup.bash' >> ~/.bashrc
#### INSTALLATION RELATED TO PLANNER ####
RUN cd /cudd/ && \
./configure --enable-shared \
--enable-obj --enable-dddmp \
&& make -j4 \
&& make check && make install
RUN cd /PyDD && python3 setup.py install
RUN cd /root/symbolic_planning/src/src/LTLf2DFA && pip3 install .
RUN echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib' >> ~/.bashrc
#### Change working directory ####
WORKDIR /root/symbolic_planning/src
# make plots directory where all the plots are dumped
RUN mkdir -p plots
ENTRYPOINT "/bin/bash"