[GH-ISSUE #5711] Wrong version in UI with custom build #50069

Closed
opened 2026-04-28 13:59:07 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @regularRandom on GitHub (Jul 15, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/5711

What is the issue?

I use open-webui for Ollama server. When I run the official release build from Github UI shows correct version, like 0.2.5. But when I run my custom-built Ollama it shows 0.0.0, regardless of branch - main or tag.

Screenshot 2024-07-15 185943

OS

Linux

GPU

Nvidia

CPU

Intel

Ollama version

0.0.0

Originally created by @regularRandom on GitHub (Jul 15, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/5711 ### What is the issue? I use open-webui for Ollama server. When I run the official release build from Github UI shows correct version, like 0.2.5. But when I run my custom-built Ollama it shows 0.0.0, regardless of branch - main or tag. ![Screenshot 2024-07-15 185943](https://github.com/user-attachments/assets/71daf543-16f4-41c9-9eb5-44dfb346dff0) ### OS Linux ### GPU Nvidia ### CPU Intel ### Ollama version 0.0.0
GiteaMirror added the bug label 2026-04-28 13:59:07 -05:00
Author
Owner

@rick-github commented on GitHub (Jul 16, 2024):

The version is inserted during the release build process. You can set the variables yourself if you want to override the default of "0.0.0":

#!/bin/bash

VERSION=$1

export VERSION=${VERSION:-$(git describe --tags --first-parent --abbrev=7 --long --dirty --always | sed -e "s/^v//g")}
export GOFLAGS="'-ldflags=-w -s \"-X=github.com/ollama/ollama/version.Version=$VERSION\" \"-X=github.com/ollama/ollama/server.mode=release\"'"

docker build --build-arg=VERSION --build-arg=GOFLAGS -f Dockerfile -t ollama:$VERSION .
$ ./build-ollama my.version
...
 => => naming to docker.io/library/ollama:my.version                                                                               0.0s
$ docker image ls ollama
REPOSITORY   TAG          IMAGE ID       CREATED          SIZE
ollama       my.version   42d5efd1fe19   21 seconds ago   639MB
$ docker run --rm --env OLLAMA_HOST=ollama:11434 ollama:my.version -v
ollama version is 0.2.1
Warning: client version is my.version
<!-- gh-comment-id:2230617028 --> @rick-github commented on GitHub (Jul 16, 2024): The version is inserted during the release build process. You can set the variables yourself if you want to override the default of "0.0.0": ```sh #!/bin/bash VERSION=$1 export VERSION=${VERSION:-$(git describe --tags --first-parent --abbrev=7 --long --dirty --always | sed -e "s/^v//g")} export GOFLAGS="'-ldflags=-w -s \"-X=github.com/ollama/ollama/version.Version=$VERSION\" \"-X=github.com/ollama/ollama/server.mode=release\"'" docker build --build-arg=VERSION --build-arg=GOFLAGS -f Dockerfile -t ollama:$VERSION . ``` ``` $ ./build-ollama my.version ... => => naming to docker.io/library/ollama:my.version 0.0s $ docker image ls ollama REPOSITORY TAG IMAGE ID CREATED SIZE ollama my.version 42d5efd1fe19 21 seconds ago 639MB $ docker run --rm --env OLLAMA_HOST=ollama:11434 ollama:my.version -v ollama version is 0.2.1 Warning: client version is my.version ```
Author
Owner

@pdevine commented on GitHub (Jul 16, 2024):

@rick-github has the correct answer. The 0.0.0 version is correct for development builds.

<!-- gh-comment-id:2231473911 --> @pdevine commented on GitHub (Jul 16, 2024): @rick-github has the correct answer. The `0.0.0` version is correct for development builds.
Author
Owner

@regularRandom commented on GitHub (Jul 17, 2024):

@rick-github Yes, that works, thank you.

image

One observation - it still shows warning when I run it from the command line:

ollama version is 0.0.0
Warning: client version is 0.2.5-14-g499e87c

<!-- gh-comment-id:2232040162 --> @regularRandom commented on GitHub (Jul 17, 2024): @rick-github Yes, that works, thank you. <img width="176" alt="image" src="https://github.com/user-attachments/assets/edc419a9-5d7b-410e-80fe-35472480eab5"> One observation - it still shows warning when I run it from the command line: ollama version is 0.0.0 Warning: client version is 0.2.5-14-g499e87c
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#50069