From 7e211b2e5566fdab2784ab0c67b23dcfca633b74 Mon Sep 17 00:00:00 2001 From: M1chaelM Date: Thu, 22 Jun 2023 18:51:28 -0400 Subject: [PATCH] removing obsolete nvidia arguments / variables --- replay_trial.bash | 14 +++----------- run_trial.bash | 34 +++------------------------------- vrx_server/run_container.bash | 24 +----------------------- 3 files changed, 7 insertions(+), 65 deletions(-) diff --git a/replay_trial.bash b/replay_trial.bash index a3b9442..4ca3586 100755 --- a/replay_trial.bash +++ b/replay_trial.bash @@ -20,7 +20,7 @@ NOCOLOR='\033[0m' # Define usage function. usage() { - echo "Usage: $0 [-n --nvidia] [--keep-docker] [--manual-play] [--keep-gz] " + echo "Usage: $0 [--keep-docker] [--manual-play] [--keep-gz] " echo "--keep-docker: Keep Gazebo window open and Docker container running after playback ends." echo " By default, everything is terminated automatically." echo "--manual-play: Do not automatically start playback. Wait for user to click in GUI." @@ -31,8 +31,6 @@ usage() } # Parse arguments -nvidia_arg="" -image_nvidia="" keep_docker=1 # Args to pass to script internal to Docker container @@ -45,12 +43,6 @@ do key="$1" case $key in - -n|--nvidia) - nvidia_arg="-n" - image_nvidia="-nvidia" - shift - ;; - --keep-docker) keep_docker=1 shift @@ -166,8 +158,8 @@ y=$y" > ${HOST_GZ_GUI_CONFIG_DIR}/gui.ini # Run Gazebo simulation server container SERVER_CMD="/play_vrx_log.sh ${LOG_FILE} ${OUTPUT} ${manual_play} ${keep_gz}" -SERVER_IMG="vrx-server-${ROS_DISTRO}${image_nvidia}:latest" -${DIR}/vrx_server/run_container.bash $nvidia_arg ${SERVER_CONTAINER_NAME} $SERVER_IMG \ +SERVER_IMG="vrx-server-${ROS_DISTRO}:latest" +${DIR}/vrx_server/run_container.bash ${SERVER_CONTAINER_NAME} $SERVER_IMG \ "--net ${NETWORK} \ --ip ${SERVER_ROS_IP} \ -v ${HOST_LOG_DIR}:${LOG_DIR} \ diff --git a/run_trial.bash b/run_trial.bash index e406218..bb1cd9d 100755 --- a/run_trial.bash +++ b/run_trial.bash @@ -19,37 +19,10 @@ NOCOLOR='\033[0m' # Define usage function. usage() { - echo "Usage: $0 [-n --nvidia] " + echo "Usage: $0 " exit 1 } -# Parse arguments -# TODO: nvidia runtime by default; runtime may be obsolete -RUNTIME="nvidia" -nvidia_arg="" -image_nvidia="" - -POSITIONAL=() -while [[ $# -gt 0 ]] -do - key="$1" - - case $key in - -n|--nvidia) - RUNTIME="nvidia" - nvidia_arg="-n" - image_nvidia="-nvidia" - shift - ;; - *) # unknown option - POSITIONAL+=("$1") - shift - ;; - esac -done - -set -- "${POSITIONAL[@]}" - # Call usage() function if arguments not supplied. [[ $# -ne 3 ]] && usage @@ -68,7 +41,7 @@ fi SERVER_CONTAINER_NAME=vrx-server-system SERVER_USER=developer ROS_DISTRO=humble -SERVER_IMG="vrx-server-${ROS_DISTRO}${image_nvidia}:latest" +SERVER_IMG="vrx-server-${ROS_DISTRO}:latest" LOG_DIR=/vrx/logs NETWORK=vrx-network NETWORK_SUBNET="172.16.0.10/16" # subnet mask allows communication between IP addresses with 172.16.xx.xx (xx = any) @@ -148,7 +121,7 @@ echo "---------------------------------" # container waiting for ROS master and has error before server is created. # Run Gazebo simulation server container SERVER_CMD="/run_vrx_trial.sh /team_generated/${TEAM_NAME}.urdf /task_generated/worlds/${TASK_NAME}${TRIAL_NUM} ${LOG_DIR}" -${DIR}/vrx_server/run_container.bash $nvidia_arg ${SERVER_CONTAINER_NAME} $SERVER_IMG \ +${DIR}/vrx_server/run_container.bash ${SERVER_CONTAINER_NAME} $SERVER_IMG \ "--net ${NETWORK} \ --ip ${SERVER_ROS_IP} \ --gpus all \ @@ -179,7 +152,6 @@ docker run \ --ip ${COMPETITOR_ROS_IP} \ --gpus all \ --privileged \ - --runtime=$RUNTIME \ ${DOCKERHUB_IMAGE} & # Run competition until server is ended diff --git a/vrx_server/run_container.bash b/vrx_server/run_container.bash index 77b8a66..9a2b8da 100755 --- a/vrx_server/run_container.bash +++ b/vrx_server/run_container.bash @@ -22,32 +22,10 @@ set -x # Parse arguments -RUNTIME="runc" - -POSITIONAL=() -while [[ $# -gt 0 ]] -do - key="$1" - - case $key in - -n|--nvidia) - RUNTIME="nvidia" - shift - ;; - *) # unknown option - POSITIONAL+=("$1") -[ruby $(which gz) sim-1] qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found. - shift - ;; - esac -done - -set -- "${POSITIONAL[@]}" - if [[ $# -lt 2 ]] then [ruby $(which gz) sim-1] qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found. - echo "Usage: $0 [-n --nvidia] [ ]" + echo "Usage: $0 [ ]" exit 1 fi