[GH-ISSUE #5978] system variable (user only) OLLAMA_MODELS is ignored Worked in 0.2.8 #29498

Closed
opened 2026-04-22 08:26:32 -05:00 by GiteaMirror · 9 comments
Owner

Originally created by @mcDandy on GitHub (Jul 26, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/5978

Originally assigned to: @dhiltgen on GitHub.

What is the issue?

I had custom location of ollama model in 2.8 but after 3.0 update it is ignored.

 ollama run gemma2:27b
pulling manifest
pulling d7e4b00a7d7a...   1% ▕                ▏ 157 MB/ 15 GB  768 KB/s   5h35m
Error: max retries exceeded: write C:\Users\danda\.ollama\models\blobs\sha256-d7e4b00a7d7a8d03d4eed9b0f3f61a427e9f0fc5dea6aeb414e41dee23dc8ecc-partial: Na disku není dost místa.

image

OS

Windows

GPU

Nvidia

CPU

Intel

Ollama version

0.3.0

Originally created by @mcDandy on GitHub (Jul 26, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/5978 Originally assigned to: @dhiltgen on GitHub. ### What is the issue? I had custom location of ollama model in 2.8 but after 3.0 update it is ignored. ``` ollama run gemma2:27b pulling manifest pulling d7e4b00a7d7a... 1% ▕ ▏ 157 MB/ 15 GB 768 KB/s 5h35m Error: max retries exceeded: write C:\Users\danda\.ollama\models\blobs\sha256-d7e4b00a7d7a8d03d4eed9b0f3f61a427e9f0fc5dea6aeb414e41dee23dc8ecc-partial: Na disku není dost místa. ``` ![image](https://github.com/user-attachments/assets/c0c74917-4758-4743-91ae-a060b9fd989a) ### OS Windows ### GPU Nvidia ### CPU Intel ### Ollama version 0.3.0
GiteaMirror added the questionwindows labels 2026-04-22 08:26:33 -05:00
Author
Owner

@rick-github commented on GitHub (Jul 26, 2024):

What did you do to update? Did you restart ollama?

<!-- gh-comment-id:2252412901 --> @rick-github commented on GitHub (Jul 26, 2024): What did you do to update? Did you restart ollama?
Author
Owner

@mcDandy commented on GitHub (Jul 26, 2024):

I updated 2 hours ago or so. I did not restart ollama after updating to 0.3.0 since it was restarted by installer. I restarted it 2 days ago when I set up ollama so the variable took effect (it did). No restarts or variable changes since then.

From: frob @.>
Sent: Friday, July 26, 2024 12:02 PM
To: ollama/ollama @.
>
Cc: mcDandy @.>; Author @.>
Subject: Re: [ollama/ollama] system variable (user only) OLLAMA_MODELS is ignored Worked in 0.2.8 (Issue #5978)

What did you do to update? Did you restart ollama?


Reply to this email directly, view it on GitHub https://github.com/ollama/ollama/issues/5978#issuecomment-2252412901 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AEN2KD4Q4IUC7R3RHHNTX73ZOINCVAVCNFSM6AAAAABLQEFZ7SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENJSGQYTEOJQGE .
You are receiving this because you authored the thread. https://github.com/notifications/beacon/AEN2KD524SCG3U6TRL4SNY3ZOINCVA5CNFSM6AAAAABLQEFZ7SWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTUGIEL6K.gif Message ID: @.*** @.***> >

<!-- gh-comment-id:2252788070 --> @mcDandy commented on GitHub (Jul 26, 2024): I updated 2 hours ago or so. I did not restart ollama after updating to 0.3.0 since it was restarted by installer. I restarted it 2 days ago when I set up ollama so the variable took effect (it did). No restarts or variable changes since then. From: frob ***@***.***> Sent: Friday, July 26, 2024 12:02 PM To: ollama/ollama ***@***.***> Cc: mcDandy ***@***.***>; Author ***@***.***> Subject: Re: [ollama/ollama] system variable (user only) OLLAMA_MODELS is ignored Worked in 0.2.8 (Issue #5978) What did you do to update? Did you restart ollama? — Reply to this email directly, view it on GitHub <https://github.com/ollama/ollama/issues/5978#issuecomment-2252412901> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AEN2KD4Q4IUC7R3RHHNTX73ZOINCVAVCNFSM6AAAAABLQEFZ7SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENJSGQYTEOJQGE> . You are receiving this because you authored the thread. <https://github.com/notifications/beacon/AEN2KD524SCG3U6TRL4SNY3ZOINCVA5CNFSM6AAAAABLQEFZ7SWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTUGIEL6K.gif> Message ID: ***@***.*** ***@***.***> >
Author
Owner

@mcDandy commented on GitHub (Jul 26, 2024):

Sorry I did not understand the question. I just ran the installer since variable was setup. No additional restarts done by me.

<!-- gh-comment-id:2252792111 --> @mcDandy commented on GitHub (Jul 26, 2024): Sorry I did not understand the question. I just ran the installer since variable was setup. No additional restarts done by me.
Author
Owner

@rick-github commented on GitHub (Jul 26, 2024):

Server logs will show what OLLAMA_MODELS is set to, if you add some logs we can check. If it's set to F:\Users\danda but the server is writing to C:\Users\danda then that is indeed a problem. I have tested it locally, ollama 0.3.0 on a linux system does respect the setting of OLLAMA_MODELS.

<!-- gh-comment-id:2252802994 --> @rick-github commented on GitHub (Jul 26, 2024): Server logs will show what `OLLAMA_MODELS` is set to, if you add some logs we can check. If it's set to `F:\Users\danda` but the server is writing to `C:\Users\danda` then that is indeed a problem. I have tested it locally, ollama 0.3.0 on a linux system does respect the setting of `OLLAMA_MODELS`.
Author
Owner

@mcDandy commented on GitHub (Jul 26, 2024):

I am on windows...
server.zip

<!-- gh-comment-id:2252807686 --> @mcDandy commented on GitHub (Jul 26, 2024): I am on windows... [server.zip](https://github.com/user-attachments/files/16392611/server.zip)
Author
Owner

@rick-github commented on GitHub (Jul 26, 2024):

2024/07/23 21:50:01.262+02:00 level=INFO source=routes.go:1147 msg="Listening on 127.0.0.1:11434 (version 0.2.8)"
2024/07/23 21:50:01 routes.go:1100: INFO server config env="map[ OLLAMA_MODELS:C:\\Users\\danda\\.ollama\\models OLLAMA_NOHISTORY:false 
2024/07/23 23:09:37.655+02:00 level=INFO source=routes.go:1147 msg="Listening on 127.0.0.1:11434 (version 0.2.8)"
2024/07/23 23:09:37 routes.go:1100: INFO server config env="map[ OLLAMA_MODELS:F:\\Users\\danda\\OneDrive - Univerzita Pardubice\\Dokumenty\\LLMs OLLAMA_NOHISTORY:false 
2024/07/26 11:03:09.968+02:00 level=INFO source=routes.go:1146 msg="Listening on 127.0.0.1:11434 (version 0.3.0)"
2024/07/26 11:03:09 routes.go:1099: INFO server config env="map[ OLLAMA_MODELS:C:\\Users\\danda\\.ollama\\models OLLAMA_NOHISTORY:false 
2024/07/26 11:40:19.347+02:00 level=INFO source=routes.go:1146 msg="Listening on 127.0.0.1:11434 (version 0.3.0)"
2024/07/26 11:40:19 routes.go:1099: INFO server config env="map[ OLLAMA_MODELS:F:\\Users\\danda\\OneDrive - Univerzita Pardubice\\Dokumenty\\LLMs OLLAMA_NOHISTORY:false 

The first time you restarted 0.3.0 at 2024/07/26 11:03:09, OLLAMA_MODELS was set to C:. The second time at 2024/07/26 11:40:19 it is set to F:. If you haven't restarted since, ollama pull should download the model to F:. Since it alternates, I am guessing you have two different ways of updating/restarting ollama. Which ever way it is, the one you did at 2024/07/26 11:40:19 is the better way.

<!-- gh-comment-id:2252862188 --> @rick-github commented on GitHub (Jul 26, 2024): ``` 2024/07/23 21:50:01.262+02:00 level=INFO source=routes.go:1147 msg="Listening on 127.0.0.1:11434 (version 0.2.8)" 2024/07/23 21:50:01 routes.go:1100: INFO server config env="map[ OLLAMA_MODELS:C:\\Users\\danda\\.ollama\\models OLLAMA_NOHISTORY:false 2024/07/23 23:09:37.655+02:00 level=INFO source=routes.go:1147 msg="Listening on 127.0.0.1:11434 (version 0.2.8)" 2024/07/23 23:09:37 routes.go:1100: INFO server config env="map[ OLLAMA_MODELS:F:\\Users\\danda\\OneDrive - Univerzita Pardubice\\Dokumenty\\LLMs OLLAMA_NOHISTORY:false 2024/07/26 11:03:09.968+02:00 level=INFO source=routes.go:1146 msg="Listening on 127.0.0.1:11434 (version 0.3.0)" 2024/07/26 11:03:09 routes.go:1099: INFO server config env="map[ OLLAMA_MODELS:C:\\Users\\danda\\.ollama\\models OLLAMA_NOHISTORY:false 2024/07/26 11:40:19.347+02:00 level=INFO source=routes.go:1146 msg="Listening on 127.0.0.1:11434 (version 0.3.0)" 2024/07/26 11:40:19 routes.go:1099: INFO server config env="map[ OLLAMA_MODELS:F:\\Users\\danda\\OneDrive - Univerzita Pardubice\\Dokumenty\\LLMs OLLAMA_NOHISTORY:false ``` The first time you restarted 0.3.0 at 2024/07/26 11:03:09, OLLAMA_MODELS was set to C:. The second time at 2024/07/26 11:40:19 it is set to F:. If you haven't restarted since, `ollama pull` should download the model to F:. Since it alternates, I am guessing you have two different ways of updating/restarting ollama. Which ever way it is, the one you did at 2024/07/26 11:40:19 is the better way.
Author
Owner

@mcDandy commented on GitHub (Jul 26, 2024):

I am allways updating through the installer and allways starting with ollama run gemma2:27b. Wierd thing is that I did nothing different from the beginning and everything was exactly the same. I just restarted PC before the last run.

<!-- gh-comment-id:2252870227 --> @mcDandy commented on GitHub (Jul 26, 2024): I am allways updating through the installer and allways starting with `ollama run gemma2:27b`. Wierd thing is that I did nothing different from the beginning and everything was exactly the same. I just restarted PC before the last run.
Author
Owner

@mcDandy commented on GitHub (Jul 26, 2024):

Well apart of the very first run where I did not have the variable set.

<!-- gh-comment-id:2252872943 --> @mcDandy commented on GitHub (Jul 26, 2024): Well apart of the very first run where I did not have the variable set.
Author
Owner

@dhiltgen commented on GitHub (Jul 26, 2024):

@mcDandy the simplest way to make sure things are totally set up would be a reboot, but that's not strictly necessary as long as you restart your shells and the ollama tray application. What is probably going on is you set the environment variable, but still had a cmd or powershell terminal running with the old environment, and at some point you quit the Ollama tray application, and ran the CLI in one of those "stale" terminals, which caused Ollama to restart with the old environment.

<!-- gh-comment-id:2253300872 --> @dhiltgen commented on GitHub (Jul 26, 2024): @mcDandy the simplest way to make sure things are totally set up would be a reboot, but that's not strictly necessary as long as you restart your shells and the ollama tray application. What is probably going on is you set the environment variable, but still had a cmd or powershell terminal running with the old environment, and at some point you quit the Ollama tray application, and ran the CLI in one of those "stale" terminals, which caused Ollama to restart with the old environment.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#29498