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
e1f9ced5
Unverified
Commit
e1f9ced5
authored
Sep 06, 2023
by
Michael Yang
Committed by
GitHub
Sep 06, 2023
Browse files
Merge pull request #479 from jmorganca/mxyng/dockerfile
update dockerfile
parents
0980d5c7
9795b43d
Changes
2
Show 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 @
e1f9ced5
build
llama/build
.venv
.vscode
.vscode
ollama
ollama
app
app
web
llm/llama.cpp/ggml
.env
Dockerfile
View file @
e1f9ced5
FROM
golang:1.20
FROM
golang:alpine
WORKDIR
/go/src/github.com/jmorganca/ollama
WORKDIR
/go/src/github.com/jmorganca/ollama
RUN
apk add
--no-cache
git build-base cmake
COPY
. .
COPY
. .
RUN
CGO_ENABLED
=
1
go build
-ldflags
'-linkmode external -extldflags "-static"'
.
RUN
go generate ./...
&&
go build
-ldflags
'-linkmode external -extldflags "-static"'
.
FROM
alpine
FROM
alpine
COPY
--from=0 /go/src/github.com/jmorganca/ollama/ollama /bin/ollama
ENV
OLLAMA_HOST 0.0.0.0
EXPOSE
11434
RUN
apk add
--no-cache
libstdc++
ARG
USER=ollama
ARG
USER=ollama
ARG
GROUP=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
USER
$USER:$GROUP
ENTRYPOINT
["/bin/ollama"]
ENTRYPOINT
["/bin/ollama"]
ENV
OLLAMA_HOST 0.0.0.0
CMD
["serve"]
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