Skip to content

Refactor podman commands for consistency and clarity#439

Draft
SaschaSchwarze0 wants to merge 1 commit into
mainfrom
SaschaSchwarze0-patch-1
Draft

Refactor podman commands for consistency and clarity#439
SaschaSchwarze0 wants to merge 1 commit into
mainfrom
SaschaSchwarze0-patch-1

Conversation

@SaschaSchwarze0

Copy link
Copy Markdown
Member

Various changes:

  • Hook is not interactive -> it argument makes no sense
  • Consistent image name (with vs without latest tag)
  • Consistent long argument names (done for the ibmcloud command but not for podman)
  • Logged and performed ibmcloud commands not the same

TBD:

  • hook retry limit is 3 but if it succeeds to start ollama but fails on the model pull the retries will all fail on podman run because container ollama already exists
  • granite 4 is outdated, what about 4.1 ?
  • What is the value of the volume ? It primarily makes the solution slow because it uses the boot volume of the machine.

@reggeenr reggeenr left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@reggeenr

Copy link
Copy Markdown
Collaborator

You brought up very good points w.r.t. retry handling, granite model version, etc. I will leave it up to @Luke-Roy-IBM to improve the example

@Luke-Roy-IBM

Copy link
Copy Markdown
Member

Changees look good 👍

hook retry limit is 3 but if it succeeds to start ollama but fails on the model pull the retries will all fail on podman run because container ollama already exists

Yes the --name could be removed or we add a uuid to it like in the fleet examples

granite 4 is outdated, what about 4.1 ?

We should probably remove granite in general and find an alternative small model for this example

What is the value of the volume ? It primarily makes the solution slow because it uses the boot volume of the machine.

volume is of no real concern for the example

@SaschaSchwarze0

Copy link
Copy Markdown
Member Author

hook retry limit is 3 but if it succeeds to start ollama but fails on the model pull the retries will all fail on podman run because container ollama already exists

Yes the --name could be removed or we add a uuid to it like in the fleet examples

That does not help. Then you try to start a second container and get a port conflict. Two options are there imo:

  1. Before starting the container podman rm ollama --force || true to remove it if it was already started.
  2. Before starting the container, use for example podman inspect ollama to check if the container is already there.

(2) Has the risk that the container was started but somehow does not work properly.

Signed-off-by: Sascha Schwarze <schwarzs@de.ibm.com>
@SaschaSchwarze0 SaschaSchwarze0 force-pushed the SaschaSchwarze0-patch-1 branch from 9dc15db to 6e2ba47 Compare July 10, 2026 06:47
@Luke-Roy-IBM

Copy link
Copy Markdown
Member

@SaschaSchwarze0 good point option 1 makes sense

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants