Skip to content

Commit 91431f5

Browse files
axel7083benoitf
andauthored
chore: update run.sh script (#11)
* chore: update run.sh script Signed-off-by: axel7083 <[email protected]> * fix: removing config file related code Signed-off-by: axel7083 <[email protected]> * Apply suggestions from code review Co-authored-by: Florent BENOIT <[email protected]> Signed-off-by: axel7083 <[email protected]> * Update chat/run.sh Signed-off-by: axel7083 <[email protected]> --------- Signed-off-by: axel7083 <[email protected]> Co-authored-by: Florent BENOIT <[email protected]>
1 parent 026c855 commit 91431f5

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

chat/requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
llama-cpp-python[server]
1+
llama-cpp-python[server]==0.2.57

chat/run.sh

+7-1
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,10 @@
1515
# limitations under the License.
1616
#
1717
# SPDX-License-Identifier: Apache-2.0
18-
python -m llama_cpp.server --model ${MODEL_PATH} --host ${HOST:=0.0.0.0} --port ${PORT:=8000} --n_gpu_layers 0
18+
if [ ${MODEL_PATH} ]; then
19+
python -m llama_cpp.server --model ${MODEL_PATH} --host ${HOST:=0.0.0.0} --port ${PORT:=8001} --n_gpu_layers ${GPU_LAYERS:=0} --clip_model_path ${CLIP_MODEL_PATH:=None} --chat_format ${MODEL_CHAT_FORMAT:="llama-2"}
20+
exit 0
21+
fi
22+
23+
echo "This image should not be used outside of Podman Desktop AI Lab extension. Missing required MODEL_PATH environment variable."
24+
exit 1

0 commit comments

Comments
 (0)