fix flag
This commit is contained in:
1 parent
640d2a7345
commit
c054188d45
1 file changed
+4
-6
@@ -1,4 +1,4 @@
|
|||||||
# Stage 1: Build Ollama with Vulkan support for ARM64/AMD64
|
# Stage 1: Build Ollama with Vulkan support
|
||||||
FROM ubuntu:24.04 AS builder
|
FROM ubuntu:24.04 AS builder
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
@@ -16,8 +16,8 @@ RUN apt-get update && apt-get install -y \
|
|||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
RUN git clone --recursive https://github.com/ollama/ollama.git .
|
RUN git clone --recursive https://github.com/ollama/ollama.git .
|
||||||
|
|
||||||
# Configure and build using CMake for Vulkan backend support
|
# Configure CMake explicitly for Vulkan backend compilation
|
||||||
RUN cmake -B build -D CMAKE_BUILD_TYPE=Release -D OLLAMA_LLAMA_BACKENDS="vulkan"
|
RUN cmake -B build . -DOLLAMA_LLAMA_BACKENDS="vulkan"
|
||||||
RUN cmake --build build --parallel $(nproc)
|
RUN cmake --build build --parallel $(nproc)
|
||||||
|
|
||||||
# Build the final Go binary
|
# Build the final Go binary
|
||||||
@@ -35,10 +35,8 @@ RUN apt-get update && apt-get install -y \
|
|||||||
ca-certificates \
|
ca-certificates \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Copy the compiled binary from the builder stage
|
# Copy the compiled binary and backend libraries from builder stage
|
||||||
COPY --from=builder /app/ollama /usr/local/bin/ollama
|
COPY --from=builder /app/ollama /usr/local/bin/ollama
|
||||||
|
|
||||||
# Copy built backend libraries if generated under build output
|
|
||||||
COPY --from=builder /app/build/lib/ollama /usr/local/lib/ollama
|
COPY --from=builder /app/build/lib/ollama /usr/local/lib/ollama
|
||||||
|
|
||||||
EXPOSE 11434
|
EXPOSE 11434
|
||||||
|
|||||||
Reference in new issue
Block a user