- (If you wish to build the container yourself) Clone this repo
- Install docker-ce or docker-ee
- Install NVIDIA Drivers and CUDA libraries (at least CUDA version 9.0)
- Install nvidia-docker and install/enable nvidia container runtime. You can optionally set nvidia as the default runtime as shown in this example
/etc/docker/daemon.json
:
{
"runtimes": {
"nvidia": {
"path": "nvidia-container-runtime",
"runtimeArgs": []
}
},
"default-runtime": "nvidia"
}
Assuming you have an attached webcam, say via USB (not an itegrated one, which is typically cam 0 (/dev/video0))
xhost + && docker run --privileged -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix --rm openhorizon/amd64-nvidia-darknet:cuda10.0-cudnn7-16.04 ./darknet detector demo cfg/coco.data cfg/yolov3.cfg yolov3.weights
To test on one picture, shows the picture in Xwindows (works even if you don't have X)
xhost + && docker run --privileged -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix --rm openhorizon/amd64-nvidia-darknet:cuda10.0-cudnn7-16.04 ./darknet yolo test cfg/yolov3-tiny.cfg yolov3-tiny.weights data/person.jpg
- PJ Reddie's Darknet: https://pjreddie.com/darknet/yolo/