From 73cb1ca67e0336188feeac34428a745a2cf293b9 Mon Sep 17 00:00:00 2001 From: clore Date: Sun, 29 Dec 2024 23:22:40 +0000 Subject: [PATCH] use --detach only on docker run --- lib/docker_cli_wrapper.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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"]])