[PR #7001] cli: pull models without starting server, fixes #3369 #17556

Open
opened 2026-04-16 06:06:25 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/7001
Author: @a-h
Created: 9/27/2024
Status: 🔄 Open

Base: mainHead: pull_model_without_serving


📝 Commits (5)

  • 53076d1 cli: pull models without starting server, fixes #3369
  • 10253ce fix: ensure preflight check is skipped when pulling locally
  • dfcc0ca fix: ensure that keypairs are generated before pulling models
  • 469c1b5 refactor: remove unnecessary nil check as per code review
  • 1080204 Merge branch 'main' into pull_model_without_serving

📊 Changes

8 files changed (+78 additions, -30 deletions)

View changed files

📝 .gitignore (+1 -0)
📝 cmd/cmd.go (+57 -10)
📝 server/auth.go (+1 -1)
📝 server/download.go (+5 -5)
📝 server/images.go (+6 -6)
📝 server/model.go (+1 -1)
📝 server/routes.go (+2 -2)
📝 server/upload.go (+5 -5)

📄 Description

In this change, I've added a new -local flag to the ollama pull command.

This enables models to be downloaded to the server directories without first starting the server, as per requests at #3369

This change makes it easier to package models for distribution and deployment.

To make the change, I made registryOptions into a public type. This shouldn't be a problem, because the functions that accept registryOptions were already public.

The CLI already directly used parts of the server package, so I didn't see any potential problems with the change there.


🔄 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/7001 **Author:** [@a-h](https://github.com/a-h) **Created:** 9/27/2024 **Status:** 🔄 Open **Base:** `main` ← **Head:** `pull_model_without_serving` --- ### 📝 Commits (5) - [`53076d1`](https://github.com/ollama/ollama/commit/53076d1bd13703c9a743d9e212225359e8f55136) cli: pull models without starting server, fixes #3369 - [`10253ce`](https://github.com/ollama/ollama/commit/10253ce34414f7dcc918f42f092b08adb11ce88b) fix: ensure preflight check is skipped when pulling locally - [`dfcc0ca`](https://github.com/ollama/ollama/commit/dfcc0caf8c48e3976092848820d1ee78d13e9458) fix: ensure that keypairs are generated before pulling models - [`469c1b5`](https://github.com/ollama/ollama/commit/469c1b59d6a062449ca14ceadc361280103b7779) refactor: remove unnecessary nil check as per code review - [`1080204`](https://github.com/ollama/ollama/commit/10802044b8dce04a4aa816d169cb1bbf7cf30e5a) Merge branch 'main' into pull_model_without_serving ### 📊 Changes **8 files changed** (+78 additions, -30 deletions) <details> <summary>View changed files</summary> 📝 `.gitignore` (+1 -0) 📝 `cmd/cmd.go` (+57 -10) 📝 `server/auth.go` (+1 -1) 📝 `server/download.go` (+5 -5) 📝 `server/images.go` (+6 -6) 📝 `server/model.go` (+1 -1) 📝 `server/routes.go` (+2 -2) 📝 `server/upload.go` (+5 -5) </details> ### 📄 Description In this change, I've added a new `-local` flag to the `ollama pull` command. This enables models to be downloaded to the server directories without first starting the server, as per requests at #3369 This change makes it easier to package models for distribution and deployment. To make the change, I made `registryOptions` into a public type. This shouldn't be a problem, because the functions that accept `registryOptions` were already public. The CLI already directly used parts of the server package, so I didn't see any potential problems with the change there. --- <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-16 06:06:25 -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#17556