Skip to content

Commit 11e07fd

Browse files
authored
fix: graceful shutdown for Docker images (#10815)
1 parent 4601a8b commit 11e07fd

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

.devops/tools.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,23 @@ arg1="$1"
88
shift
99

1010
if [[ "$arg1" == '--convert' || "$arg1" == '-c' ]]; then
11-
python3 ./convert_hf_to_gguf.py "$@"
11+
exec python3 ./convert_hf_to_gguf.py "$@"
1212
elif [[ "$arg1" == '--quantize' || "$arg1" == '-q' ]]; then
13-
./llama-quantize "$@"
13+
exec ./llama-quantize "$@"
1414
elif [[ "$arg1" == '--run' || "$arg1" == '-r' ]]; then
15-
./llama-cli "$@"
15+
exec ./llama-cli "$@"
1616
elif [[ "$arg1" == '--all-in-one' || "$arg1" == '-a' ]]; then
1717
echo "Converting PTH to GGML..."
1818
for i in `ls $1/$2/ggml-model-f16.bin*`; do
1919
if [ -f "${i/f16/q4_0}" ]; then
2020
echo "Skip model quantization, it already exists: ${i/f16/q4_0}"
2121
else
2222
echo "Converting PTH to GGML: $i into ${i/f16/q4_0}..."
23-
./llama-quantize "$i" "${i/f16/q4_0}" q4_0
23+
exec ./llama-quantize "$i" "${i/f16/q4_0}" q4_0
2424
fi
2525
done
2626
elif [[ "$arg1" == '--server' || "$arg1" == '-s' ]]; then
27-
./llama-server "$@"
27+
exec ./llama-server "$@"
2828
else
2929
echo "Unknown command: $arg1"
3030
echo "Available commands: "

0 commit comments

Comments
 (0)