Docker image for OpenCV + Python


I would like to create an Ubuntu Docker container that uses the following packages:

  • Python 3.6 or above
  • OpenCV
  • Python PIL module
  • Keras for inference
  • PyQt5
  • YOLO V3 for inference (Darknet used through OpenCV)

I would like the NVIDIA GPU to be used by these packages. So, I guess OpenCV must be compiled with the appropriate compile flags turned on.

I would appreciate suggestions - i.e. which NGC containers might be good starting points, if any? Or would I need to create the container from scratch?


I forgot to mention - I plan to run the container on a GCP cloud instance.


Also, do I need to explicitly install CUDA in this container, for the GPU to be used? Or would the OpenCV automatically handle it, when compiled with GPU support?