Add docker usage
This commit is contained in:
39
README.md
39
README.md
@@ -37,6 +37,7 @@ NVIDIA DeepStream SDK 6.1 / 6.0.1 / 6.0 configuration for YOLO models
|
|||||||
* [Benchmarks](#benchmarks)
|
* [Benchmarks](#benchmarks)
|
||||||
* [dGPU installation](#dgpu-installation)
|
* [dGPU installation](#dgpu-installation)
|
||||||
* [Basic usage](#basic-usage)
|
* [Basic usage](#basic-usage)
|
||||||
|
* [Docker usage](#docker-usage)
|
||||||
* [NMS configuration](#nms-configuration)
|
* [NMS configuration](#nms-configuration)
|
||||||
* [INT8 calibration](#int8-calibration)
|
* [INT8 calibration](#int8-calibration)
|
||||||
* [YOLOv5 usage](docs/YOLOv5.md)
|
* [YOLOv5 usage](docs/YOLOv5.md)
|
||||||
@@ -504,6 +505,44 @@ config-file=config_infer_primary_yoloV2.txt
|
|||||||
|
|
||||||
##
|
##
|
||||||
|
|
||||||
|
### Docker usage
|
||||||
|
|
||||||
|
* x86 platform
|
||||||
|
|
||||||
|
```
|
||||||
|
nvcr.io/nvidia/deepstream:6.1-devel
|
||||||
|
nvcr.io/nvidia/deepstream:6.1-triton
|
||||||
|
```
|
||||||
|
|
||||||
|
* Jetson platform
|
||||||
|
|
||||||
|
```
|
||||||
|
nvcr.io/nvidia/deepstream-l4t:6.1-samples
|
||||||
|
nvcr.io/nvidia/deepstream-l4t:6.1-triton
|
||||||
|
```
|
||||||
|
|
||||||
|
**NOTE**: To compile the `nvdsinfer_custom_impl_Yolo`, you need to install the g++ inside the container
|
||||||
|
|
||||||
|
```
|
||||||
|
apt-get install build-essential
|
||||||
|
```
|
||||||
|
|
||||||
|
**NOTE**: With DeepStream 6.1, the container image missed to include certain header files that will be available on host machine with Compute libraries installed from Jetpack. To mount the headers, use:
|
||||||
|
|
||||||
|
```
|
||||||
|
-v /usr/include/aarch64-linux-gnu/NvInfer.h:/usr/include/aarch64-linux-gnu/NvInfer.h -v /usr/include/aarch64-linux-gnu/NvInferLegacyDims.h:/usr/include/aarch64-linux-gnu/NvInferLegacyDims.h -v /usr/include/aarch64-linux-gnu/NvInferRuntimeCommon.h:/usr/include/aarch64-linux-gnu/NvInferRuntimeCommon.h -v /usr/include/aarch64-linux-gnu/NvInferVersion.h:/usr/include/aarch64-linux-gnu/NvInferVersion.h -v /usr/include/aarch64-linux-gnu/NvInferRuntime.h:/usr/include/aarch64-linux-gnu/NvInferRuntime.h -v /usr/include/aarch64-linux-gnu/NvInferImpl.h:/usr/include/aarch64-linux-gnu/NvInferImpl.h -v /usr/include/aarch64-linux-gnu/NvCaffeParser.h:/usr/include/aarch64-linux-gnu/NvCaffeParser.h -v /usr/include/aarch64-linux-gnu/NvUffParser.h:/usr/include/aarch64-linux-gnu/NvUffParser.h -v /usr/include/aarch64-linux-gnu/NvInferPlugin.h:/usr/include/aarch64-linux-gnu/NvInferPlugin.h -v /usr/include/aarch64-linux-gnu/NvInferPluginUtils.h:/usr/include/aarch64-linux-gnu/NvInferPluginUtils.h -v /usr/local/cuda/:/usr/local/cuda/
|
||||||
|
```
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Example</summary>
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo docker run -it --rm --net=host --runtime nvidia -e DISPLAY=$DISPLAY -w /opt/nvidia/deepstream/deepstream-6.1 -v /tmp/.X11-unix/:/tmp/.X11-unix -v /usr/include/aarch64-linux-gnu/NvInfer.h:/usr/include/aarch64-linux-gnu/NvInfer.h -v /usr/include/aarch64-linux-gnu/NvInferLegacyDims.h:/usr/include/aarch64-linux-gnu/NvInferLegacyDims.h -v /usr/include/aarch64-linux-gnu/NvInferRuntimeCommon.h:/usr/include/aarch64-linux-gnu/NvInferRuntimeCommon.h -v /usr/include/aarch64-linux-gnu/NvInferVersion.h:/usr/include/aarch64-linux-gnu/NvInferVersion.h -v /usr/include/aarch64-linux-gnu/NvInferRuntime.h:/usr/include/aarch64-linux-gnu/NvInferRuntime.h -v /usr/include/aarch64-linux-gnu/NvInferImpl.h:/usr/include/aarch64-linux-gnu/NvInferImpl.h -v /usr/include/aarch64-linux-gnu/NvCaffeParser.h:/usr/include/aarch64-linux-gnu/NvCaffeParser.h -v /usr/include/aarch64-linux-gnu/NvUffParser.h:/usr/include/aarch64-linux-gnu/NvUffParser.h -v /usr/include/aarch64-linux-gnu/NvInferPlugin.h:/usr/include/aarch64-linux-gnu/NvInferPlugin.h -v /usr/include/aarch64-linux-gnu/NvInferPluginUtils.h:/usr/include/aarch64-linux-gnu/NvInferPluginUtils.h -v /usr/local/cuda/:/usr/local/cuda/ nvcr.io/nvidia/deepstream-l4t:6.1-samples
|
||||||
|
```
|
||||||
|
</details>
|
||||||
|
|
||||||
|
##
|
||||||
|
|
||||||
### NMS Configuration
|
### NMS Configuration
|
||||||
|
|
||||||
To change the `nms-iou-threshold`, `pre-cluster-threshold` and `topk` values, modify the config_infer file and regenerate the model engine file
|
To change the `nms-iou-threshold`, `pre-cluster-threshold` and `topk` values, modify the config_infer file and regenerate the model engine file
|
||||||
|
|||||||
@@ -25,12 +25,12 @@
|
|||||||
|
|
||||||
CUDA_VER?=
|
CUDA_VER?=
|
||||||
ifeq ($(CUDA_VER),)
|
ifeq ($(CUDA_VER),)
|
||||||
$(error "CUDA_VER is not set")
|
$(error "CUDA_VER is not set")
|
||||||
endif
|
endif
|
||||||
|
|
||||||
OPENCV?=
|
OPENCV?=
|
||||||
ifeq ($(OPENCV),)
|
ifeq ($(OPENCV),)
|
||||||
OPENCV=0
|
OPENCV=0
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CC:= g++
|
CC:= g++
|
||||||
@@ -40,9 +40,9 @@ CFLAGS:= -Wall -std=c++11 -shared -fPIC -Wno-error=deprecated-declarations
|
|||||||
CFLAGS+= -I/opt/nvidia/deepstream/deepstream/sources/includes -I/usr/local/cuda-$(CUDA_VER)/include
|
CFLAGS+= -I/opt/nvidia/deepstream/deepstream/sources/includes -I/usr/local/cuda-$(CUDA_VER)/include
|
||||||
|
|
||||||
ifeq ($(OPENCV), 1)
|
ifeq ($(OPENCV), 1)
|
||||||
COMMON= -DOPENCV
|
COMMON= -DOPENCV
|
||||||
CFLAGS+= $(shell pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv)
|
CFLAGS+= $(shell pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv)
|
||||||
LIBS+= $(shell pkg-config --libs opencv4 2> /dev/null || pkg-config --libs opencv)
|
LIBS+= $(shell pkg-config --libs opencv4 2> /dev/null || pkg-config --libs opencv)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
LIBS+= -lnvinfer_plugin -lnvinfer -lnvparsers -L/usr/local/cuda-$(CUDA_VER)/lib64 -lcudart -lcublas -lstdc++fs
|
LIBS+= -lnvinfer_plugin -lnvinfer -lnvparsers -L/usr/local/cuda-$(CUDA_VER)/lib64 -lcudart -lcublas -lstdc++fs
|
||||||
@@ -53,7 +53,7 @@ INCS:= $(wildcard *.h)
|
|||||||
SRCFILES:= $(filter-out calibrator.cpp, $(wildcard *.cpp))
|
SRCFILES:= $(filter-out calibrator.cpp, $(wildcard *.cpp))
|
||||||
|
|
||||||
ifeq ($(OPENCV), 1)
|
ifeq ($(OPENCV), 1)
|
||||||
SRCFILES+= calibrator.cpp
|
SRCFILES+= calibrator.cpp
|
||||||
endif
|
endif
|
||||||
|
|
||||||
SRCFILES+= $(wildcard layers/*.cpp)
|
SRCFILES+= $(wildcard layers/*.cpp)
|
||||||
|
|||||||
Reference in New Issue
Block a user