diff --git a/lib/docker_cli_wrapper.py b/lib/docker_cli_wrapper.py index 0d905cc..d590427 100644 --- a/lib/docker_cli_wrapper.py +++ b/lib/docker_cli_wrapper.py @@ -13,7 +13,11 @@ def create_container(container_options, ip=None, docker_gpus=False, shm_size=64, # Sanitize and validate input container_options = sanitize_input(container_options) - command = ["docker", ("create" if paused else "run"), "--detach", "--tty"] + command = ["docker", ("create" if paused else "run")] + + if not paused: + command.append("--detach") + command.append("--tty") if "name" in container_options: command.extend(["--name", container_options["name"]])