Running an Application with Two Containers

I am trying to run an NVIDIA application that must use NVIDIA DeepStream and TensortRT (link to application: https://github.com/NVIDIA-AI-IOT/deepstream_reference_apps/tree/master/CaffeMNIST)

DeepStream 4.0 and TensortRT 5.0 are running as containers, I linked TensortRT to DS 4.0 (after DS Image is run as a container).

I also mounted a volume, where the CaffeMNIST application is stored, to the two containers.

However, I am still struggling connecting the application to the two containers at once. I need to insert the appropriate paths in this command:

`cmake -D DS_SDK_ROOT=<DS SDK Root> -D TRT_SDK_ROOT=<TRT SDK Root> -D CMAKE_BUILD_TYPE=Release ..`

I can access the application within the volume of each container, and I can only grab one path to the root of that particular container (either DS or TRT) each time. I am not able to grab the second container’s path.

The two containers are not exposed to an IP address, and I tried linking, but that didnt resolve the issue.

Any suggestions?

Thank you

What is your actual cmake command? Typically you can access data in containers using “docker cp container_name:/path/to/files” or “docker run -v /host/dir:/container/dir …”. I would assume that the cmake command is run on the docker host and might look like this: “cmake -D DS_SDK_ROOT=/host/path/DS_SDK -D TRT_SDK_ROOT=/host/path/TRT_SDK …”. This does mean that /host/path[TRT|DS] are both mounted in each container. Because you’re trying to access data in both containers from another application you can’t use “container:/path/to/files”, because that’s a docker reference. Hope this helps.