f
This commit is contained in:
1 parent
d1c76bc10d
commit
c08ca3bf7c
1 file changed
+5
-4
@@ -18,9 +18,9 @@ RUN apt-get update && apt-get install -y \
|
||||
WORKDIR /app
|
||||
RUN git clone --recursive https://github.com/ollama/ollama.git .
|
||||
|
||||
# Correctly target Ollama's embedded llama.cpp path with Vulkan enabled
|
||||
RUN cmake -S llm/llama.cpp -B build/vulkan -DGGML_VULKAN=ON -DCMAKE_BUILD_TYPE=Release
|
||||
RUN cmake --build build/vulkan --parallel $(nproc)
|
||||
# Configure and build using Ollama's native Vulkan backend flag
|
||||
RUN cmake -B build . -DOLLAMA_LLAMA_BACKENDS="vulkan" -DCMAKE_BUILD_TYPE=Release
|
||||
RUN cmake --build build --parallel $(nproc)
|
||||
|
||||
# Build the main Go application binary
|
||||
RUN go build -o ollama .
|
||||
@@ -37,8 +37,9 @@ RUN apt-get update && apt-get install -y \
|
||||
ca-certificates \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Copy the compiled Go binary
|
||||
# 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
|
||||
ENV OLLAMA_HOST=0.0.0.0:11434
|
||||
|
||||
Reference in new issue
Block a user