Opendronemap的docker使用

一、实验环境

采用的是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在pull的时候报错Get https://registry-1.docker.io/v2/: net/http: request canceled (Client.Timeout e_exception caught: timeout: get docker-CSDN博客

解决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 # 程序运行报告
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值