core
remote python execution for SolveIt
Client
Client (user:str, host:str, port:int, kernel:jupyter_client.blocking.client.BlockingKernelClient, py:str)
Represents a connection to a remote machine.
connect
connect (ssh_cmd:str, py:str='python3')
*Starts an IPython kernel on a remote machine using ssh and connect to it, to send commands. Also registers a cell magic %%remote. Use the python interpreter path to use virtual environment on the remote machine.
ssh_cmd: ssh command to connect to the remote machine. py: path to the python interpreter.*
is_connected
is_connected (client)
Check if the client is currently connected. A client is considered connected if both of the following are true: 1. The port forwarding ssh control socket is alive. 2. I/O channels to the IPython kernel are alive.
run_remote_blocking
run_remote_blocking (client:__main__.Client, code:str)
Run code on the remote machine associated with this client. Use the cell magic instead of directly calling this function.
disconnect
disconnect (client:__main__.Client)
Disconnect the client.