Azure Container build failed #1022

Closed
opened 2025-11-12 09:55:34 -06:00 by GiteaMirror · 5 comments
Owner

Originally created by @questsin on GitHub (Jan 4, 2024).

Originally assigned to: @dhiltgen on GitHub.

failed to build on Azure Containers

2024-01-04 16:33:33.786 [info] Step 6/21 : ADD https://dl.google.com/go/go1.21.3.linux-$TARGETARCH.tar.gz /tmp/go1.21.3.tar.gz
2024-01-04 16:33:33.786 [info] ADD failed: failed to GET https://dl.google.com/go/go1.21.3.linux-.tar.gz with status 404 Not Found:
2024-01-04 16:33:33.787 [info] <html lang=en>
2024-01-04 16:33:33.787 [info]
2024-01-04 16:33:33.787 [info]
2024-01-04 16:33:33.787 [info]
2024-01-04 16:33:33.787 [info] <style>
2024-01-04 16:33:33.787 [info] *{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;

Originally created by @questsin on GitHub (Jan 4, 2024). Originally assigned to: @dhiltgen on GitHub. failed to build on Azure Containers 2024-01-04 16:33:33.786 [info] Step 6/21 : ADD https://dl.google.com/go/go1.21.3.linux-$TARGETARCH.tar.gz /tmp/go1.21.3.tar.gz 2024-01-04 16:33:33.786 [info] ADD failed: failed to GET https://dl.google.com/go/go1.21.3.linux-.tar.gz with status 404 Not Found: <!DOCTYPE html> 2024-01-04 16:33:33.787 [info] <html lang=en> 2024-01-04 16:33:33.787 [info] <meta charset=utf-8> 2024-01-04 16:33:33.787 [info] <meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width"> 2024-01-04 16:33:33.787 [info] <title>Error 404 (Not Found)!!1</title> 2024-01-04 16:33:33.787 [info] <style> 2024-01-04 16:33:33.787 [info] *{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;
Author
Owner

@igorschlum commented on GitHub (Jan 4, 2024):

@questsin I see that you have issues compiling in Go on Azure. Are you able to build a sample go application? If not the problem should be reported to Azure or Go, but not in the Ollama forum, even if at the end you want to build Ollama.

@igorschlum commented on GitHub (Jan 4, 2024): @questsin I see that you have issues compiling in Go on Azure. Are you able to build a sample go application? If not the problem should be reported to Azure or Go, but not in the Ollama forum, even if at the end you want to build Ollama.
Author
Owner

@questsin commented on GitHub (Jan 4, 2024):

Or it could be a dockerfile coding error

@questsin commented on GitHub (Jan 4, 2024): Or it could be a dockerfile coding error
Author
Owner

@igorschlum commented on GitHub (Jan 5, 2024):

OK, in this page : https://go.dev/dl/

We can see that the latest version of go is version 1.21.5
If I change the number in the link, I still have a 404 : https://dl.google.com/go/go1.21.5.linux-.tar.gz

On the download page, the type of processor has to be spécified for linux.

@igorschlum commented on GitHub (Jan 5, 2024): OK, in this page : https://go.dev/dl/ We can see that the latest version of go is version 1.21.5 If I change the number in the link, I still have a 404 : https://dl.google.com/go/go1.21.5.linux-.tar.gz On the download page, the type of processor has to be spécified for linux.
Author
Owner

@dhiltgen commented on GitHub (Jan 7, 2024):

I believe you're trying to use the Dockerfile in the top of the source tree. We're using buildkit capabilities to be able to cross-compile for both x86 and arm. See https://docs.docker.com/engine/reference/builder/#automatic-platform-args-in-the-global-scope

In the Dockerfile https://github.com/jmorganca/ollama/blob/main/Dockerfile#L3 sets the target architecture, which then expands in the Go binary to download https://github.com/jmorganca/ollama/blob/main/Dockerfile#L8
It appears that the way you're building the Dockerfile isn't setting this build arg. I haven't used Azure containers, but my suspicion is it may be a different builder than buildkit and not setting these build args automatically.

You might want to try building with https://github.com/jmorganca/ollama/blob/main/scripts/build_docker.sh or you could try to pass the args explicitly via --build-arg TARGETARCH=amd64 or the equivalent.

@dhiltgen commented on GitHub (Jan 7, 2024): I believe you're trying to use the Dockerfile in the top of the source tree. We're using buildkit capabilities to be able to cross-compile for both x86 and arm. See https://docs.docker.com/engine/reference/builder/#automatic-platform-args-in-the-global-scope In the Dockerfile https://github.com/jmorganca/ollama/blob/main/Dockerfile#L3 sets the target architecture, which then expands in the Go binary to download https://github.com/jmorganca/ollama/blob/main/Dockerfile#L8 It appears that the way you're building the Dockerfile isn't setting this build arg. I haven't used Azure containers, but my suspicion is it may be a different builder than buildkit and not setting these build args automatically. You might want to try building with https://github.com/jmorganca/ollama/blob/main/scripts/build_docker.sh or you could try to pass the args explicitly via `--build-arg TARGETARCH=amd64` or the equivalent.
Author
Owner

@dhiltgen commented on GitHub (Mar 12, 2024):

If you're still having trouble building, let us know.

@dhiltgen commented on GitHub (Mar 12, 2024): If you're still having trouble building, let us know.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama-ollama#1022