NRPCore offers two possible ways of launching NRPCore related processes in docker containers:
Both use cases require docker daemon to be properly configured in the host where the containerized NRPCore process will be launched. In this guide we review the different possibilities available and give references to more complete guides.
As specified in this guide, by default docker runs through a non-networked UNIX socket. When connecting to the docker daemon from a remote host two options are available:
The first option requires setting up the remote host (where docker daemon is running) to accept SSH connections from the local host (where docker daemon is connected from). Be aware that docker only support public key authentication, password authentication is not supported.
In order to test the setup before launching any experiment try:
When using NRPCore with docker through SSH there is an additional Python module, paramiko
, which should be installed if it is not already:
The second option, configuring docker daemon to listen to a TCP port, should be consider carefully, since it involves potential security risks. In the next pages there is more information on how to configure and secure docker daemon to listen to TCP ports:
Both when launching Engines with DockerLauncher or NRPCore experiments from the NrpCore Python client, it is required to specify the IP address that will be used to connect to docker daemon. Below is listed the expected format in each of the 3 possible cases:
unix:///var/run/docker.sock
ssh://<user>@<remote host ip>
tcp://<remote host ip>:<port>
The remote host requires two things in order to be able to run an engine:
To install an SSH server (remote machine):
To copy your public key to the remote machine (from local machine):
To add docker to the privileged group (remote machine), please refer to these instructions