• Jetson Nano
**• Deepstream 6.0 **
• JetPack Version 4.6
• Missing Header
• Write a Dockerfile based on deepstream-l4t:6.0 and make the lib nvdsinfer_custom_impl_Yolo
**• nvdsinfer_custom_impl_Yolo and docker image deepstream 6.0 **
Hello,
I found an issue when I build a docker image with the version 6.0.- ( I don’t have the issue with docker image deepstream 7.0 and deepstream 6.0 in local on my jetson nano)
during the build I have a error of a missing header during the build of nvdsinfer_custom_impl_Yolo ( GitHub - marcoslucianops/DeepStream-Yolo: NVIDIA DeepStream SDK 7.0 / 6.4 / 6.3 / 6.2 / 6.1.1 / 6.1 / 6.0.1 / 6.0 / 5.1 implementation for YOLO models )
here the output :
ARG DEEPSTREAM_TAG=6.0-samples
FROM --platform=linux/arm64/v8 nvcr.io/nvidia/deepstream-l4t:${DEEPSTREAM_TAG}
# Install dependencies and clean up in a single RUN command to reduce image layers
RUN apt-get update && apt-get install -y --no-install-recommends \
software-properties-common \
&& add-apt-repository ppa:ubuntu-toolchain-r/test \
&& apt-get install -y --no-install-recommends \
cmake \
build-essential \
g++-11 \
libssl-dev \
gstreamer1.0-tools \
gstreamer1.0-plugins-base \
gstreamer1.0-plugins-good \
gstreamer1.0-plugins-bad \
gstreamer1.0-plugins-ugly \
libgstreamer1.0-dev \
libgstreamer-plugins-base1.0-dev \
&& rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /app
COPY ./vision/ .
ARG CUDA_VER=10.2
ENV CUDA_VER=${CUDA_VER}
# Build custom libs
RUN make -C ./models/custom_lib/nvdsinfer_custom_impl_Yolo clean
RUN make -C ./models/custom_lib/nvdsinfer_custom_impl_Yolo
Here the error output :
> [vision 12/14] RUN make -C ./models/custom_lib/nvdsinfer_custom_impl_Yolo:
0.294 make: Entering directory '/app/models/custom_lib/nvdsinfer_custom_impl_Yolo'
0.294 g++ -c -o utils.o -Wall -std=c++11 -shared -fPIC -Wno-error=deprecated-declarations -I/opt/nvidia/deepstream/deepstream/sources/includes -I/usr/local/cuda-10.2/include utils.cpp
0.552 In file included from utils.cpp:26:0:
0.552 utils.h:36:10: fatal error: NvInfer.h: No such file or directory
0.552 #include "NvInfer.h"
0.552 ^~~~~~~~~~~
0.552 compilation terminated.
0.559 Makefile:81: recipe for target 'utils.o' failed
0.560 make: *** [utils.o] Error 1
0.560 make: Leaving directory '/app/models/custom_lib/nvdsinfer_custom_impl_Yolo'
------
failed to solve: process "/bin/sh -c make -C ./models/custom_lib/nvdsinfer_custom_impl_Yolo" did not complete successfully: exit code: 2
for additionnal information, here the makefile of nvdsinfer_custom_impl_Yolo :
CUDA_VER?=
ifeq ($(CUDA_VER),)
$(error "CUDA_VER is not set")
endif
OPENCV?=
ifeq ($(OPENCV),)
OPENCV=0
endif
GRAPH?=
ifeq ($(GRAPH),)
GRAPH=0
endif
CC:= g++
NVCC:=/usr/local/cuda-$(CUDA_VER)/bin/nvcc
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
ifeq ($(OPENCV), 1)
COMMON+= -DOPENCV
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)
endif
ifeq ($(GRAPH), 1)
COMMON+= -DGRAPH
endif
CUFLAGS:= -I/opt/nvidia/deepstream/deepstream/sources/includes -I/usr/local/cuda-$(CUDA_VER)/include
LIBS+= -lnvinfer_plugin -lnvinfer -lnvparsers -lnvonnxparser -L/usr/local/cuda-$(CUDA_VER)/lib64 -lcudart -lcublas -lstdc++fs
LFLAGS:= -shared -Wl,--start-group $(LIBS) -Wl,--end-group
INCS:= $(wildcard *.h)
SRCFILES:= $(filter-out calibrator.cpp, $(wildcard *.cpp))
ifeq ($(OPENCV), 1)
SRCFILES+= calibrator.cpp
endif
SRCFILES+= $(wildcard layers/*.cpp)
SRCFILES+= $(wildcard *.cu)
TARGET_LIB:= libnvdsinfer_custom_impl_Yolo.so
TARGET_OBJS:= $(SRCFILES:.cpp=.o)
TARGET_OBJS:= $(TARGET_OBJS:.cu=.o)
all: $(TARGET_LIB)
%.o: %.cpp $(INCS) Makefile
$(CC) -c $(COMMON) -o $@ $(CFLAGS) $<
%.o: %.cu $(INCS) Makefile
$(NVCC) -c -o $@ --compiler-options '-fPIC' $(CUFLAGS) $<
$(TARGET_LIB) : $(TARGET_OBJS)
$(CC) -o $@ $(TARGET_OBJS) $(LFLAGS)
clean:
rm -rf $(TARGET_LIB)
rm -rf $(TARGET_OBJS)
Thanks for any help !