使用docker
参见(5条消息) docker nvidia_木之希的博客-CSDN博客里面有关于docker使用,经过多次实践,本文使用的nvidia镜像tag为21.12,即cuda为11.50, totch版本为1.11.0a0+b6df043,python为3.8.12
使用其它镜像可能遇到的问题:
RuntimeError: Could not infer dtype of numpy.float32
安装detectron2:
python -m pip install 'git+https://github.com/facebookresearch/detectron2.git'
# (add --user if you don't have permission)
如果运行的时候发现其它库缺失,安装即可。