daisukekobayashi / darknet-docker

Dockerfile for Darknet Yolo v4, v3 and v2 (https://github.com/AlexeyAB/darknet)
https://cloud.docker.com/repository/docker/daisukekobayashi/darknet
MIT License
91 stars 41 forks source link
darknet-docker darknet-gpu-container darknet-images darknet-yolo

Darknet Docker Images

Docker images for Darknet Yolo v4, v3 and v2. AlexeyAB/darknet

Base Image Tags

All of Darknet's images are based on Ubuntu 20.04. gpu- images are based on 11.2.2-cudnn8-ubuntu 20.04

Tags means options in the Makefile when darknet binary was built. You can check options here.

Releases

This repository build docker images from latest darknet commit automatically. If you want to use released darknet images, please add released tag name before base image tags. For example when you want to use YOLOv4 pre-release gpu image, you can pull image as follows.

$ docker pull daisukekobayashi/darknet:darknet_yolo_v4_pre-gpu

You can check available tags here.

Running docker container

$ docker run --rm -v $PWD:/workspace -w /workspace \
        daisukekobayashi/darknet:cpu darknet ...

Start a Darknet cpu container.


$ docker run --runtime=nvidia --rm -v $PWD:/workspace -w /workspace \
        daisukekobayashi/darknet:gpu darknet ...

You need to specify nvidia runtime when you use Darknet gpu container.


$ git clone https://github.com/AlexeyAB/darknet.git
$ cd darknet/build/darknet/x64
$ curl -L -O https://pjreddie.com/media/files/yolov3.weights
$ docker run --runtime=nvidia --rm -v $PWD:/workspace -w /workspace daisukekobayashi/darknet:gpu \
        darknet detector test data/coco.data yolov3.cfg yolov3.weights -i 0 -thresh 0.25 dog.jpg -ext_output

This is example to test yolov3 using Darknet gpu container.


$ docker run --rm -it daisukekobayashi/darknet:cpu bash -c 'echo "$SOURCE_BRANCH" && echo "$SOURCE_COMMIT"'

Check darknet version.