mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-06-01 10:04:00 +00:00
updates
This commit is contained in:
@@ -26,15 +26,10 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
RUN curl -L https://github.com/Kitware/CMake/releases/download/v3.31.0/cmake-3.31.0-linux-x86_64.sh -o cmake.sh && \
|
||||
sh cmake.sh --skip-license --prefix=/usr/local && rm cmake.sh
|
||||
|
||||
# Copy and link backends
|
||||
# Copy backends to /usr/local/lib and register with ldconfig so the
|
||||
# runtime linker can resolve libllama.so, libggml.so, libggml-base.so etc.
|
||||
COPY --from=llama-bin /app/lib*.so* /usr/local/lib/
|
||||
RUN ldconfig && \
|
||||
find /usr/local/lib -name "libggml-cuda.so*" -exec ln -s {} /usr/local/lib/libggml-cuda.so \; 2>/dev/null || true && \
|
||||
find /usr/local/lib -name "libggml-cpu.so*" -exec ln -s {} /usr/local/lib/libggml-cpu.so \; 2>/dev/null || true
|
||||
|
||||
# Set Environment for the loader
|
||||
ENV GGML_BACKEND_PATH="/usr/local/lib"
|
||||
ENV LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH"
|
||||
RUN ldconfig
|
||||
|
||||
# Headers for C++ Build
|
||||
RUN git clone --depth 1 -b b9012 https://github.com/ggml-org/llama.cpp.git /tmp/llama-src && \
|
||||
@@ -42,6 +37,8 @@ RUN git clone --depth 1 -b b9012 https://github.com/ggml-org/llama.cpp.git /tmp/
|
||||
cp -r /tmp/llama-src/ggml/include/* /usr/local/include/ && \
|
||||
rm -rf /tmp/llama-src
|
||||
|
||||
ENV LD_LIBRARY_PATH="/usr/local/lib:${LD_LIBRARY_PATH}"
|
||||
|
||||
WORKDIR /workspace/app
|
||||
COPY . .
|
||||
|
||||
@@ -49,6 +46,17 @@ COPY . .
|
||||
RUN cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release && \
|
||||
cmake --build build -j$(nproc)
|
||||
|
||||
# Co-locate GGML backend plugins with the executable.
|
||||
# ggml_backend_load_all() searches the executable directory first when
|
||||
# GGML_BACKEND_DIR is not set. Copying the ggml-*.so plugin files here
|
||||
# ensures the loader finds them without any environment variable.
|
||||
# libllama.so, libggml.so, and libggml-base.so are NOT copied here —
|
||||
# those are proper shared libraries resolved via ldconfig/LD_LIBRARY_PATH.
|
||||
RUN cp /usr/local/lib/libggml-cuda.so /workspace/app/build/ 2>/dev/null || true && \
|
||||
cp /usr/local/lib/libggml-cpu*.so /workspace/app/build/ 2>/dev/null || true && \
|
||||
cp /usr/local/lib/libggml-blas*.so /workspace/app/build/ 2>/dev/null || true && \
|
||||
cp /usr/local/lib/libggml-rpc*.so /workspace/app/build/ 2>/dev/null || true
|
||||
|
||||
# Setup Start Script
|
||||
COPY runpod/start.sh /usr/local/bin/biergarten-start
|
||||
RUN chmod +x /usr/local/bin/biergarten-start
|
||||
|
||||
Reference in New Issue
Block a user