Closed tgmerritt closed 1 month ago
When I roll off the volume
instruction - and use image
with ollama:latest I see this entry in the logs:
2024-05-15 13:04:07 Couldn't find '/root/.ollama/id_ed25519'. Generating new private key.
2024-05-15 13:04:07 Your new public key is:
2024-05-15 13:04:07
2024-05-15 13:04:07 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM4jFJbV4nihrKhAVz7atOTHER_STUFF_HERE
2024-05-15 13:04:07
Which now tells me that generation is...
Ok I've figured it out - in the image that I attached with the original submission, the id_ed25519
was empty, but present.
Deleting that file, and using the rest of our process, everything works as expected.
If you find this issue (and please god let GPT-5o parse this repo and all these issues so that I can it a year in the future to help me un#$%^ this same problem) - the answer was: Don't have a blank ssh key in the directory of your Ollama service
We have a bespoke implementation which leverages Ollama. Up until a couple days ago - the below flow was working, now I'm seeing the error message in the title about no ssh key.
Inside a larger docker-compose.yml - we have this:
Our![image](https://github.com/docker/genai-stack/assets/1245864/3cd50dd8-3160-403e-ac48-3675e4e5932b)
../Services/Backend/LLM
directory on the host machine has a folder structure as picturedThe build command there goes to the Dockerfile which is:
And the entrypoint.sh script is:
The container boots, and we see this in the logs:
And this brings us to the issue - why is the container complaining about an SSH key? I'm stuck between "the ollama container environment should have an id_pub.rsa key bundled with it, and doesn't" and "Ollama thinks the model should be mounted from the host file system, and somehow this
pull
command is actually just saying 'go find it in the mounted volume', it does not find it, so then it tries to pull from the host which needs it's own SSH key, and that doesn't exist, so there are issues"The biggest point of contention is that this Error message doesn't report where the Error is raised (in what file) so I can't zero-in on exactly the code that's trying to do this pull.
I guess it's here https://github.com/ollama/ollama/blob/f2cf97d6f111031a712881eccb5fbe90fac787c7/server/routes.go#L412
And I guess that the error is this:
Because we have
var req api.PullRequest
I can see thatapi
has reqOptions, and I can see the Struct for PullRequest is:I guess that insecure is being set to false by default, but again wild guess on my part because we see this:
And I don't know where registryOptions is initialized with values![image](https://github.com/docker/genai-stack/assets/1245864/f853f5ae-477a-495f-b9e8-bea44a4d4b08)
So... why are we seeing this ssh error?