Commit 6292f4b6 authored by Jeffrey Morgan's avatar Jeffrey Morgan
Browse files

update `Dockerfile`

parent 02401653
build
llama/build
.venv
.vscode
ollama
app
web
\ No newline at end of file
FROM python:3-slim-bullseye
RUN apt-get update && apt-get install -y build-essential gcc ninja-build libopenblas-dev
RUN python -m pip install --upgrade pip setuptools
RUN CMAKE_ARGS="-DLLAMA_OPENBLAS=on" FORCE_CMAKE=1 pip install ollama
ENTRYPOINT ["ollama"]
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 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
ARG USER=ollama
ARG GROUP=ollama
RUN addgroup -g 1000 $GROUP && adduser -u 1000 -DG $GROUP $USER
USER $USER:$GROUP
ENTRYPOINT ["/bin/ollama"]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment