其他分享
首页 > 其他分享> > Docker下运行ORB-Slam2

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

3.小结

本次在docker中成功运行ORB-SLAM2,历经坎坷,自己本身在工作,林林总总花了两个周末才最终run起来,感谢各路大神提供的文章,也希望给需要的小伙伴一些参考

标签:container,get,sudo,apt,Slam2,https,docker,ORB,Docker
来源: https://blog.csdn.net/WEINILUO/article/details/118659410