Add backend.ai exec
command to execute a shell command in a running session
#283
Labels
comp:agent
Related to Agent component
comp:cli
Related to CLI component
type:feature
Add new features
Milestone
Currently
backend.ai run
command requires to specify a file to execute a shell command, due to a prior parsing limitation of Click with mixing required positional arguments and a zero-or-more positional argument.This makes unnecessary confusion for new users and we feel also difficult to explain to them.
Let's make a new command, just like
docker exec
:backend.ai [root-options] exec {session-id-or-name} {cmdargs...}
backend.ai exec
should be an alias ofbackend.ai session exec
.backend.ai rm
.Considerations for implementing this feature in various client environments:
backend.ai run --exec "<cmdargs>" <image> <files>
backend.ai app <session> <appname>
backend.ai ssh <session> <cmdargs>
app
command + wrapper of OpenSSH clientbackend.ai exec <session> <cmdargs>
ssh
commandThe advantage of making
exec
to be an alias ofssh
is that it supports the full terminal and interactive stdin support through the SSH session. But in the web browsers we don't have the SSH client available for Javascript codes, so we need to fallback to use the batch-mode execution API.The text was updated successfully, but these errors were encountered: