fix dockerfile
This commit is contained in:
parent
97ab37095d
commit
fdb93ef2aa
1 changed files with 3 additions and 3 deletions
|
@ -2,15 +2,15 @@ FROM golang:1.20
|
|||
RUN apt-get update && apt-get install -y cmake
|
||||
WORKDIR /go/src/github.com/jmorganca/ollama
|
||||
COPY . .
|
||||
RUN go generate ./...
|
||||
RUN cmake -S llama -B llama/build && cmake --build llama/build
|
||||
RUN CGO_ENABLED=1 go build -ldflags '-linkmode external -extldflags "-static"' .
|
||||
|
||||
FROM alpine
|
||||
COPY --from=0 /go/src/github.com/jmorganca/ollama/ollama /bin/ollama
|
||||
EXPOSE 80
|
||||
EXPOSE 443
|
||||
EXPOSE 11434
|
||||
ARG USER=ollama
|
||||
ARG GROUP=ollama
|
||||
RUN addgroup -g 1000 $GROUP && adduser -u 1000 -DG $GROUP $USER
|
||||
USER $USER:$GROUP
|
||||
ENTRYPOINT ["/bin/ollama"]
|
||||
CMD ["serve"]
|
||||
|
|
Loading…
Reference in a new issue