Hi,
The gist:
I am looking for help in setting up a project based on jetson-inference. Just FYI, I can successfully execute the examples on jetson-inference github . The bottom line is, I need to be able to write code using any and all of the concepts that are demonstrated in jetson-inference, a little “detectnet”, a little “imagenet”, some “segnet”, etc, and I need to be able to just include the right header files in my source code and then compile and run it. I have spent many many many hours trying to figure out how to do this but just haven’t been able to connect all of the dots.
P.S. if there’s a better way than what I’m doing I am open to it
The details:
Eventually I will write my own source code, but initially I’m trying to run one of the examples from the jetson-inference repo (detectnet or imagenet as a couple of examples) in my own workflow setup (this helps me know that I have met all of the dependencies I’ll need in my code). Below is what I’m currently trying to do, including my docker file, and the structure of my project.
#DOCKERFILE
# Specify the parent image from which we build
FROM dustynv/jetson-inference:r32.7.1
RUN wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null \
&& echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ bionic main' | tee /etc/apt/sources.list.d/kitware.list >/dev/null
# setup dependancies needed inside the container (not apt-get update)
RUN set -ex; \
apt-get update;
# Set the working directory inside the container
WORKDIR /app
# Copy files from your host to the working directory in the container
COPY ./container_src container
# Build the application with cmake inside the container
RUN set -ex; \
cd /app/container/build; \
cmake ..; \
make;
# Run the application
CMD ["/app/container/build/secretSquirrel"]
Top level folder with docker file in it
container_src folder
src folder

My CMakeLists.txt file looks like this
# CMake minimum version
cmake_minimum_required(VERSION 3.22)
# Set the C++14 standard
set(CMAKE_CXX_STANDARD 14)
# Project Name
project(OperationSquirrel)
# Specify desired name of executable
set(MYEXEC secretSquirrel)
# Specify location of includes, './inc' in this case
set(MYINCLUDES inc
../../usr/include/glib-2.0/
../../usr/include/gstreamer-1.0/
../../usr/include/python3.6m/
../../usr/lib/aarch64-linux-gnu/glib-2.0/include/
../../usr/local/cuda-10.2/targets/aarch64-linux/include/
../../usr/local/include/jetson-inference/
../../usr/local/include/jetson-inference/docs/html/
../../usr/local/include/jetson-utils/)
# Specify location of src files, './src' in this case
set(MYSRC src)
# I../includes
include_directories(${MYSRC} ${MYINCLUDES})
# Put all .cpp files inside src into SOURCES variable
file(GLOB SOURCES
${MYSRC}/*.cpp
)
# Compile the files defined by SOURCES to generate exec defined by EXEC
add_executable(${MYEXEC} ${SOURCES})
When trying to build the container using the above docker file I received a bunch of "can't find <headerfile>.h"
so I scoured the contents of the container to find all of the dependencies I needed and included them in my CMakeLists.txt file as you can see. I still get errors with functions not being defined or declared (can’t remember off of the top of my head". I even tried copying all of the dang header files into my “inc” folder, and am still running into errors.