Docker下运行ORB-Slam2
作者:互联网
1 硬件介绍
主机:
–系统:ubuntu 18.04
–显卡:NVIDIA GeForce GT 1030 驱动版本:460.80
2 软件安装:
2.1 docker
参考:https://docs.docker.com/engine/install/ubuntu/
sudo apt-get remove docker docker-engine docker.io containerd runc
sudo apt-get update
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg \
lsb-release
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo \
"deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io
sudo docker run hello-world # check docker installed success
sudo groupadd docker
sudo usermod -aG docker $USER
newgrp docker
docker run hello-world # Verify that you can run docker commands without sudo
2.2 libnvidia-container
参考:
https://nvidia.github.io/libnvidia-container/
https://www.cnblogs.com/journeyonmyway/p/11234572.html
DIST=$(. /etc/os-release; echo $ID$VERSION_ID)
curl -s -L https://nvidia.github.io/libnvidia-container/gpgkey | \
sudo apt-key add -
curl -s -L https://nvidia.github.io/libnvidia-container/$DIST/libnvidia-container.list | \
sudo tee /etc/apt/sources.list.d/libnvidia-container.list
sudo apt-get update
sudo apt-get install nvidia-container-toolkit
sudo apt-get install libnvidia-container-tools
sudo systemctl restart docker
docker run --gpus all nvidia/cuda:9.0-base nvidia-smi # check nvidia container installed success
2.3 orbslam2的导入
- 宿主机软件安装:
sudo apt install libglew-dev
sudo apt install libglu1-mesa-dev
- orbslam2 docker项目
继承:
https://gitee.com/wycan/orbslam2_runin_docker
修改:
https://gitee.com/feisonzl/orbslam2_runin_docker/commit/93a6d266c4ddc2c067a3a6cd786f13e88cb10470
3.小结
本次在docker中成功运行ORB-SLAM2,历经坎坷,自己本身在工作,林林总总花了两个周末才最终run起来,感谢各路大神提供的文章,也希望给需要的小伙伴一些参考
标签:container,get,sudo,apt,Slam2,https,docker,ORB,Docker 来源: https://blog.csdn.net/WEINILUO/article/details/118659410