mirror of
https://github.com/open-webui/open-webui
synced 2024-11-25 21:38:43 +00:00
fixed gpu count env
This commit is contained in:
parent
a580aa8984
commit
2994e1abcd
@ -94,12 +94,6 @@ extract_value() {
|
|||||||
echo "$1" | sed -E 's/.*\[.*=(.*)\].*/\1/; t; s/.*//'
|
echo "$1" | sed -E 's/.*\[.*=(.*)\].*/\1/; t; s/.*//'
|
||||||
}
|
}
|
||||||
|
|
||||||
# Check if no arguments were provided
|
|
||||||
# if [ $# -eq 0 ]; then
|
|
||||||
# usage
|
|
||||||
# exit 1
|
|
||||||
# fi
|
|
||||||
|
|
||||||
# Parse arguments
|
# Parse arguments
|
||||||
while [[ $# -gt 0 ]]; do
|
while [[ $# -gt 0 ]]; do
|
||||||
key="$1"
|
key="$1"
|
||||||
@ -144,6 +138,7 @@ if [[ $enable_gpu == true ]]; then
|
|||||||
echo "Enabling GPU with $gpu_count GPUs"
|
echo "Enabling GPU with $gpu_count GPUs"
|
||||||
# Add your GPU allocation logic here
|
# Add your GPU allocation logic here
|
||||||
export OLLAMA_GPU_DRIVER=$(get_gpu_driver)
|
export OLLAMA_GPU_DRIVER=$(get_gpu_driver)
|
||||||
|
export OLLAMA_GPU_COUNT=$gpu_count # Set OLLAMA_GPU_COUNT environment variable
|
||||||
fi
|
fi
|
||||||
DEFAULT_COMPOSE_COMMAND+=" -f docker-compose.gpu.yaml"
|
DEFAULT_COMPOSE_COMMAND+=" -f docker-compose.gpu.yaml"
|
||||||
fi
|
fi
|
||||||
@ -159,6 +154,7 @@ DEFAULT_COMPOSE_COMMAND+=" up -d > /dev/null 2>&1"
|
|||||||
echo
|
echo
|
||||||
echo -e "${WHITE}${BOLD}Current Setup:${NC}"
|
echo -e "${WHITE}${BOLD}Current Setup:${NC}"
|
||||||
echo -e " ${GREEN}${BOLD}GPU Driver:${NC} ${OLLAMA_GPU_DRIVER:-Not Enabled}"
|
echo -e " ${GREEN}${BOLD}GPU Driver:${NC} ${OLLAMA_GPU_DRIVER:-Not Enabled}"
|
||||||
|
echo -e " ${GREEN}${BOLD}GPU Count:${NC} ${OLLAMA_GPU_COUNT:-Not Enabled}"
|
||||||
echo -e " ${GREEN}${BOLD}WebAPI Port:${NC} ${OLLAMA_WEBAPI_PORT:-Not Enabled}"
|
echo -e " ${GREEN}${BOLD}WebAPI Port:${NC} ${OLLAMA_WEBAPI_PORT:-Not Enabled}"
|
||||||
echo -e " ${GREEN}${BOLD}WebUI Port:${NC} $webui_port"
|
echo -e " ${GREEN}${BOLD}WebUI Port:${NC} $webui_port"
|
||||||
echo
|
echo
|
||||||
|
Loading…
Reference in New Issue
Block a user