Reputation: 55
I am building a codellama using ollama in an environment where the internet is blocked due to some circumstances.
Due to a misconfiguration, ollama is not recognizing the models I previously downloaded when internet was allowed.
However, given its massive disk usage, it seems likely that the downloaded model can be recycled.
The /usr/share/ollama folder is using up a huge amount of space.
v100@v100-VM:/usr/share/ollama$ sudo du -h
4.0K ./.nv/ComputeCache
8.0K ./.nv
163G ./.ollama/models/blobs
28K ./.ollama/models/manifests/registry.ollama.ai/library/qwen2.5-coder
16K ./.ollama/models/manifests/registry.ollama.ai/library/exaone3.5
12K ./.ollama/models/manifests/registry.ollama.ai/library/llama3.3
20K ./.ollama/models/manifests/registry.ollama.ai/library/codellama
80K ./.ollama/models/manifests/registry.ollama.ai/library
84K ./.ollama/models/manifests/registry.ollama.ai
88K ./.ollama/models/manifests
163G ./.ollama/models
163G ./.ollama
163G .
I'm looking for a way to reconnect this to ollama.
Thanks in advance for your help.
Upvotes: 1
Views: 69
Reputation: 9
If you've already downloaded Ollama model files but need to re-link them to Ollama (e.g., after reinstalling, moving them, or using a new system), follow these steps:
Linux/macOS: ~/.ollama/models Windows: C:\Users\YourUsername.ollama\models
If you've moved or backed up the model files, ensure they are in this directory.
sh Copy Edit ollama show <model_name>
If it doesn't find the model, you may need to set the correct directory.
Windows (Command Prompt): cmd Copy Edit mklink /D C:\Users\YourUsername.ollama\models "D:\path\to\your\models"
sh Copy Edit ollama pull <model_name>
If the model is already in the directory, this should detect and use it without re-downloading. If necessary, manually rename the model files to match the expected names.
After this, you should be able to use your models without downloading them again. Let me know if you need further details! 🚀
Upvotes: 0