From 71d09aead72b7ee821f02842c8906d126dbfbe88 Mon Sep 17 00:00:00 2001 From: Dmitri Smirnov Date: Fri, 31 May 2024 18:45:45 -0400 Subject: [PATCH] fix(esi-shell): run commands without TTY --- esi-shell | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/esi-shell b/esi-shell index 71cc2a8..5ac4fd9 100755 --- a/esi-shell +++ b/esi-shell @@ -270,6 +270,11 @@ done # DOCKER_PLATFORM="--platform linux/amd64" #fi +if [[ -z ${CONTAINER_COMMAND-} ]] +then + CONTAINER_OPTIONS+=" -i -t" +fi + USABLE_SINGULARITY="$(find_tool singularity)" USABLE_DOCKER="$(find_tool docker)" @@ -278,7 +283,7 @@ ohai "Using esi-shell image: ${IMG}" if [[ -n "${USABLE_DOCKER-}" ]] then - cmd="docker run --rm -it ${DOCKER_GPU-} ${DOCKER_PLATFORM-} ${DOCKER_BIND_VOLUME-} -e OPTICKS_OPTIX_PREFIX=${OPTIX_DIR} ${CONTAINER_OPTIONS} ${IMG} ${CONTAINER_COMMAND}" + cmd="docker run --rm ${DOCKER_GPU-} ${DOCKER_PLATFORM-} ${DOCKER_BIND_VOLUME-} -e OPTICKS_OPTIX_PREFIX=${OPTIX_DIR} ${CONTAINER_OPTIONS} ${IMG} ${CONTAINER_COMMAND}" exec $cmd else abort "Docker client (>= $REQUIRED_DOCKER_VERSION) must be installed to proceed."