Claus Ibsen created CAMEL-24821:
-----------------------------------

             Summary: camel infra ollama: keep pulled models in a volume, add 
--model, and wait for the pull
                 Key: CAMEL-24821
                 URL: https://issues.apache.org/jira/browse/CAMEL-24821
             Project: Camel
          Issue Type: Improvement
          Components: camel-jbang, camel-test-infra-ollama
            Reporter: Claus Ibsen


Found while writing the langchain4j-chat example for camel-jbang-examples 
(CAMEL-24808).

*camel infra run ollama* starts the Ollama container and pulls its default 
model (granite4:3b, 2.1 GB). Three things make it hard to use:

# The container mounts no volume, so the model is pulled again on every start, 
and every Citrus test run that starts the service with the camel infra action 
downloads 2.1 GB. The compose file the example used before kept a named volume 
for exactly this reason.
# The model is fixed to the ollama.model property of the service; neither 
*camel infra run ollama* nor the Citrus infra action can choose a smaller one. 
A tiny model (qwen2.5:0.5b at 400 MB, smollm2:135m under 300 MB) is enough for 
most tests and CI.
# The pull is asynchronous: the service logs "Pulling the model granite4:3b" 
and prints its JSON about one second later, so a *camel run* that follows the 
README gets "model 'granite4:3b' not found" until the pull is done, with 
nothing telling the user why.

Proposal: mount a named volume for /root/.ollama so a pull happens once per 
machine; add *--model* (and the embedding model) as an option of *camel infra 
run ollama* and as a service property the Citrus action can pass; wait for the 
pull before reporting the service as running, or at least print the pull 
progress and say it is still running.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to