[GH-ISSUE #3685] FROM . in Modelfile creates invalid model #2269

Closed
opened 2026-04-12 12:32:24 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @jmorganca on GitHub (Apr 17, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/3685

What is the issue?

When including FROM . in a Modelfile, an incorrect Modelfile will be generated if . elsewhere:

ollama show octopus --modelfile
# Modelfile generated by "ollama show"
# To build a new Modelfile based on this one, replace the FROM line with:
# FROM octopus:latest

FROM /Users/jmorgan/.ollama/models/blobs/sha256-33fdea506a5c3f5fde0112d8b8f50c4c009da49469c9bc2ffa973963e445f898
TEMPLATE """{{ @sha256:4e4d269e842069af0c07482684ed8779104f3ecf7cded7a1edd432a1bff54effSystem }}

Query: {{ @sha256:4e4d269e842069af0c07482684ed8779104f3ecf7cded7a1edd432a1bff54effPrompt }}

Response: {{ @sha256:4e4d269e842069af0c07482684ed8779104f3ecf7cded7a1edd432a1bff54effResponse }}"""
SYSTEM """Below is the query from the users, please call the correct function and generate the parameters to call the function@sha256:4e4d269e842069af0c07482684ed8779104f3ecf7cded7a1edd432a1bff54eff"""

What did you expect to see?

No response

Steps to reproduce

No response

Are there any recent changes that introduced the issue?

No response

OS

No response

Architecture

No response

Platform

No response

Ollama version

No response

GPU

No response

GPU info

No response

CPU

No response

Other software

No response

Originally created by @jmorganca on GitHub (Apr 17, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/3685 ### What is the issue? When including `FROM .` in a Modelfile, an incorrect Modelfile will be generated if `.` elsewhere: ``` ollama show octopus --modelfile # Modelfile generated by "ollama show" # To build a new Modelfile based on this one, replace the FROM line with: # FROM octopus:latest FROM /Users/jmorgan/.ollama/models/blobs/sha256-33fdea506a5c3f5fde0112d8b8f50c4c009da49469c9bc2ffa973963e445f898 TEMPLATE """{{ @sha256:4e4d269e842069af0c07482684ed8779104f3ecf7cded7a1edd432a1bff54effSystem }} Query: {{ @sha256:4e4d269e842069af0c07482684ed8779104f3ecf7cded7a1edd432a1bff54effPrompt }} Response: {{ @sha256:4e4d269e842069af0c07482684ed8779104f3ecf7cded7a1edd432a1bff54effResponse }}""" SYSTEM """Below is the query from the users, please call the correct function and generate the parameters to call the function@sha256:4e4d269e842069af0c07482684ed8779104f3ecf7cded7a1edd432a1bff54eff""" ``` ### What did you expect to see? _No response_ ### Steps to reproduce _No response_ ### Are there any recent changes that introduced the issue? _No response_ ### OS _No response_ ### Architecture _No response_ ### Platform _No response_ ### Ollama version _No response_ ### GPU _No response_ ### GPU info _No response_ ### CPU _No response_ ### Other software _No response_
GiteaMirror added the bug label 2026-04-12 12:32:24 -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#2269