I am running Ubuntu 20.04 and am using the Nvidia Riva Automatic Speech Recognition application to detect speech commands. I would like to direct/pipe them into another application to execute a control action. The problem I have is that the ASR application is deployed within a docker container and the control application is not.
Therefore. I would like to know how an application running outside the docker container may interface with an application running inside.
I have considered running everything inside the same container, however this is not practical because our product is mature, has lots of services interacting with each other, and also interfaces to linux kernel drivers.
Thanks in advance for any help.
There are two very obvious interfaces between a Docker Container and the host that you should probably explore further:
Published ports
One option when running a container is to map ports from the container to the host. This can be used for web interfaces etc., but also to exchange other data via TCP or UDP port mapping.
To map a port between container and host, use the
-p
option with this syntax following syntax:Example: You want to map TCP port
80
in the container to port8080
on the host (the/tcp
is optional, since its the default).Bind mounts
Another option is so use bind mounts to map files between the host filesystem and the container. These files are mapped in realtime, so any updates happening in the container should be immediately reflected in the filesystem.
To map files between container and host, use the
-v
option with this syntax following syntax:Example: You want to map the path
/data
in the container to the pathhome/user/data
on the host.Note that additional mappings can also be done for single files: