[GH-ISSUE #1121] Using FROM command and using Modelfile not clear #565

Closed
opened 2026-04-12 10:15:28 -05:00 by GiteaMirror · 5 comments
Owner

Originally created by @kikoferrer on GitHub (Nov 14, 2023).
Original GitHub issue: https://github.com/ollama/ollama/issues/1121

so I installed ollama using the instructions here. Then I want to use a predownloaded model. So this is what I did:

guide says create a Modelfile so I used touch
touch Modelfile
then add a FROM instruction with the local filepath to the model you want to import
nano Modelfile FROM ./path/to/model/model.gguf
Then create modelfile
ollama create model -f Modelfile

Then it returns
couldn't open modelfile '/path/to/modelfile/Modelfile' Error: failed to open file: open //path/to/modelfile/Modelfile: permission denied

I am dumb please teach me where I went wrong. Thanks. I am using linux.

Originally created by @kikoferrer on GitHub (Nov 14, 2023). Original GitHub issue: https://github.com/ollama/ollama/issues/1121 so I installed ollama using the instructions here. Then I want to use a predownloaded model. So this is what I did: guide says create a Modelfile so I used touch `touch Modelfile` then add a FROM instruction with the local filepath to the model you want to import `nano Modelfile FROM ./path/to/model/model.gguf` Then create modelfile `ollama create model -f Modelfile` Then it returns `couldn't open modelfile '/path/to/modelfile/Modelfile' Error: failed to open file: open //path/to/modelfile/Modelfile: permission denied` I am dumb please teach me where I went wrong. Thanks. I am using linux.
Author
Owner

@dansreis commented on GitHub (Nov 14, 2023):

Hello @SmoothBrainApe
Thanks for submitting the ticket!

It is possible the issue is related with this one #1113. Please try the workaround suggested by @BruceMacD on his comment.

<!-- gh-comment-id:1810052085 --> @dansreis commented on GitHub (Nov 14, 2023): Hello @SmoothBrainApe Thanks for submitting the ticket! It is possible the issue is related with this one #1113. Please try the workaround suggested by @BruceMacD on his [comment](https://github.com/jmorganca/ollama/issues/1113#issuecomment-1809067424).
Author
Owner

@kikoferrer commented on GitHub (Nov 14, 2023):

Oh I did not see that sorry. Yeah I just tried the command and it still did not work. Tried it with and without sudo. Is this a known bug then?

<!-- gh-comment-id:1810124385 --> @kikoferrer commented on GitHub (Nov 14, 2023): Oh I did not see that sorry. Yeah I just tried the command and it still did not work. Tried it with and without sudo. Is this a known bug then?
Author
Owner

@BruceMacD commented on GitHub (Nov 16, 2023):

Yeah, this was a bug in the way we setup the Linux service. It should be fixed in the next release (in the next could of days). When v0.1.10 is released you'll be able to update to it be re-running the installer: curl https://ollama.ai/install.sh | sh

Resolving this for now, as it should be fixed when that release comes out. Let me know if that's not the case. Thanks for opening the issue.

<!-- gh-comment-id:1814753563 --> @BruceMacD commented on GitHub (Nov 16, 2023): Yeah, this was a bug in the way we setup the Linux service. It should be fixed in the next release (in the next could of days). When [v0.1.10](https://github.com/jmorganca/ollama/releases/tag/untagged-cd794c4aad7f1a4163e6) is released you'll be able to update to it be re-running the installer: `curl https://ollama.ai/install.sh | sh` Resolving this for now, as it should be fixed when that release comes out. Let me know if that's not the case. Thanks for opening the issue.
Author
Owner

@kikoferrer commented on GitHub (Nov 18, 2023):

I have updated my ollama to the latest version thank you! I ran the modelfile again and it seems to process something which is nice. I used the command ollama create zyphyrbeta -f Modelfile using the path to my zephyr beta gguf model. The issue is it returned this error instead.

transferring context Error: rename /tmp/sha256:37894e5b171bd7228f4af7bd5bb0758dd29d6f07fb8e4742e387720f66bac4342528832202 /usr/share/ollama/.ollama/models/blobs/sha256:37894e5b171bd7228f4af7bd5bb0758dd29d6f07fb8e4742e387720f66bac434: invalid cross-device link

The only thing I have in Modelfile is FROM /home/path/to/models/zephyr-7b-beta.Q5_K_M.gguf

<!-- gh-comment-id:1817446995 --> @kikoferrer commented on GitHub (Nov 18, 2023): I have updated my ollama to the latest version thank you! I ran the modelfile again and it seems to process something which is nice. I used the command `ollama create zyphyrbeta -f Modelfile` using the path to my zephyr beta gguf model. The issue is it returned this error instead. `transferring context Error: rename /tmp/sha256:37894e5b171bd7228f4af7bd5bb0758dd29d6f07fb8e4742e387720f66bac4342528832202 /usr/share/ollama/.ollama/models/blobs/sha256:37894e5b171bd7228f4af7bd5bb0758dd29d6f07fb8e4742e387720f66bac434: invalid cross-device link` The only thing I have in Modelfile is `FROM /home/path/to/models/zephyr-7b-beta.Q5_K_M.gguf`
Author
Owner

@BruceMacD commented on GitHub (Nov 20, 2023):

@SmoothBrainApe sorry about that, it was a bug in the last release. It will be fixed in the next release now that #1186 is merged.

<!-- gh-comment-id:1819350511 --> @BruceMacD commented on GitHub (Nov 20, 2023): @SmoothBrainApe sorry about that, it was a bug in the last release. It will be fixed in the next release now that #1186 is merged.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#565