# The "extended" image: the delivery image plus the options it leaves out because of their # licence, the origin of their data, or their size. Each option is one build argument, off by # default; anything not listed here is not part of what we build or test. # # docker build -f delivery/Dockerfile.extended \ # --build-arg WITH_CLAUDE=1 --build-arg WITH_CURSOR=1 \ # --build-arg WITH_NAMES=1 --build-arg WITH_FASTAI=1 \ # -t parleml-extended . # # Option Why it is not in the standard image What it adds # WITH_CLAUDE=1 Claude Code is "All rights reserved" (Anthropic's Claude Code CLI (the version the # Commercial Terms): no redistribution grant. adapter is verified against; override # with CLAUDE_VERSION) # WITH_CURSOR=1 cursor-sdk is Cursor's proprietary software: no Cursor sessions (needs CURSOR_API_KEY) # redistribution grant. # WITH_NAMES=1 names-dataset's corpus was extracted from the 2021 The six name-corpus features (known # Facebook data leak. The code is MIT; we do not ship first/last name, country of origin...); # the data in a public image. Your call, your risk. without it they degrade to 0/None/NaN # WITH_FASTAI=1 Size: fast.ai, spaCy and the AutoGluon fast.ai extra The "Neural net (fast.ai)" model family # (see delivery/README.md for the measured cost). in the roster # # BASE is the delivery image to build on. The copy inside a released image (and the one on the # website) defaults to that release, ghcr.io/parleml/parleml:; this source copy defaults to # the local build, parleml-protected. # # Build it yourself and keep it to yourself: never push an extended image to a public registry. # Publishing it would redistribute exactly what this recipe exists to keep out of our image, under # licences that do not allow it. # # Nothing here signs anything in: a CLI's login or API key stays the user's (delivery/README.md, # "Agent sessions"). Python packages go into the application's own environment with # `pip --python /app/.venv/bin/python`: the image's plain `pip` belongs to the system Python, # whose packages ParleML cannot see, and the application's environment has no pip of its own. # Build context can be any directory; nothing is copied from it. ARG BASE=ghcr.io/parleml/parleml:0.8.0 FROM ${BASE} ARG WITH_CLAUDE=0 # The adapter's argv is verified against this release (parleml_agents/config.py: claude_pinned_version). ARG CLAUDE_VERSION=2.1.270 ARG WITH_CURSOR=0 ARG WITH_NAMES=0 ARG WITH_FASTAI=0 RUN set -eu; \ PY=/app/.venv/bin/python; \ for opt in WITH_CLAUDE WITH_CURSOR WITH_NAMES WITH_FASTAI; do \ eval "val=\$$opt"; \ case "$val" in 0|1) ;; *) echo "$opt must be 0 or 1, got '$val'"; exit 1;; esac; \ done; \ if [ "$WITH_CLAUDE" = 1 ]; then \ apt-get update; \ apt-get install -y --no-install-recommends nodejs npm; \ rm -rf /var/lib/apt/lists/*; \ npm install -g "@anthropic-ai/claude-code@${CLAUDE_VERSION}"; \ claude --version; \ fi; \ if [ "$WITH_CURSOR" = 1 ]; then \ pip --python $PY install --no-cache-dir "cursor-sdk>=1.0.31"; \ $PY -c "import cursor_sdk"; \ fi; \ if [ "$WITH_NAMES" = 1 ]; then \ pip --python $PY install --no-cache-dir names-dataset; \ $PY -c "import names_dataset"; \ fi; \ if [ "$WITH_FASTAI" = 1 ]; then \ TORCH="$($PY -c 'import torch; print(torch.__version__)')"; \ AG="$($PY -c 'import importlib.metadata as m; print(m.version("autogluon.tabular"))')"; \ pip --python $PY install --no-cache-dir \ --extra-index-url https://download.pytorch.org/whl/cpu \ "autogluon.tabular[fastai]==$AG" "torch==$TORCH"; \ $PY -c "import sys, torch; assert torch.__version__ == sys.argv[1], (torch.__version__, sys.argv[1]); import fastai" "$TORCH"; \ $PY -c "import importlib.metadata as m, sys; bad = sorted(d.metadata['Name'] for d in m.distributions() if d.metadata['Name'].lower().startswith('nvidia-')); sys.exit('FAIL: CUDA libraries came in: ' + ', '.join(bad)) if bad else print('fast.ai installed, CPU torch unchanged')"; \ fi