Only check for GPU on Linux.

pull/1066/head
Branton Davis 2021-10-05 17:32:29 -05:00
rodzic af20b8b99c
commit 865b863205
1 zmienionych plików z 17 dodań i 8 usunięć

Wyświetl plik

@ -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"