motif64

m64_5deb4065b1cf / Dockerfile

40 lines, 2.6 KBraw
1# qwen38-flash-next-llamacpp-gb10: llama.cpp v1.0.0 (github.com/ggml-org/llama.cpp, MIT), built for the DGX2# Spark's GB10 (linux-aarch64, sm_121) with CUDA 13. v1.0.0 is the first release with the `qwen4exp`3# architecture (Qwen3.8-Flash-Next: hyper-connections, the PLE n-gram table read lazily from its own shard) and4# the qwen3vl_merger picture reader.5#6# Build stage: NVIDIA's PyTorch 25.x container (Ubuntu 24.04, CUDA 13.0, nvcc with compute_121, cmake 3.31),7# pinned by digest; only its toolchain is used. The source is the v1.0.0 tag's commit, checked by SHA-256.8# No web UI (LLAMA_USE_PREBUILT_UI would download one at build time; the capsule has its own page).9FROM nvcr.io/nvidia/pytorch@sha256:f3b4a33fd60d5e0358287bb44d57e91eda45e8f1681fef1bfd6c969371417130 AS build10ARG LLAMA_COMMIT=a6d1a74dbebce3a16f4f2ceddbf38c21a08d867411ARG LLAMA_SHA256=5f2e8db8f5ddac1582bc702c0c22b59f1795a7e6de8387c3db22e5840725665b12RUN set -e; cd /tmp; \13    curl -fsSL -o src.tgz "https://github.com/ggml-org/llama.cpp/archive/$LLAMA_COMMIT.tar.gz"; \14    echo "$LLAMA_SHA256  src.tgz" | sha256sum -c -; \15    tar xzf src.tgz; mv "llama.cpp-$LLAMA_COMMIT" /src; rm src.tgz16WORKDIR /src17RUN cmake -B build -DCMAKE_BUILD_TYPE=Release \18      -DGGML_CUDA=ON -DCMAKE_CUDA_ARCHITECTURES=121 -DGGML_NATIVE=OFF -DGGML_CUDA_NCCL=OFF \19      -DBUILD_SHARED_LIBS=OFF -DLLAMA_BUILD_TESTS=OFF -DLLAMA_BUILD_EXAMPLES=OFF \20      -DLLAMA_BUILD_UI=OFF -DLLAMA_USE_PREBUILT_UI=OFF -DLLAMA_OPENSSL=OFF \21 && cmake --build build --config Release -j"$(nproc)" --target llama-server \22 && mkdir -p /out/bin /out/lib \23 && cp build/bin/llama-server /out/bin/ \24 && cp -a /usr/local/cuda/lib64/libcudart.so.13* /usr/local/cuda/lib64/libcublas.so.13* \25          /usr/local/cuda/lib64/libcublasLt.so.13* /out/lib/ \26 && cp LICENSE /out/LICENSE.llama.cpp2728# Runtime: ubuntu:24.04 (arm64), pinned by digest, with the server and the three CUDA libraries it links.29FROM ubuntu@sha256:c92376659a7f14cc1f51615d73c9f4b7d8e18d59f370e02b4ed683ab4485c66c30ENV DEBIAN_FRONTEND=noninteractive31RUN apt-get update \32 && apt-get install -y --no-install-recommends ca-certificates curl libgomp1 python3 \33 && rm -rf /var/lib/apt/lists/* /var/cache/apt/*34COPY --from=build /out/bin/llama-server /opt/llama/bin/llama-server35COPY --from=build /out/lib/ /opt/llama/lib/36COPY --from=build /out/LICENSE.llama.cpp /opt/llama/37ENV LD_LIBRARY_PATH=/opt/llama/lib PYTHONUNBUFFERED=1 LANG=C.UTF-8 \38    NVIDIA_VISIBLE_DEVICES=all NVIDIA_DRIVER_CAPABILITIES=compute,utility39# Every library resolves except libcuda.so.1, which the NVIDIA runtime mounts from the driver at start.40RUN ! ldd /opt/llama/bin/llama-server | grep 'not found' | grep -v 'libcuda\.so\.1'