ollama / ollama

Get up and running with Llama 3.2, Mistral, Gemma 2, and other large language models.
https://ollama.com
MIT License
94.77k stars 7.5k forks source link

Offline models are not appearing on the Ollama server list #2421

Closed HariKunapareddy closed 7 months ago

HariKunapareddy commented 8 months ago

Problem I download model on the the machine where Ollama installed and have internet access. Then moved the model files from the folder usr/share/ollama/.ollama/models to the new machine which doesn’t have internet access. I could see Ollama is not detecting those models and they are not visible as part of list command.

Expected

Ollama list

should list the new models files transferred.

jithinmukundan commented 8 months ago

Could you find any resolution? I am facing the same issue. Tried all possible changes related to permissions, systemd file etc. No luck yet.

GanizaniSitara commented 7 months ago

What it initially succeeds with is "ollama cp my_invisble_model my_invisible_model2"

It creates the new folder and copies the manifest, but still doesn't list the model and when you try to run it insists on connecting to the internet. There must be somewhere else it looks?

So ...

ran a Window ProcMon figured out which file it touches in the BLOBS directory. Opened it up. It had bunch of SHA signatures which corresponded to files on the internet connected machine. One was Instruction template, the other one was license. Looking at timestamps, those two I've had on my internet connected machine for a while. I've popped them across and the model is now in

Ollama list

on the offline machine

pdevine commented 7 months ago

Hey guys, sorry for the slow response.

If you are moving between Windows and Linux, the problem is the filenames of the blobs in linux look like sha256:<sha256 hash> whereas NTFS doesn't support a : in the file name. Unfortunately you have to rename the files.

For moving files to a different place, you should be able to use the OLLAMA_MODELS environment variable when you're starting Ollama. There is an FAQ which covers how to use that.

GanizaniSitara commented 7 months ago

Hi Patrick, thank you, that's helpful for cross-platform moves. I've resolved mine from going windows to windows and making sure I copied all dependencies.

HariKunapareddy commented 7 months ago

Thanks! this solved the issue.