Reference / CLI reference
alphaavatar upgrade
Upgrade a Linux x86_64 installation to another build: its base package and, when
alphaavatar setup made the environment current runs, the default bundle's
environment, both prepared and checked beside the current ones, then switched to at once. Part
of the Linux package; in a source checkout, git pull and uv sync --all-packages --locked
update it.
| Option | Meaning |
|---|---|
--check | Show the current build, the target's and whether it is an upgrade; nothing changes, and of a release only its manifest is downloaded |
--version X.Y.Z | That release, instead of the latest |
--file PACKAGE | A package already downloaded, such as a CI build of a commit; its SHA-256 from --sha256 or PACKAGE.sha256 beside it |
--sha256 HEX | The package's SHA-256, instead of the .sha256 file beside it |
--artifacts DIR|URL | Where the target build's own wheels are; by default beside --file for a CI build, and a release's in that release |
Stop alphaavatar start before upgrading, and start it again afterwards.
Builds
A build is told by its ID, <version>-<commit> (a build of a checkout with changes adds
-dirty.<time>), as its package's manifest records it. Two builds of one version, such as two
CI builds of 0.6.9, are two builds, and either upgrades to the other:
A target that is the build current runs is current already: --check says so, and upgrade
ends at once, changing nothing. A package file is told where it is, by its SHA-256 and the
manifest inside, so that takes no copy and no stage. An older version is not an upgrade:
--check says so and upgrade refuses it.
A release publishes alphaavatar-linux-x86_64.manifest.json beside its package, so its build is
known before the package is downloaded: --check reads that file alone, and so does an upgrade
to the build already current. The release's package is
alphaavatar-<version>-linux-x86_64.tar.gz with its .sha256, as install.sh --version takes
it, and its own wheels are among its files.
To reproduce an upgrade between two CI builds, download each build's files (the
alphaavatar-linux-x86_64-<commit> artifact of the Linux package workflow) into a directory of
its own, install the first with install.sh --file and set it up, then upgrade with
--file to the second: its wheels are taken from beside it.
What it does
- Package: the package matches its SHA-256, as for
install.sh: a file where it is, then this run's own copy, or the download, which is what unpacks. It is unpacked into<prefix>/versions/<build>/and checked asinstall.shchecks one: its command reports its version, its help runs and the native libraries of the base load.currentis not touched. - Plan: the target plans the environment for the default bundle with its own
alphaavatar setup <bundle> --plan, so its configuration parser reads the bundle's settings and its catalog gives the packages. The plan also keeps what the current environment holds, so bundles set up earlier keep working. Whencurrentruns a base that has no setup environment, the target's base is switched to alone. - Install: each package of the plan, matching the size and SHA-256 the target's catalog
records, into
<prefix>/envs/<plan>/beside the current environment. - Validate: the new environment's command reports the target's version, its native
libraries load, and its
config checkaccepts the default bundle, with the credentials of the environment,.envand those stored, each the first that holds a value asstarttakes it: an empty or blank one in the environment gives way to the file's, then to the stored one.
Only then does <prefix>/current switch, once, and the command is run through it; if it does
not report the target, current goes back. Upgrading takes <prefix>/.install.lock, the lock
install.sh, setup and cleanup take: another installation into the prefix is refused while
one runs. The default bundle, and the stored credentials the target's commands read, are read
once the lock is held, the plan and the check taking the same: a setup that finished just
before is planned and checked as it left them. Those commands run from /: they read .env
as upgrade read it when it started, never the file again, even under a relative ENV_FILE.
A failure or a signal before the switch leaves current, the command and the previous version
and environment as they were, and removes what this run made: each directory it makes is moved
into place and recorded as its own while signals wait, so none is left whenever one arrives.
A base or environment it removes goes whole into a marked stage first, and every stage, its
own or one a stopped run left, loses its mark last: stopped even then, a run leaves only marked
stages, which the next install.sh, setup, upgrade or cleanup removes. The reason goes to
stderr:
A bundle the target does not accept fails at its plan or at the check; fix the bundle (or the credentials it reads), then upgrade again. A package that does not match its SHA-256, a wheel that cannot be fetched or does not match, a machine without the glibc or CPU the target needs, and too little free space fail the same way.
Nothing in the application home is written: the default bundle and its profiles, the Avatar
ID, settings, stored credentials, workspaces and the model cache stay as they are. The
previous version and its environment stay in the prefix until
alphaavatar cleanup removes them, with the Host stopped; there is no command
to go back to them.
Exit codes
| Code | Meaning |
|---|---|
| 0 | Upgraded, the target current already, or --check printed |
| 1 | Nothing changed: a download, the SHA-256, the package, the plan, an install or the check failed; an older version; another installation running; not run from a Linux package |
| 2 | Nothing changed: another error |
| 130 | Interrupted with Ctrl+C; 143 for SIGTERM, 129 for SIGHUP |
Edits target dev/v0.7.0. Published snapshots do not change.