From 865b8632050fe0a7e65998e27c52c50b31c6b094 Mon Sep 17 00:00:00 2001 From: Branton Davis Date: Tue, 5 Oct 2021 17:32:29 -0500 Subject: [PATCH] Only check for GPU on Linux. --- webodm.sh | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/webodm.sh b/webodm.sh index 34f1cc4c..5872f7d2 100755 --- a/webodm.sh +++ b/webodm.sh @@ -220,8 +220,10 @@ start(){ command="docker-compose -f docker-compose.yml" if [[ $default_nodes > 0 ]]; then - source "${__dirname}/detect_gpus.sh" - set +ux + if [ "${platform}" = "Linux" ]; then + source "${__dirname}/detect_gpus.sh" + set +ux + fi if [ "${GPU_NVIDIA}" = true ]; then command+=" -f docker-compose.nodeodm.gpu.nvidia.yml" @@ -292,8 +294,10 @@ start(){ } down(){ - source "${__dirname}/detect_gpus.sh" - set +ux + if [ "${platform}" = "Linux" ]; then + source "${__dirname}/detect_gpus.sh" + set +ux + fi command="docker-compose -f docker-compose.yml" @@ -365,8 +369,11 @@ elif [[ $1 = "stop" ]]; then environment_check echo "Stopping WebODM..." - source "${__dirname}/detect_gpus.sh" - set +ux + if [ "${platform}" = "Linux" ]; then + source "${__dirname}/detect_gpus.sh" + set +ux + fi + command="docker-compose -f docker-compose.yml" if [ "${GPU_NVIDIA}" = true ]; then @@ -410,8 +417,10 @@ elif [[ $1 = "update" ]]; then command="docker-compose -f docker-compose.yml" if [[ $default_nodes > 0 ]]; then - source "${__dirname}/detect_gpus.sh" - set +ux + if [ "${platform}" = "Linux" ]; then + source "${__dirname}/detect_gpus.sh" + set +ux + fi if [ "${GPU_NVIDIA}" = true ]; then command+=" -f docker-compose.nodeodm.gpu.nvidia.yml"