use the builder for all the dependancies
This commit is contained in:
1 parent
e8b2e4cb32
commit
7bd402b08e
1 file changed
+1
-16
+1
-16
@@ -36,22 +36,7 @@ RUN cmake --build build --parallel 16
|
|||||||
# Build the main Go application binary
|
# Build the main Go application binary
|
||||||
RUN go build -o ollama .
|
RUN go build -o ollama .
|
||||||
|
|
||||||
# Stage 2: Minimal Runtime Image
|
# Start the server
|
||||||
FROM ubuntu:24.04
|
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y \
|
|
||||||
libvulkan1 \
|
|
||||||
mesa-vulkan-drivers \
|
|
||||||
vulkan-tools \
|
|
||||||
ca-certificates \
|
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
# Copy the compiled Go binary and generated native backend libraries
|
|
||||||
COPY --from=builder /app/ollama /usr/local/bin/ollama
|
|
||||||
COPY --from=builder /app/build/lib/ollama /usr/local/lib/ollama
|
|
||||||
|
|
||||||
EXPOSE 11434
|
EXPOSE 11434
|
||||||
ENV OLLAMA_HOST=0.0.0.0:11434
|
ENV OLLAMA_HOST=0.0.0.0:11434
|
||||||
ENV OLLAMA_MODELS=/root/.ollama/models
|
ENV OLLAMA_MODELS=/root/.ollama/models
|
||||||
|
|||||||
Reference in new issue
Block a user