cogwerx-nvidia-amd64
Darknet
Setup on Ubuntu 16/18, AMD 64, with NVIDIA GPU
- (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"
}
Run (with USB webcam, or without)
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
Reference
- PJ Reddie's Darknet: https://pjreddie.com/darknet/yolo/