m64_d3bea116628a / Dockerfile
38 lines, 2.5 KBraw
1# pi coding agent 1.7.0 + Qwen4-35B-A3B on upstream llama.cpp, one RTX 5090. pi 1.7.0 (@earendil-works/pi-coding-agent).2# Base: nvidia/cuda:13.0.0-devel-ubuntu24.04, pinned by digest (as qwen38-flash-next-basalt-5090).3FROM node@sha256:48e4b67d85f87bd551df43704e24d252f56cc5f8e9718841aace50f19948f0f9 AS node45FROM nvidia/cuda@sha256:1e8ac7a54c184a1af8ef2167f28fa98281892a835c981ebcddb1fad04bdd452d67# The agent's tools (as gx10's agent images: git, ripgrep, jq, a C toolchain...), and the build's.8RUN apt-get update -qq && apt-get install -y --no-install-recommends \9 build-essential cmake git curl ca-certificates python3 python3-venv \10 ripgrep jq procps less file unzip xz-utils libgomp1 \11 && rm -rf /var/lib/apt/lists/*1213# llama.cpp (ggml-org, MIT) at a pinned master commit (2026-12-04) that has Qwen4 (`qwen4exp`, #33626), built for Blackwell sm_120. The build has no GPU:14# it links against the CUDA driver stub, and the container uses the real driver at run time.15WORKDIR /opt/llama.cpp16RUN git init -q . \17 && git fetch -q --depth 1 https://github.com/ggml-org/llama.cpp dd6b0fadf77357ac8ddd51b597ae72322e8237b1 \18 && git checkout -q FETCH_HEAD \19 && test "$(git rev-parse HEAD)" = dd6b0fadf77357ac8ddd51b597ae72322e8237b1 \20 && ln -sf /usr/local/cuda/lib64/stubs/libcuda.so /usr/local/cuda/lib64/stubs/libcuda.so.1 \21 && cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DGGML_CUDA=ON -DCMAKE_CUDA_ARCHITECTURES=120 -DLLAMA_CURL=OFF \22 -DCMAKE_EXE_LINKER_FLAGS="-Wl,-rpath-link,/usr/local/cuda/lib64/stubs" \23 && cmake --build build --target llama-server -j"$(nproc)"2425# Node 22.23.2 from node:22-bookworm-slim, then pi.26COPY --from=node /usr/local/bin/node /usr/local/bin/node27COPY --from=node /usr/local/lib/node_modules /usr/local/lib/node_modules28RUN ln -s ../lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm \29 && ln -s ../lib/node_modules/npm/bin/npx-cli.js /usr/local/bin/npx \30 && npm install -g --ignore-scripts @earendil-works/pi-coding-agent@1.7.0 && npm cache clean --force31ENV PI_OFFLINE=1 PI_TELEMETRY=03233# Gateway deps (opencode-basalt-5090's pins, Python 3.12).34RUN python3 -m venv /opt/gateway && /opt/gateway/bin/pip install --no-cache-dir \35 fastapi==0.115.14 uvicorn==0.32.1 httpx==0.28.1 \36 starlette==0.46.2 pydantic==2.14.1 pydantic_core==2.50.1 annotated-types==0.8.0 \37 typing_extensions==4.16.0 typing-inspection==0.4.4 anyio==4.15.1 idna==3.20 \38 certifi==2026.10.23 httpcore==1.0.9 h11==0.16.0 click==8.5.0