mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-06-01 01:54:00 +00:00
Begin work on runpod configuration
This commit is contained in:
57
tooling/pipeline/runpod/Dockerfile
Normal file
57
tooling/pipeline/runpod/Dockerfile
Normal file
@@ -0,0 +1,57 @@
|
||||
# Phase 1: Pull prebuilt binaries
|
||||
FROM ghcr.io/ggml-org/llama.cpp:full-cuda AS llama-bin
|
||||
|
||||
# Phase 2: Building environment
|
||||
FROM nvidia/cuda:12.6.3-devel-ubuntu24.04
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive \
|
||||
CMAKE_GENERATOR=Ninja \
|
||||
APP_ROOT=/workspace/app \
|
||||
BUILD_DIR=/workspace/app/build
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
build-essential \
|
||||
ca-certificates \
|
||||
curl \
|
||||
git \
|
||||
libboost-json-dev \
|
||||
libboost-program-options-dev \
|
||||
libssl-dev \
|
||||
ninja-build \
|
||||
pkg-config \
|
||||
zlib1g-dev \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install modern CMake via curl (Ubuntu 24.04 'apt' version can be laggy)
|
||||
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 --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"
|
||||
|
||||
# Headers for C++ Build
|
||||
RUN git clone --depth 1 -b b9012 https://github.com/ggml-org/llama.cpp.git /tmp/llama-src && \
|
||||
cp -r /tmp/llama-src/include/* /usr/local/include/ && \
|
||||
cp -r /tmp/llama-src/ggml/include/* /usr/local/include/ && \
|
||||
rm -rf /tmp/llama-src
|
||||
|
||||
WORKDIR /workspace/app
|
||||
COPY . .
|
||||
|
||||
# Build the C++ pipeline
|
||||
RUN cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release && \
|
||||
cmake --build build -j$(nproc)
|
||||
|
||||
# Setup Start Script
|
||||
COPY runpod/start.sh /usr/local/bin/biergarten-start
|
||||
RUN chmod +x /usr/local/bin/biergarten-start
|
||||
|
||||
WORKDIR /workspace/app/build
|
||||
ENTRYPOINT ["/usr/local/bin/biergarten-start"]
|
||||
Reference in New Issue
Block a user