Skip to content

Commit 71d6975

Browse files
authored
[Docker] fix tools.sh argument passing. (#2884)
* [Docker] fix tools.sh argument passing. This should allow passing multiple arguments to containers with the full image that are using the tools.sh frontend. Fix from #2535 (comment)
1 parent b532a69 commit 71d6975

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

.devops/tools.sh

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,12 @@ arg1="$1"
77
# Shift the arguments to remove the first one
88
shift
99

10-
# Join the remaining arguments into a single string
11-
arg2="$@"
12-
1310
if [[ "$arg1" == '--convert' || "$arg1" == '-c' ]]; then
14-
python3 ./convert.py "$arg2"
11+
python3 ./convert.py "$@"
1512
elif [[ "$arg1" == '--quantize' || "$arg1" == '-q' ]]; then
16-
./quantize "$arg2"
13+
./quantize "$@"
1714
elif [[ "$arg1" == '--run' || "$arg1" == '-r' ]]; then
18-
./main "$arg2"
15+
./main "$@"
1916
elif [[ "$arg1" == '--all-in-one' || "$arg1" == '-a' ]]; then
2017
echo "Converting PTH to GGML..."
2118
for i in `ls $1/$2/ggml-model-f16.bin*`; do
@@ -27,7 +24,7 @@ elif [[ "$arg1" == '--all-in-one' || "$arg1" == '-a' ]]; then
2724
fi
2825
done
2926
elif [[ "$arg1" == '--server' || "$arg1" == '-s' ]]; then
30-
./server "$arg2"
27+
./server "$@"
3128
else
3229
echo "Unknown command: $arg1"
3330
echo "Available commands: "

0 commit comments

Comments
 (0)