Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Best effort to support ollama registry #882

Open
shizhMSFT opened this issue Feb 2, 2025 · 2 comments
Open

Best effort to support ollama registry #882

shizhMSFT opened this issue Feb 2, 2025 · 2 comments
Labels
question Further information is requested
Milestone

Comments

@shizhMSFT
Copy link
Contributor

Ollama registry registry.ollama.ai is a container registry with incomplete APIs (ollama/ollama#6510, ollama/ollama#5021, ollama/ollama#5298) and does not support auth (ollama/ollama#7244).

As tested, oras-go is able to fetch blobs but not able to fetch manifests since the ollama registry does not return Content-Length header. As the OCI distribution-spec states

A successful response SHOULD contain the size in bytes of the uploaded blob in the header Content-Length.

the presentation of Content-Length is not a MUST. Therefore, oras-go is allowed to support this scenario with security well assessed.

@shizhMSFT shizhMSFT added this to the v2.6.0 milestone Feb 2, 2025
@shizhMSFT shizhMSFT modified the milestones: v2.6.0, v2.7.0 Feb 2, 2025
@shizhMSFT shizhMSFT added the question Further information is requested label Feb 2, 2025
@shizhMSFT
Copy link
Contributor Author

One solution may be falling back to GET if HEAD manifest is 405 not allowed.

Since the fallback behavior may not be expected, we probably need an option (default to false) for that.

@shizhMSFT shizhMSFT modified the milestones: v2.7.0, future Feb 2, 2025
@shizhMSFT
Copy link
Contributor Author

Since ollama pull does not work with local registry well, let's put this issue in the backlog.

Here's the log with the distribution/distribution.

$ ollama pull --insecure localhost:5000/test/deepseek-r1:7b
pulling manifest
Error: http: no Location header in response

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants