Skip to content

Commit

Permalink
chore: update run.sh script (#11)
Browse files Browse the repository at this point in the history
* chore: update run.sh script

Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>

* fix: removing config file related code

Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Florent BENOIT <fbenoit@redhat.com>
Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>

* Update chat/run.sh

Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>

---------

Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>
Co-authored-by: Florent BENOIT <fbenoit@redhat.com>
  • Loading branch information
axel7083 and benoitf authored Apr 11, 2024
1 parent 026c855 commit 91431f5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion chat/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
llama-cpp-python[server]
llama-cpp-python[server]==0.2.57
8 changes: 7 additions & 1 deletion chat/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,10 @@
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
python -m llama_cpp.server --model ${MODEL_PATH} --host ${HOST:=0.0.0.0} --port ${PORT:=8000} --n_gpu_layers 0
if [ ${MODEL_PATH} ]; then
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"}
exit 0
fi

echo "This image should not be used outside of Podman Desktop AI Lab extension. Missing required MODEL_PATH environment variable."
exit 1

0 comments on commit 91431f5

Please sign in to comment.