-
Notifications
You must be signed in to change notification settings - Fork 455
Updates the Go toolchain, application dependencies, and OS-level pack… #335
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| # === Stage 1: Build proxy server === | ||
| FROM golang:1.24-alpine as proxy_builder | ||
| FROM golang:1.24.13-alpine as proxy_builder | ||
| LABEL stage="proxy-builder" | ||
|
|
||
| # Create and change to the app directory. | ||
|
|
@@ -21,7 +21,7 @@ FROM ollama/ollama:latest as ollama_builder | |
| LABEL stage="ollama-builder" | ||
|
|
||
| # Install curl. It's used in the start_script.sh to check Ollama health status. | ||
| RUN apt-get update && apt-get install -y curl | ||
| RUN apt-get update && apt-get upgrade -y && apt-get install -y curl | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To optimize the Docker image size, it's a good practice to clean up the
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To reduce the final image size and potential attack surface, it's a best practice to clean up
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To optimize the Docker image size, it's a good practice to clean up the apt cache in the same |
||
|
|
||
| # Copy the proxy server binary to the ollama image. | ||
| COPY --from=proxy_builder /app/server /app/server | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,13 @@ | ||
| module cloudrungemma | ||
|
|
||
| go 1.24 | ||
| go 1.24.0 | ||
|
|
||
| toolchain go1.24.13 | ||
|
|
||
| require ( | ||
| cloud.google.com/go/ai v0.10.2 | ||
| github.com/openai/openai-go v0.1.0-beta.10 | ||
| google.golang.org/protobuf v1.36.6 | ||
| google.golang.org/protobuf v1.36.10 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is not true. https://pkg.go.dev/google.golang.org/protobuf?tab=versions v.1.36.10 exists. |
||
| ) | ||
|
|
||
| require ( | ||
|
|
@@ -14,10 +16,10 @@ require ( | |
| github.com/tidwall/match v1.1.1 // indirect | ||
| github.com/tidwall/pretty v1.2.1 // indirect | ||
| github.com/tidwall/sjson v1.2.5 // indirect | ||
| golang.org/x/net v0.39.0 // indirect | ||
| golang.org/x/sys v0.32.0 // indirect | ||
| golang.org/x/text v0.24.0 // indirect | ||
| google.golang.org/genproto/googleapis/api v0.0.0-20250414145226-207652e42e2e // indirect | ||
| google.golang.org/genproto/googleapis/rpc v0.0.0-20250414145226-207652e42e2e // indirect | ||
| google.golang.org/grpc v1.71.1 // indirect | ||
| golang.org/x/net v0.48.0 // indirect | ||
| golang.org/x/sys v0.39.0 // indirect | ||
| golang.org/x/text v0.32.0 // indirect | ||
| google.golang.org/genproto/googleapis/api v0.0.0-20251202230838-ff82c1b0f217 // indirect | ||
| google.golang.org/genproto/googleapis/rpc v0.0.0-20251202230838-ff82c1b0f217 // indirect | ||
| google.golang.org/grpc v1.79.3 // indirect | ||
|
Comment on lines
+19
to
+24
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The versions for these indirect dependencies appear to be invalid as they don't correspond to published versions. For example:
This will cause build failures. Please ensure all dependency versions are valid and published. |
||
| ) | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
proxy_builderstage uses an Alpine-based image, which usesmuslas its C standard library. The finalollama_builderstage is based onollama/ollama:latest, which is Ubuntu-based and usesglibc. A Go binary compiled on Alpine may be dynamically linked againstmusl(if CGO is used, which is the default for packages likenet/http), causing it to fail at runtime in theglibc-based environment due to library incompatibility.The pull request description mentions, "Switches to bullseye base image to ensure GLIBC compatibility," but this change wasn't applied. To ensure compatibility, you should switch to a
glibc-based builder image likebullseye.