Skip to content

Commit eae5250

Browse files
committed
update slam container
1 parent a6e6465 commit eae5250

17 files changed

+588
-203
lines changed

cvo_gpu/.zshrc

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
2+
# Initialization code that may require console input (password prompts, [y/n]
3+
# confirmations, etc.) must go above this block, everything else may go below.
4+
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
5+
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
6+
fi
7+
8+
# If you come from bash you might have to change your $PATH.
9+
# export PATH=$HOME/bin:/usr/local/bin:$PATH
10+
11+
# Path to your oh-my-zsh installation.
12+
export ZSH=$HOME/.oh-my-zsh
13+
14+
# Set name of the theme to load --- if set to "random", it will
15+
# load a random theme each time oh-my-zsh is loaded, in which case,
16+
# to know which specific one was loaded, run: echo $RANDOM_THEME
17+
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
18+
19+
ZSH_THEME="powerlevel10k/powerlevel10k"
20+
21+
# Which plugins would you like to load?
22+
# Standard plugins can be found in ~/.oh-my-zsh/plugins/*
23+
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
24+
# Example format: plugins=(rails git textmate ruby lighthouse)
25+
# Add wisely, as too many plugins slow down shell startup.
26+
27+
plugins=(git cp z cp extract history colorize command-not-found sudo zsh-autosuggestions zsh-syntax-highlighting)
28+
29+
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(user anaconda dir)
30+
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(nvm pyenv time)
31+
POWERLEVEL9K_DISABLE_GITSTATUS=true
32+
33+
source $ZSH/oh-my-zsh.sh
34+
35+
# User configuration
36+
37+
export SSH_KEY_PATH="~/.ssh/rsa_id"
38+
39+
# Set personal aliases, overriding those provided by oh-my-zsh libs,
40+
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
41+
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
42+
# For a full list of active aliases, run `alias`.
43+
44+
45+
alias ll='ls -alF'
46+
alias la='ls -A'
47+
alias l='ls -CF'
48+
49+
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
50+
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
51+
source ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
52+
source /opt/ros/noetic/setup.zsh
53+
source ~/ws/cassie_ros/catkin_ws/devel/setup.zsh
54+
source /opt/intel/bin/compilervars.sh intel64

cvo_gpu/Dockerfile

+94-81
Original file line numberDiff line numberDiff line change
@@ -20,73 +20,73 @@ RUN apt-get update \
2020

2121
# remove deprecated nvidia key
2222
RUN apt install -y wget && wget -qO - https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub | apt-key add - \
23-
&& apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub
23+
&& apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub
2424

2525
RUN apt update && apt-get install -y software-properties-common && \
26-
add-apt-repository ppa:ubuntu-toolchain-r/test && \
27-
apt-get update && apt-get install -y --no-install-recommends \
28-
sudo \
29-
gcc-9 \
30-
g++-9 \
31-
dialog \
32-
apt-utils \
33-
libeigen3-dev \
34-
git \
35-
mercurial \
36-
pkg-config \
37-
mesa-utils \
38-
libxau-dev \
39-
libxdmcp-dev \
40-
libxcb1-dev \
41-
libxext-dev \
42-
libx11-dev \
43-
git \
44-
tmux \
45-
wget \
46-
curl \
47-
cmake \
48-
vim \
49-
build-essential \
50-
unzip \
51-
autoconf \
52-
autogen \
53-
automake \
54-
libtool \
55-
mlocate \
56-
zlib1g-dev \
57-
libopenblas-dev \
58-
qt5-default \
59-
libflann-dev \
60-
libopencv-dev \
61-
libpcl-dev \
62-
libboost-all-dev \
63-
libsuitesparse-dev \
64-
libatlas-base-dev \
65-
libtbb-dev \
66-
libusb-1.0-0-dev \
67-
libgtest-dev \
68-
libgoogle-glog-dev \
69-
pkg-config \
70-
software-properties-common \
71-
cmake-curses-gui \
72-
gdb
26+
add-apt-repository ppa:ubuntu-toolchain-r/test && \
27+
apt-get update && apt-get install -y --no-install-recommends \
28+
sudo \
29+
gcc-9 \
30+
g++-9 \
31+
dialog \
32+
apt-utils \
33+
libeigen3-dev \
34+
git \
35+
mercurial \
36+
pkg-config \
37+
mesa-utils \
38+
libxau-dev \
39+
libxdmcp-dev \
40+
libxcb1-dev \
41+
libxext-dev \
42+
libx11-dev \
43+
git \
44+
tmux \
45+
wget \
46+
curl \
47+
cmake \
48+
vim \
49+
build-essential \
50+
unzip \
51+
autoconf \
52+
autogen \
53+
automake \
54+
libtool \
55+
mlocate \
56+
zlib1g-dev \
57+
libopenblas-dev \
58+
qt5-default \
59+
libflann-dev \
60+
libopencv-dev \
61+
libpcl-dev \
62+
libboost-all-dev \
63+
libsuitesparse-dev \
64+
libatlas-base-dev \
65+
libtbb-dev \
66+
libusb-1.0-0-dev \
67+
libgtest-dev \
68+
libgoogle-glog-dev \
69+
pkg-config \
70+
software-properties-common \
71+
cmake-curses-gui \
72+
gdb
7373

7474
######## Install Eigen 3.3.9
7575
RUN mkdir -p /home/root/tmp/ \
76-
&& wget https://gitlab.com/libeigen/eigen/-/archive/3.3.9/eigen-3.3.9.tar.bz2 \
77-
&& tar -xf eigen-3.3.9.tar.bz2 && rm eigen-3.3.9.tar.bz2 \
78-
&& mv eigen-3.3.9 /home/root/tmp/eigen-3.3.9 \
79-
&& cd /home/root/tmp/eigen-3.3.9 \
80-
&& export CC=gcc-9 && export CXX=g++-9 \
81-
&& mkdir build && cd build && cmake .. && make -j && make install
76+
&& wget https://gitlab.com/libeigen/eigen/-/archive/3.3.9/eigen-3.3.9.tar.bz2 \
77+
&& tar -xf eigen-3.3.9.tar.bz2 && rm eigen-3.3.9.tar.bz2 \
78+
&& mv eigen-3.3.9 /home/root/tmp/eigen-3.3.9 \
79+
&& cd /home/root/tmp/eigen-3.3.9 \
80+
&& export CC=gcc-9 && export CXX=g++-9 \
81+
&& mkdir build && cd build && cmake .. && make -j && make install
8282

8383
######## Install sophus
8484
RUN mkdir -p /home/root/tmp/ \
85-
&& wget https://github.com/strasdat/Sophus/archive/v1.0.0.tar.gz \
86-
&& tar -xf v1.0.0.tar.gz \
87-
&& mv Sophus-1.0.0 /home/root/tmp/Sophus-1.0.0 \
88-
&& cd /home/root/tmp/Sophus-1.0.0 \
89-
&& mkdir build && cd build && cmake .. && make -j && make install
85+
&& wget https://github.com/strasdat/Sophus/archive/v1.0.0.tar.gz \
86+
&& tar -xf v1.0.0.tar.gz \
87+
&& mv Sophus-1.0.0 /home/root/tmp/Sophus-1.0.0 \
88+
&& cd /home/root/tmp/Sophus-1.0.0 \
89+
&& mkdir build && cd build && cmake .. && make -j && make install
9090

9191
########### Install gtsam
9292
#RUN cd /home/root/tmp/ \
@@ -96,33 +96,33 @@ RUN mkdir -p /home/root/tmp/ \
9696

9797
########### Install ceres
9898
RUN cd /home/root/tmp && export CC=gcc-9 && export CXX=g++-9 \
99-
&& wget https://github.com/ceres-solver/ceres-solver/archive/refs/tags/2.1.0.tar.gz \
100-
&& export CC=gcc-9 && export CXX=g++-9 \
101-
&& tar zxf 2.1.0.tar.gz && mkdir ceres-bin && cd ceres-bin && cmake ../ceres-solver-2.1.0 \
102-
&& make -j4 && make install
99+
&& wget https://github.com/ceres-solver/ceres-solver/archive/refs/tags/2.1.0.tar.gz \
100+
&& export CC=gcc-9 && export CXX=g++-9 \
101+
&& tar zxf 2.1.0.tar.gz && mkdir ceres-bin && cd ceres-bin && cmake ../ceres-solver-2.1.0 \
102+
&& make -j8 && make install
103103

104104
########### Install yaml-cpp
105105
RUN cd /home/root/tmp \
106-
&& wget https://github.com/jbeder/yaml-cpp/archive/refs/tags/yaml-cpp-0.7.0.zip \
107-
&& unzip yaml-cpp-0.7.0.zip && rm yaml-cpp-0.7.0.zip \
108-
&& mv yaml-cpp-yaml-cpp-0.7.0/ yaml-cpp-0.7.0/
106+
&& wget https://github.com/jbeder/yaml-cpp/archive/refs/tags/yaml-cpp-0.7.0.zip \
107+
&& unzip yaml-cpp-0.7.0.zip && rm yaml-cpp-0.7.0.zip \
108+
&& mv yaml-cpp-yaml-cpp-0.7.0/ yaml-cpp-0.7.0/
109109

110110
COPY CMakeLists.txt.yaml-cpp /home/root/tmp/yaml-cpp-0.7.0/CMakeLists.txt
111111

112-
RUN cd /home/root/tmp/yaml-cpp-0.7.0/ && mkdir build && cd build && cmake .. && make -j && make install
112+
RUN cd /home/root/tmp/yaml-cpp-0.7.0/ && mkdir build && cd build && cmake .. && make -j8 && make install
113113

114114
########### Install pcl-1.9.1
115115
RUN cd /home/root/tmp/ && export CC=gcc-9 && export CXX=g++-9 \
116-
&& wget https://github.com/PointCloudLibrary/pcl/archive/pcl-1.9.1.tar.gz \
117-
&& tar -xf pcl-1.9.1.tar.gz && rm pcl-1.9.1.tar.gz \
118-
&& mv pcl-pcl-1.9.1 pcl-1.9.1 \
119-
&& mkdir -p pcl-1.9.1/build
116+
&& wget https://github.com/PointCloudLibrary/pcl/archive/pcl-1.9.1.tar.gz \
117+
&& tar -xf pcl-1.9.1.tar.gz && rm pcl-1.9.1.tar.gz \
118+
&& mv pcl-pcl-1.9.1 pcl-1.9.1 \
119+
&& mkdir -p pcl-1.9.1/build
120120

121121
COPY boost.h /home/root/tmp/pcl-1.9.1/io/include/pcl/io/boost.h
122122

123123
RUN cd /home/root/tmp/pcl-1.9.1/build \
124-
&& export CC=gcc-9 && export CXX=g++-9 \
125-
&& cmake .. && make -j4 && make install
124+
&& export CC=gcc-9 && export CXX=g++-9 \
125+
&& cmake .. && make -j8 && make install
126126

127127
RUN rm -rf /home/root/tmp/*
128128

@@ -142,14 +142,27 @@ ENV NVIDIA_DRIVER_CAPABILITIES \
142142
${NVIDIA_DRIVER_CAPABILITIES:+$NVIDIA_DRIVER_CAPABILITIES,}graphics
143143

144144
# emacs tools. Feel free to comment them out of you don't use emacs and llvm tools
145-
RUN apt update && \
146-
add-apt-repository ppa:kelleyk/emacs && \
147-
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | apt-key add - && \
148-
wget --no-check-certificate -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - && \
149-
add-apt-repository 'deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-10 main' && \
150-
apt-add-repository 'deb https://apt.kitware.com/ubuntu/ bionic main' && apt update &&\
151-
apt install -y emacs27 python3-pip clang-10 clangd-10 llvm-10 lldb-10 llvm-10-dev libllvm10 llvm-10-runtime bear mlocate global cmake && \
152-
apt clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
145+
# RUN apt update && \
146+
# add-apt-repository ppa:kelleyk/emacs && \
147+
# wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | apt-key add - && \
148+
# wget --no-check-certificate -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - && \
149+
# add-apt-repository 'deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-10 main' && \
150+
# apt-add-repository 'deb https://apt.kitware.com/ubuntu/ bionic main' && apt update &&\
151+
# apt install -y emacs27 python3-pip clang-10 clangd-10 llvm-10 lldb-10 llvm-10-dev libllvm10 llvm-10-runtime bear mlocate global cmake && \
152+
# apt clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
153153

154154
RUN updatedb
155155
# USER original_user
156+
157+
# install zsh
158+
RUN git clone https://github.com/tccoin/easy-linux.git /root/easy-linux \
159+
&& cd /root/easy-linux \
160+
&& bash zsh.sh \
161+
&& touch /root/.z \
162+
&& rm -r /root/easy-linux
163+
164+
# install gitstatus
165+
# https://github.com/romkatv/gitstatus/releases/tag/v1.3.1
166+
RUN mkdir -p /root/.cache/gitstatus \
167+
&& wget https://github.com/romkatv/gitstatus/releases/download/v1.5.1/gitstatusd-linux-x86_64.tar.gz -O - \
168+
| tar -zx -C /root/.cache/gitstatus/

cvo_gpu/docker-compose.yml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
version: '3.9'
2+
3+
services:
4+
5+
cvo:
6+
image: umrobotics/cvo:latest
7+
container_name: slam
8+
environment:
9+
- "DISPLAY=${DISPLAY}"
10+
- "QT_GRAPHICSSYSTEM=native"
11+
- "NVIDIA_DRIVER_CAPABILITIES=all"
12+
- "TERM=xterm-256color"
13+
- "XAUTHORITY"
14+
working_dir: "/home/root"
15+
privileged: true
16+
devices:
17+
- /dev/nvidia0
18+
- /dev/nvidia-modeset
19+
- /dev/nvidiactl
20+
- /dev/nvidia-uvm
21+
- /dev/nvidia-uvm-tools
22+
volumes:
23+
- /tmp/.X11-unix:/tmp/.X11-unix:rw
24+
- .zshrc:/root/.zshrc:rw
25+
- .zsh_history:/root/.zsh_history:rw
26+
- /home/$USER/Projects/:/home/root/ws/
27+
- /home/$USER/Projects/curly_slam/data/:/home/root/data/
28+
ulimits:
29+
nofile:
30+
soft: 65536
31+
hard: 65536
32+
deploy:
33+
resources:
34+
reservations:
35+
devices:
36+
- driver: nvidia
37+
count: 1
38+
capabilities: [gpu]
39+
entrypoint: /bin/zsh

cvo_gpu/run_cuda_docker.bash

+14-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,18 @@ docker run -it --net=host --gpus all -e DISPLAY=${DISPLAY} \
1212
-u $(id -u):$(id -g) --workdir="/home/$USER/" \
1313
-v "/tmp/.X11-unix:/tmp/.X11-unix:rw" -v "/etc/passwd:/etc/passwd:rw" -v "/etc/group:/etc/group:ro" -v "/etc/shadow:/etc/shadow:ro" -e "TERM=xterm-256color" \
1414
--device /dev/nvidia0 --device /dev/nvidia-modeset --device /dev/nvidiactl --device /dev/nvidia-uvm --device /dev/nvidia-uvm-tools \
15-
-v "/home/$USER/code/docker_home/cvo/:/home/$USER/" \
16-
-v "/run/media/$USER/Samsung_T5/:/home/$USER/media/Samsung_T5" \
17-
-v "/run/media/$USER/Samsung_T5_2/:/home/$USER/media/Samsung_T5_2" --name=${container_name} umrobotics/cvo:latest
15+
-v "/home/link/Projects/:/home/$USER/" \
16+
-v /run/media/link/Samsung_T5/:/dataset \
17+
--name=cvo_stack umcurly/cvo:latest
1818

19+
# docker run -it --net=host --gpus all -e DISPLAY=${DISPLAY} \
20+
# -e QT_GRAPHICSSYSTEM=native \
21+
# -e NVIDIA_DRIVER_CAPABILITIES=all \
22+
# -e XAUTHORITY \
23+
# -v /etc/group:/etc/group:ro \
24+
# -u $(id -u):$(id -g) --workdir="/home/$USER/" \
25+
# -v "/tmp/.X11-unix:/tmp/.X11-unix:rw" -v "/etc/passwd:/etc/passwd:rw" -v "/etc/group:/etc/group:ro" -v "/etc/shadow:/etc/shadow:ro" -e "TERM=xterm-256color" \
26+
# --device /dev/nvidia0 --device /dev/nvidia-modeset --device /dev/nvidiactl --device /dev/nvidia-uvm --device /dev/nvidia-uvm-tools \
27+
# -v /home/$USER/unified_cvo/:/home/$USER/ \
28+
# -v /media/sdg1/rzh/:/dataset \
29+
# --name=cvo_stack umrobotics/cvo:latest

0 commit comments

Comments
 (0)