# To fix GPG key error when running apt-get update RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/7fa2af80.pub
RUN pip install mmcv-full==1.4.0 -f https://download.openmmlab.com/mmcv/dist/cu111/torch1.9.0/index.html RUN pip install mmdet==2.14.0 RUN pip install mmsegmentation==0.14.1
# Install mmdetection3d RUN git clone --branch v0.17.1 --single-branch https://github.com/open-mmlab/mmdetection3d.git WORKDIR /mmdetection3d RUN pip install scipy==1.7.3 scikit-image==0.20.0 RUN pip install --no-cache-dir -v -e .
# Copy to python dist-package foldder RUNcp -r /mmdetection3d/mmdet3d /usr/local/lib/python3.8/dist-packages
# Install UniAD from source WORKDIR / RUN git clone https://github.com/OpenDriveLab/UniAD.git WORKDIR /UniAD RUN pip install -r requirements.txt # We need this old version of torchmetrics to run UniAD... RUN pip install torchmetrics==0.8.2
# Link python to python3 RUNln /usr/bin/python3 /usr/bin/python
cd /UniAD mkdir ckpts && cd ckpts # Pretrained weights of bevformer # Also the initial state of training stage1 model wget https://github.com/zhiqi-li/storage/releases/download/v1.0/bevformer_r101_dcn_24ep.pth # Pretrained weights of stage1 model (perception part of UniAD) wget https://github.com/OpenDriveLab/UniAD/releases/download/v1.0/uniad_base_track_map.pth # Pretrained weights of stage2 model (fully functional UniAD) wget https://github.com/OpenDriveLab/UniAD/releases/download/v1.0.1/uniad_base_e2e.pth
cd /UniAD/data mkdir infos && cd infos wget https://github.com/OpenDriveLab/UniAD/releases/download/v1.0/nuscenes_infos_temporal_train.pkl # train_infos wget https://github.com/OpenDriveLab/UniAD/releases/download/v1.0/nuscenes_infos_temporal_val.pkl # val_infos
自己生成数据信息
1 2 3 4 5
cd /UniAD/data mkdir infos cd /UniAD ./tools/uniad_create_data.sh # This will generate nuscenes_infos_temporal_{train,val}.pkl
这里更推荐使用第二种方式,使用第二种方式可以检查以下程序能不能正常运行。
4.3.1 调整包的版本
这里果然会因为包的版本问题产生冲突,首先报错
1 2 3
File "/usr/local/lib/python3.8/dist-packages/PIL/_typing.py", line 10, in <module> NumpyArray = npt.NDArray[Any] AttributeError: module 'numpy.typing' has no attribute 'NDArray'
查询得知,这是因为numpy的版本过低,不支持NDArry,建议安装1.20.0版本以上,使用指令pip list | grep numpy查看numpy的版本发现当前numpy版本为1.20.0,因此使用以下指令更新numpy
Technology enthusiast, want to learn anything fun; open source enthusiast, firmly believe that open source needs documentation adaptation, and an open source project without good documentation is not a good open source project; current main business \:end-to-end autonomous driving