一、实验环境
采用的是ubuntu18.04的xavier和ubuntu20.04的orin
二、安装docker
更新apt包索引
sudo apt update
sudo apt-get upgrade
安装依赖包
sudo apt install apt-transport-https ca-certificates curl gnupg2 software-properties-common
sudo apt-get install ca-certificates curl gnupg lsb-release
添加 Docker 的官方 GPG 密钥:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
添加阿里云docker资源(docker资源近期更换频繁,建议检查并更新该镜像源)
sudo add-apt-repository "deb [arch=amd64] http://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable"
systemctl start docker
sudo apt-get -y install apt-transport-https ca-certificates curl software-properties-common
service docker restart
sudo docker run hello-world
若执行玩最后一个命令没有问题,则安装完成
三、执行opendronemap
sudo docker pull opendronemap/odm
该过程可能会出现网络问题,我在18.04上没有遇到,但是在20.04上遇到以下问题
Error response from daemon: Get “https://registry-1.docker.io/v2/”: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
此处给出几个解决方法:
解决docker拉取镜像报错:Error response from daemon: Get “https://registry-1.docker.io/v2/“: dial tcp-CSDN博客Error response from daemon: Get “https://registry-1.docker.io/v2/“: net/http: request canceled-CSDN博客若以上方法不可行,可以通过如下方法,从可以完成pull的设备上拷贝镜像文件到当前设备(注意要保证采用的架构一致)
docker打包本地镜像,拷贝到其它宿主机上运行_将打包镜像放到宿主机-CSDN博客
成功加载镜像后可以使用如下命令来执行odm的镜像
sudo docker run -it --rm \
-v $(pwd)/images:/code/images \
-v $(pwd)/odm_orthophoto:/code/odm_orthophoto \
-v $(pwd)/odm_texturing:/code/odm_texturing \
opendronemap/opendronemap
其中-v后面的内容是将本地的地址挂载到docker镜像上的索引,":"前面是本地的地址,后面不需要改变,是docker镜像中的地址。
可以通过如下方式来获取自己想要的内容
odm_meshing # 3D 网面建模
odm_texturing # 纹理网面建模
odm_georeferencing # 地理配准后的点云图
odm_orthophoto # 正射影像图
odm_report # 程序运行报告