forked from open-webui/open-webui
Merge pull request #1799 from karaketir16/patch-1
fix: docker gpus option "all" support in run-compose.sh
This commit is contained in:
commit
8215a2023e
1 changed files with 2 additions and 1 deletions
|
@ -82,6 +82,7 @@ usage() {
|
||||||
echo "Examples:"
|
echo "Examples:"
|
||||||
echo " $0 --drop"
|
echo " $0 --drop"
|
||||||
echo " $0 --enable-gpu[count=1]"
|
echo " $0 --enable-gpu[count=1]"
|
||||||
|
echo " $0 --enable-gpu[count=all]"
|
||||||
echo " $0 --enable-api[port=11435]"
|
echo " $0 --enable-api[port=11435]"
|
||||||
echo " $0 --enable-gpu[count=1] --enable-api[port=12345] --webui[port=3000]"
|
echo " $0 --enable-gpu[count=1] --enable-api[port=12345] --webui[port=3000]"
|
||||||
echo " $0 --enable-gpu[count=1] --enable-api[port=12345] --webui[port=3000] --data[folder=./ollama-data]"
|
echo " $0 --enable-gpu[count=1] --enable-api[port=12345] --webui[port=3000] --data[folder=./ollama-data]"
|
||||||
|
@ -160,7 +161,7 @@ else
|
||||||
if [[ $enable_gpu == true ]]; then
|
if [[ $enable_gpu == true ]]; then
|
||||||
# Validate and process command-line arguments
|
# Validate and process command-line arguments
|
||||||
if [[ -n $gpu_count ]]; then
|
if [[ -n $gpu_count ]]; then
|
||||||
if ! [[ $gpu_count =~ ^[0-9]+$ ]]; then
|
if ! [[ $gpu_count =~ ^([0-9]+|all)$ ]]; then
|
||||||
echo "Invalid GPU count: $gpu_count"
|
echo "Invalid GPU count: $gpu_count"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue