Repository navigation
A slim Docker image, built and checked by a workflow - #45
Merged
Merged
Conversation
…only Two stages: the build stage makes the venv (no pip, no pip cache, no test suites) and takes the three Inter weights the charts use out of Debian's fonts-inter; the image gets those, the bot, and the bytecode of only the modules it imports at start (16 MB, where all of it would be 48 MB; none adds ~2 s to every start). It runs as uid 10001 with its state in /data, and a COMMIT build argument is the commit its start-up log names. 278 MB unpacked, 98 MB compressed, of which the base is 110 and 45. A workflow (docker.yml) builds it whenever the Dockerfile or requirements.txt change, starts the bot in it and checks the charts it draws there against the reference images. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WBwHofjb1g9onaYRdLZMbf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Docker image
Dockerfile(python:3.13-slim, two stages): the venv is made without pip, pip's cache or test suites; the three Inter weights the charts use come from Debian'sfonts-inter; the image gets those, the bot, and the bytecode of only the modules it imports at start (16 MB, where all of it would be 48 MB; none adds ~2 s to every start)./data(DATA_DIR). ACOMMITbuild argument is the commit the start-up log names (also the image'sorg.opencontainers.image.revisionlabel)..dockerignorelets in onlyecobot.py,lib/andrequirements.txt, so no state, caches,*.env, tests or venv can reach the image.README.md: how to build and run it. A host folder for/datamust be writable by uid 10001, and Docker keeps the quotes in an--env-filevalue where systemd drops them.Checks
docker.yml(jobimage): on pushes that changeDockerfile,.dockerignoreorrequirements.txt(any branch) it builds the image, checks the bot starts in it and names the commit, draws the sample charts in it (they must be in Inter and matchtests/charts), and puts the image's size in the run's summary. It passed on this branch's commit.DEVELOPMENT.md: theimagejob is in the table, and the Telegram line names the jobs that notify (newest,live-evals, andtestonmain).python -m pytest -q(794 passed) andpython scripts/eval_prompts.py(87 of 87). No Python files change, so there is nothing to migrate for the systemd install.Generated by Claude Code