[PR #78] [MERGED] basic distribution w/ push/pull #9969

Closed
opened 2026-04-12 22:49:00 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/78
Author: @pdevine
Created: 7/14/2023
Status: Merged
Merged: 7/17/2023
Merged by: @pdevine

Base: mainHead: distribution


📝 Commits (9)

  • 86f3c1c basic distribution w/ push/pull
  • 48be784 add the parser
  • 6e2be5a add create, pull, and push
  • 0573eae changes to the parser, FROM line, and fix commands
  • 6228a5f mkdirp new manifest directories
  • be233da make blobs directory if it does not exist
  • 95cc9a1 fix go warnings
  • 2e1394e add progressbar for model pulls
  • e6d0062 move model struct

📊 Changes

7 files changed (+1154 additions, -214 deletions)

View changed files

📝 api/client.go (+26 -0)
📝 api/types.go (+36 -9)
📝 cmd/cmd.go (+87 -13)
parser/parser.go (+77 -0)
server/images.go (+842 -0)
server/models.go (+0 -128)
📝 server/routes.go (+86 -64)

📄 Description

First stab at getting distribution to work. This includes a replacement endpoint for "pull", and a new endpoint for "push". There is also a new "create" command which takes a "Modelfile" and parses it to create a new image.

There are a few things still missing right now:

  • the "push" and "pull" commands don't yet exist (only the API endpoints).
  • there is status being displayed for both push and pull, but it's not very granular yet (distribution supports the Range header, so we'll need to use that)
  • there is currently no way to list each of the models. You'll need to look in ~/.ollama/models/manifests to see a list of images that you have.
  • when creating images, the parser is very rudimentary and really only works w/ happy path.

🔄 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/78 **Author:** [@pdevine](https://github.com/pdevine) **Created:** 7/14/2023 **Status:** ✅ Merged **Merged:** 7/17/2023 **Merged by:** [@pdevine](https://github.com/pdevine) **Base:** `main` ← **Head:** `distribution` --- ### 📝 Commits (9) - [`86f3c1c`](https://github.com/ollama/ollama/commit/86f3c1c3b94fe26c5fec6322f1ee4ab6c9ab2b47) basic distribution w/ push/pull - [`48be784`](https://github.com/ollama/ollama/commit/48be78438a22bb599721bfc7537235fa6813bdb4) add the parser - [`6e2be5a`](https://github.com/ollama/ollama/commit/6e2be5a8a09efca05698dfe6fd9d5933d1c29295) add create, pull, and push - [`0573eae`](https://github.com/ollama/ollama/commit/0573eae4b4bc564b80536bbc117668741bc5e055) changes to the parser, FROM line, and fix commands - [`6228a5f`](https://github.com/ollama/ollama/commit/6228a5f39f37630b099f1bdd14bf70d91df0ad42) mkdirp new manifest directories - [`be233da`](https://github.com/ollama/ollama/commit/be233da145c1cd67659a7b819f768654801bf2c4) make `blobs` directory if it does not exist - [`95cc9a1`](https://github.com/ollama/ollama/commit/95cc9a11db1f977206f56337c5ec26ff0d4484e3) fix go warnings - [`2e1394e`](https://github.com/ollama/ollama/commit/2e1394e40526aba0fa868250bcafaf884a71bf71) add progressbar for model pulls - [`e6d0062`](https://github.com/ollama/ollama/commit/e6d0062c130ae2c62607bcabefb50e35aa6e7a88) move model struct ### 📊 Changes **7 files changed** (+1154 additions, -214 deletions) <details> <summary>View changed files</summary> 📝 `api/client.go` (+26 -0) 📝 `api/types.go` (+36 -9) 📝 `cmd/cmd.go` (+87 -13) ➕ `parser/parser.go` (+77 -0) ➕ `server/images.go` (+842 -0) ➖ `server/models.go` (+0 -128) 📝 `server/routes.go` (+86 -64) </details> ### 📄 Description First stab at getting distribution to work. This includes a replacement endpoint for "pull", and a new endpoint for "push". There is also a new "create" command which takes a "Modelfile" and parses it to create a new image. There are a few things still missing right now: * the "push" and "pull" commands don't yet exist (only the API endpoints). * there is status being displayed for both push and pull, but it's not very granular yet (distribution supports the Range header, so we'll need to use that) * there is currently no way to list each of the models. You'll need to look in `~/.ollama/models/manifests` to see a list of images that you have. * when creating images, the parser is very rudimentary and really only works w/ happy path. --- <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-12 22:49:00 -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#9969