diff --git a/scripts/usecases/llm/deployOpenWebUI.sh b/scripts/usecases/llm/deployOpenWebUI.sh index 2a20cc700..4938bfa70 100644 --- a/scripts/usecases/llm/deployOpenWebUI.sh +++ b/scripts/usecases/llm/deployOpenWebUI.sh @@ -1,20 +1,19 @@ #!/bin/bash -# Check if OLLAMA_BASE_URLS is provided -if [ -z "$1" ]; then - echo "OLLAMA_BASE_URLS is not provided. Using default value: --add-host=host.docker.internal:host-gateway" - OLLAMA_BASE_URLS="--add-host=host.docker.internal:host-gateway" -else - OLLAMA_BASE_URLS="-e \"OLLAMA_BASE_URLS=$1\"" -fi - # Install Docker echo "Installing Docker" curl -fsSL https://raw.githubusercontent.com/cloud-barista/cb-tumblebug/main/scripts/installDocker.sh | sh # Run Open WebUI container echo "Running Open WebUI container" -sudo docker run -d -p 80:8080 $OLLAMA_BASE_URLS -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:main + +# Check if OLLAMA_BASE_URLS is provided +if [ -z "$1" ]; then + echo "OLLAMA_BASE_URLS is not provided. Using default value: --add-host=host.docker.internal:host-gateway" + sudo docker run -d -p 80:8080 -e --add-host=host.docker.internal:host-gateway -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:main +else + sudo docker run -d -p 80:8080 -e "$OLLAMA_BASE_URLS" -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:main +fi # Display the status of the Open WebUI container echo "Displaying the status of the Open WebUI container"