m64_fd6b2982ea67 / Dockerfile
59 lines, 3.0 KBraw
1# opencode (1.18.23) + a small control gateway, driving Qwen3.8-Flash-Next on Basalt in the2# same container. The first two RUN steps are qwen38-flash-next-basalt-5090's, line for line,3# so Docker reuses that build.4#5# Basalt (github.com/jesdga95/basalt, MIT): a Strata fork tuned for Qwen3.8-Flash-Next on6# Blackwell sm_120 (the RTX 5090). Base: nvidia/cuda:13.0.0-devel-ubuntu24.04, pinned by digest.7FROM node@sha256:48e4b67d85f87bd551df43704e24d252f56cc5f8e9718841aace50f19948f0f9 AS node89FROM nvidia/cuda@sha256:1e8ac7a54c184a1af8ef2167f28fa98281892a835c981ebcddb1fad04bdd452d1011RUN apt-get update && apt-get install -y --no-install-recommends \12 build-essential cmake git curl ca-certificates \13 python3 python3-pip \14 && rm -rf /var/lib/apt/lists/*1516WORKDIR /opt/basalt17RUN git init -q . \18 && git fetch -q --depth 1 https://github.com/jesdga95/basalt 5b7eff1677ce90a3e2be61c913aa7f880d46ac1e \19 && git checkout -q FETCH_HEAD \20 && test "$(git rev-parse HEAD)" = 5b7eff1677ce90a3e2be61c913aa7f880d46ac1e2122# The commit's requirements.txt, spelled out so the pins are visible here (Python 3.12).23RUN cmake -S . -B build -DCMAKE_BUILD_TYPE=Release \24 && cmake --build build -j"$(nproc)" \25 && python3 -m pip install --no-cache-dir --break-system-packages \26 numpy==2.5.3 jinja2==3.1.6 markupsafe==3.0.3 regex==2026.9.10 pyyaml==6.0.3 \27 tqdm==4.70.1 pillow==12.3.0 psutil==7.2.22829# --- opencode side (the opencode-dsflash capsule's tools, on Ubuntu 24.04) -----------------3031RUN apt-get update -qq && apt-get install -y --no-install-recommends \32 ripgrep jq python3-venv procps less file unzip ttyd \33 && rm -rf /var/lib/apt/lists/*3435# Node 22.23.2 from node:22-bookworm-slim (glibc 2.36; this Ubuntu has 2.39).36COPY --from=node /usr/local/bin/node /usr/local/bin/node37COPY --from=node /usr/local/lib/node_modules /usr/local/lib/node_modules38RUN ln -s ../lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm \39 && ln -s ../lib/node_modules/npm/bin/npx-cli.js /usr/local/bin/npx \40 && npm install -g opencode-ai@1.18.23 && npm cache clean --force4142# Gateway deps, the same pins as opencode-dsflash's gateway, resolved for Python 3.12.43RUN python3 -m venv /opt/gateway && /opt/gateway/bin/pip install --no-cache-dir \44 fastapi==0.115.14 uvicorn==0.32.1 httpx==0.28.1 \45 starlette==0.46.2 pydantic==2.14.1 pydantic_core==2.50.1 annotated-types==0.8.0 \46 typing_extensions==4.16.0 typing-inspection==0.4.4 anyio==4.15.1 idna==3.20 \47 certifi==2026.10.23 httpcore==1.0.9 h11==0.16.0 click==8.5.04849# Everything opencode would otherwise fetch at run time is disabled; the npm packages it50# installs on a project's first use are warmed here, where the build has network.51ENV OPENCODE_DISABLE_AUTOUPDATE=1 \52 OPENCODE_DISABLE_LSP_DOWNLOAD=1 \53 OPENCODE_DISABLE_MODELS_FETCH=1 \54 OPENCODE_DISABLE_SHARE=155COPY opencode.json /etc/opencode/opencode.json56COPY warm_opencode.sh /tmp/warm_opencode.sh57RUN bash /tmp/warm_opencode.sh && rm /tmp/warm_opencode.sh5859WORKDIR /scratch