File tree Expand file tree Collapse file tree 1 file changed +9
-14
lines changed
Expand file tree Collapse file tree 1 file changed +9
-14
lines changed Original file line number Diff line number Diff line change 33main () {
44 set -eux -o pipefail
55
6- local gpu_device_flag=()
6+ local args=(docker run --rm -p " $PORT :$PORT " -v " $MODELS_PATH :/models"
7+ -e MODEL_RUNNER_PORT=" $PORT " -e LLAMA_SERVER_PATH=/app/bin
8+ -e MODELS_PATH=/models -e LLAMA_ARGS=" $LLAMA_ARGS "
9+ -e DMR_ORIGINS=" $DMR_ORIGINS " -e DO_NOT_TRACK=" $DO_NOT_TRACK "
10+ -e DEBUG=" $DEBUG "
11+ )
12+
713 for i in /dev/dri /dev/kfd /dev/accel /dev/davinci* /dev/devmm_svm /dev/hisi_hdc; do
814 if [ -e " $i " ]; then
9- gpu_device_flag +=(" --device" " $i " )
15+ args +=(" --device" " $i " )
1016 fi
1117 done
1218
1319 mkdir -p " $MODELS_PATH "
1420 chmod a+rx " $MODELS_PATH "
15- docker run --rm \
16- -p " $PORT :$PORT " \
17- -v " $MODELS_PATH :/models" \
18- -e MODEL_RUNNER_PORT=" $PORT " \
19- -e LLAMA_SERVER_PATH=/app/bin \
20- -e MODELS_PATH=/models \
21- -e LLAMA_ARGS=" $LLAMA_ARGS " \
22- -e DMR_ORIGINS=" $DMR_ORIGINS " \
23- -e DO_NOT_TRACK=" $DO_NOT_TRACK " \
24- -e DEBUG=" $DEBUG " \
25- " ${gpu_device_flag[@]+" ${gpu_device_flag[@]} " } " \
26- " $DOCKER_IMAGE "
21+ " ${args[@]} " " $DOCKER_IMAGE "
2722}
2823
2924main " $@ "
You can’t perform that action at this time.
0 commit comments