[PR #2770] [CLOSED] expand user home dir in OLLAMA_MODELS #36845

Closed
opened 2026-04-22 21:28:38 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/2770
Author: @BruceMacD
Created: 2/26/2024
Status: Closed

Base: mainHead: brucemacd/models_dir_tilde


📝 Commits (2)

  • 17f391c expand user home dir in OLLAMA_MODELS
  • 9051578 use os.pathseparator

📊 Changes

1 file changed (+6 additions, -3 deletions)

View changed files

📝 server/modelpath.go (+6 -3)

📄 Description

This allows the OLLAMA_MODELS env var to contain a tilde, the same way other paths can be specified in ollama models.

Ex: OLLAMA_MODELS="~/models" ollama serve now puts models in the proper location


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/2770 **Author:** [@BruceMacD](https://github.com/BruceMacD) **Created:** 2/26/2024 **Status:** ❌ Closed **Base:** `main` ← **Head:** `brucemacd/models_dir_tilde` --- ### 📝 Commits (2) - [`17f391c`](https://github.com/ollama/ollama/commit/17f391c25fd370eeb7a6ce4f3ee4799c0a456667) expand user home dir in OLLAMA_MODELS - [`9051578`](https://github.com/ollama/ollama/commit/9051578ecbcabb6f1497376717ddd565a6381640) use os.pathseparator ### 📊 Changes **1 file changed** (+6 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `server/modelpath.go` (+6 -3) </details> ### 📄 Description This allows the `OLLAMA_MODELS` env var to contain a tilde, the same way other paths can be specified in ollama models. Ex: `OLLAMA_MODELS="~/models" ollama serve` now puts models in the proper location --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-22 21:28:38 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#36845