Skip to content

Update demos to show serving models. #1474

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 9, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 21 additions & 2 deletions docs/demo/ramalama.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ run() {
echo_color "Serve granite via RamaLama run"
exec_color "ramalama --dryrun run granite | grep --color podman"
echo ""
exec_color "ramalama --dryrun run granite | grep --color quay.io.*latest"
exec_color "ramalama --dryrun run granite | grep --color \"quay.io[^ ]*\""
echo ""
exec_color "ramalama --dryrun run granite | grep --color -- --cap-drop.*privileges"
echo ""
Expand All @@ -88,7 +88,7 @@ run() {

serve() {
echo_color "Serve granite via RamaLama model service"
exec_color "ramalama serve --name granite-service -d granite"
exec_color "ramalama serve --port 8080 --name granite-service -d granite"
echo ""

echo_color "List RamaLama containers"
Expand All @@ -99,6 +99,23 @@ serve() {
exec_color "podman ps "
echo ""

echo_color "Use web browser to show interaction"
exec_color "firefox http://localhost:8080"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: Hardcoded browser command may not be portable

Use $BROWSER or xdg-open to ensure compatibility across different environments.

Suggested implementation:

    echo_color "Use web browser to show interaction"
    exec_color "${BROWSER:-xdg-open} http://localhost:8080"

#    echo_color "Use web browser to show interaction"
#    exec_color "${BROWSER:-xdg-open} http://localhost:8085"


echo_color "Stop the ramalama container"
exec_color "ramalama stop granite-service"
echo ""

echo_color "Serve granite via RamaLama model service"
exec_color "ramalama serve --port 8085 --api llama-stack --name granite-service -d granite"
echo ""

echo_color "Use web browser to show interaction"
exec_color "firefox http://localhost:8085"

echo_color "Use web browser to show interaction"
exec_color "firefox http://localhost:8085/v1/openai"

echo_color "Stop the ramalama container"
exec_color "ramalama stop granite-service"
echo ""
Expand Down Expand Up @@ -161,6 +178,8 @@ pull

run

serve

kubernetes

quadlet
Expand Down
Loading