forked from containers/podman-desktop-extension-ai-lab
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add option for config file in playground (containers#72)
* add option for config file in playground * Update playground/README.md Co-authored-by: Sébastien Han <[email protected]> --------- Co-authored-by: Sébastien Han <[email protected]>
- Loading branch information
1 parent
71a6cb3
commit 13f1814
Showing
2 changed files
with
50 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,14 @@ | ||
#!/bin/bash | ||
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 ${CHAT_FORMAT:="llama-2"} | ||
if [ ${CONFIG_PATH} ] || [[ ${MODEL_PATH} && ${CONFIG_PATH} ]]; then | ||
python -m llama_cpp.server --config_file ${CONFIG_PATH} | ||
exit 0 | ||
fi | ||
|
||
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 ${CHAT_FORMAT:="llama-2"} | ||
exit 0 | ||
fi | ||
|
||
echo "Please set either a CONFIG_PATH or a MODEL_PATH" | ||
exit 1 | ||
|