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
9795b43d
"launcher/vscode:/vscode.git/clone" did not exist on "9d8f21cace66e8593bc559174de0eed3ecdab6a2"
Commit
9795b43d
authored
Sep 06, 2023
by
Michael Yang
Browse files
update dockerfile
parent
83c6be16
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
11 deletions
+13
-11
.dockerignore
.dockerignore
+1
-5
Dockerfile
Dockerfile
+12
-6
No files found.
.dockerignore
View file @
9795b43d
build
llama/build
.venv
.vscode
ollama
app
web
.env
llm/llama.cpp/ggml
Dockerfile
View file @
9795b43d
FROM
golang:1.20
FROM
golang:alpine
WORKDIR
/go/src/github.com/jmorganca/ollama
RUN
apk add
--no-cache
git build-base cmake
COPY
. .
RUN
CGO_ENABLED
=
1
go build
-ldflags
'-linkmode external -extldflags "-static"'
.
RUN
go generate ./...
&&
go build
-ldflags
'-linkmode external -extldflags "-static"'
.
FROM
alpine
COPY
--from=0 /go/src/github.com/jmorganca/ollama/ollama /bin/ollama
EXPOSE
11434
ENV
OLLAMA_HOST 0.0.0.0
RUN
apk add
--no-cache
libstdc++
ARG
USER=ollama
ARG
GROUP=ollama
RUN
addgroup
-g
1000
$GROUP
&&
adduser
-u
1000
-DG
$GROUP
$USER
RUN
addgroup
$GROUP
&&
adduser
-D
-G
$GROUP
$USER
COPY
--from=0 /go/src/github.com/jmorganca/ollama/ollama /bin/ollama
USER
$USER:$GROUP
ENTRYPOINT
["/bin/ollama"]
ENV
OLLAMA_HOST 0.0.0.0
CMD
["serve"]
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