瀏覽代碼

Merge pull request #2937 from mindspawn/cuda-fix

Enable case independent environment variable testing in start.sh
Timothy Jaeryang Baek 11 月之前
父節點
當前提交
9b38788aa2
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      backend/start.sh

+ 2 - 2
backend/start.sh

@@ -20,12 +20,12 @@ if test "$WEBUI_SECRET_KEY $WEBUI_JWT_SECRET_KEY" = " "; then
   WEBUI_SECRET_KEY=$(cat "$KEY_FILE")
   WEBUI_SECRET_KEY=$(cat "$KEY_FILE")
 fi
 fi
 
 
-if [ "$USE_OLLAMA_DOCKER" = "true" ]; then
+if [[ "${USE_OLLAMA_DOCKER,,}" == "true" ]]; then
     echo "USE_OLLAMA is set to true, starting ollama serve."
     echo "USE_OLLAMA is set to true, starting ollama serve."
     ollama serve &
     ollama serve &
 fi
 fi
 
 
-if [ "$USE_CUDA_DOCKER" = "true" ]; then
+if [[ "${USE_CUDA_DOCKER,,}" == "true" ]]; then
   echo "CUDA is enabled, appending LD_LIBRARY_PATH to include torch/cudnn & cublas libraries."
   echo "CUDA is enabled, appending LD_LIBRARY_PATH to include torch/cudnn & cublas libraries."
   export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib/python3.11/site-packages/torch/lib:/usr/local/lib/python3.11/site-packages/nvidia/cudnn/lib"
   export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib/python3.11/site-packages/torch/lib:/usr/local/lib/python3.11/site-packages/nvidia/cudnn/lib"
 fi
 fi