PatBall1 / detectree2

Python package for automatic tree crown delineation based on the Detectron2 implementation of Mask R-CNN
https://patball1.github.io/detectree2/
MIT License
148 stars 35 forks source link

Docker #62

Closed ptresson closed 1 year ago

ptresson commented 1 year ago

Hi, a docker can be helpful to run detectree2. I have written a Dockerfile based on the detectron2 Dockerfile with a few tweaks. All unit-tests pass inside the container build with this Dockerfile. I had no issues running code inside the container on a Ubuntu 20.04 host machine so far. I am not sure if docker/Dockerfile is the best place to put it. Once again, I have followed the detectron2 repo.

Cheers,

Paul

ma595 commented 1 year ago

Thanks for this, @ptresson. I've created a CPU version for the github workflow which will be merged shortly - it'll be docker/Dockerfile-cpu or something similar. I'm wondering if the docker file you provided will run CPU only tests as well, as there might be a way to combine the two or just go with yours (I will check). Mine is here: https://github.com/ma595/detectree2-docker/blob/main/files/Dockerfile-20.04 (which I'll neaten and bring into the repo).

ptresson commented 1 year ago

I do think that my version can run CPU test as well. It's worth mentioning that the GPU part is very dependent on the hardware (i.e. CUDA and CUDNN version). I've let the FROM nvidia/cuda:11.1.1-cudnn8-devel-ubuntu20.04 that is most similar to the original detectron2 file but on other machines with an other GPU generation, one may have to switch to FROM nvidia/cuda:11.7.0-cudnn8-devel-ubuntu20.04 or some other base image proposed by nvidia on dockerhub