-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use non-root user, add submodule catkin_simple
- Loading branch information
1 parent
2c42f1e
commit 8b0b641
Showing
5 changed files
with
28 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,6 @@ | |
[submodule "rpg_dvs_ros"] | ||
path = rpg_dvs_ros | ||
url = [email protected]:uzh-rpg/rpg_dvs_ros.git | ||
[submodule "catkin_simple"] | ||
path = catkin_simple | ||
url = https://github.com/catkin/catkin_simple.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,40 @@ | ||
FROM osrf/ros:melodic-desktop-full | ||
RUN apt update && apt install -y git wget | ||
ENV DISPLAY host.docker.internal:0.0 | ||
ENV DISPLAY=host.docker.internal:0.0 | ||
## python-catkin-tools | ||
#### Add User ID and Group ID | ||
ARG UNAME=rate | ||
ARG UID=1000 | ||
ARG GID=1000 | ||
RUN groupadd -g $GID -o $UNAME | ||
RUN useradd -m -u $UID -g $GID -o -s /bin/bash $UNAME | ||
|
||
ARG CODE_DIR=/home/${UNAME} | ||
|
||
#### ROS setup #### | ||
RUN mkdir -p ~/catkin_ws/src && \ | ||
echo "source /opt/ros/melodic/setup.bash" >> /root/.bashrc | ||
RUN mkdir -p ${CODE_DIR}/catkin_ws/src && \ | ||
echo "source /opt/ros/melodic/setup.bash" >> ${CODE_DIR}/.bashrc | ||
|
||
#### Install dependencies #### | ||
RUN apt-get update && apt-get install -y python-catkin-tools | ||
# catkin_simple | ||
RUN cd ~/catkin_ws/src && \ | ||
git clone https://github.com/catkin/catkin_simple.git | ||
# build libcaer library | ||
RUN mkdir ~/src && cd ~/src && \ | ||
RUN mkdir ${CODE_DIR}/src && cd ${CODE_DIR}/src && \ | ||
git clone https://gitlab.com/inivation/dv/libcaer.git && cd libcaer && \ | ||
apt-get install -y build-essential cmake pkg-config libusb-1.0-0-dev && \ | ||
cmake -DCMAKE_INSTALL_PREFIX=/usr . && \ | ||
make && make install | ||
# build ceres | ||
RUN apt-get install -y libgoogle-glog-dev libgflags-dev \ | ||
libatlas-base-dev libeigen3-dev && \ | ||
cd ~/src && wget http://ceres-solver.org/ceres-solver-2.1.0.tar.gz && \ | ||
cd ${CODE_DIR}/src && wget http://ceres-solver.org/ceres-solver-2.1.0.tar.gz && \ | ||
tar zxf ceres-solver-2.1.0.tar.gz && \ | ||
mkdir -p ~/src/ceres-solver-2.1.0/build && cd ~/src/ceres-solver-2.1.0/build && \ | ||
mkdir -p ${CODE_DIR}/src/ceres-solver-2.1.0/build && cd ${CODE_DIR}/src/ceres-solver-2.1.0/build && \ | ||
cmake .. && make && make install | ||
|
||
#### Copy source code #### | ||
COPY ./ /root/catkin_ws/src | ||
COPY ./ ${CODE_DIR}/catkin_ws/src | ||
|
||
RUN chown -R $UNAME:$UNAME ${CODE_DIR}/catkin_ws | ||
|
||
USER $UNAME | ||
WORKDIR ${CODE_DIR} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule catkin_simple
added at
0e6284
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters