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

can you please explain the detailed stepsof how to run it? #11

Open akashAD98 opened 3 years ago

akashAD98 commented 3 years ago

These are the steps i have followed, im doing the setup on teslav100 ubantu 20.04 machine

  1. docker pull daisukekobayashi/darknet:darknet_yolo_v4_pre-gpu
  2. sudo docker run -it -d daisukekobayashi/darknet
  3. docker exec -it da4112e1cf7b4d54aec7ca5c178abbb7284b3e69105ddb65248fbbcf5774abc5 bash
  4. now im inside root directory of docker
  5. $ git clone https://github.com/AlexeyAB/darknet.git $ cd darknet/build/darknet/x64 $ curl -L -O https://pjreddie.com/media/files/yolov3.weights

6.docker run --runtime=nvidia --rm -v $PWD:/workspace -w /workspace daisukekobayashi/darknet darknet_yolo_v4_pre-gpu \ darknet detector test data/coco.data yolov3.cfg yolov3.weights -i 0 -thresh 0.25 dog.jpg -ext_output

(unable to run it) Im facing issues with this command. not able to do anything

your help is really appriciate. Thanks in advance

daisukekobayashi commented 3 years ago

I guess you are confusing you are inside container or not. There are two ways to run darknet command.

One is going into docker container through interactive bash shell and running darknet command as follows.

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

The other is running darknet command directly as follows.

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