Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ollama
Commits
b428ddd7
"git@developer.sourcefind.cn:OpenDAS/torch-sparce.git" did not exist on "ceb47f1d7678d2f155144abd3e0eefb24684d35e"
Commit
b428ddd7
authored
Mar 03, 2025
by
Michael Yang
Browse files
docker: use go version from go.mod
parent
ba7d3124
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
Dockerfile
Dockerfile
+4
-3
No files found.
Dockerfile
View file @
b428ddd7
...
@@ -86,10 +86,11 @@ RUN --mount=type=cache,target=/root/.ccache \
...
@@ -86,10 +86,11 @@ RUN --mount=type=cache,target=/root/.ccache \
&&
cmake
--install
build
--component
CUDA
--strip
--parallel
8
&&
cmake
--install
build
--component
CUDA
--strip
--parallel
8
FROM
base AS build
FROM
base AS build
ARG
GOVERSION=1.23.4
RUN
curl
-fsSL
https://golang.org/dl/go
${
GOVERSION
}
.linux-
$(
case
$(
uname
-m
)
in
x86_64
)
echo
amd64
;;
aarch64
)
echo
arm64
;;
esac
)
.tar.gz |
tar
xz
-C
/usr/local
ENV
PATH=/usr/local/go/bin:$PATH
WORKDIR
/go/src/github.com/ollama/ollama
WORKDIR
/go/src/github.com/ollama/ollama
COPY
go.mod go.sum .
RUN
curl
-fsSL
https://golang.org/dl/go
$(
awk
'/^go/ { print $2 }'
go.mod
)
.linux-
$(
case
$(
uname
-m
)
in
x86_64
)
echo
amd64
;;
aarch64
)
echo
arm64
;;
esac
)
.tar.gz |
tar
xz
-C
/usr/local
ENV
PATH=/usr/local/go/bin:$PATH
RUN
go mod download
COPY
. .
COPY
. .
ARG
GOFLAGS="'-ldflags=-w -s'"
ARG
GOFLAGS="'-ldflags=-w -s'"
ENV
CGO_ENABLED=1
ENV
CGO_ENABLED=1
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment