Repository navigation
Add lcode update: update lcode, and Ollama in Docker - #87
Merged
Merged
Conversation
lcode updates itself the way it was installed: uv tool, pipx, Homebrew, pip, or git pull for a checkout (reinstalling the editable environment when the dependencies changed). Ollama in a Docker container is updated to the newest release on Docker Hub (looked up there, since a local latest tag can be months old; release candidates skipped; ROCm stays ROCm), pulled by its version tag so docker ps shows the version. A Compose-managed container gets the new tag in its compose file and docker compose up -d for its service, with the file put back if that fails. Any other container is recreated with the same name, ports, volumes, environment, GPUs, network and restart policy, and the old one comes back if the new one doesn't answer with the new version. Ollama outside Docker gets the command that updates it. --check only shows versions; -y doesn't ask. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
What
lcode updateupdates lcode, and Ollama when it runs in Docker.--checkonly shows versions,-ydoesn't ask, andlcode update lcode|ollamadoes one of them.sys.prefixanddirect_url.json:uv tool upgrade lcode-cli,pipx upgrade lcode-cli,brew upgrade nasser1941/tap/lcode, orpip install --upgrade;uvx, a hint;git pull --ff-only(onmain/masterwithout local changes), reinstalling the uv tool environment ifpyproject.tomlchanged.latesttag, which can be months old. Only exactX.Y.Ztags count (no-rc), and a ROCm image stays on-rocm.ollama/ollama:0.35.1, sodocker psshows the version.ollama_host.image:line in its compose file and runsdocker compose -p <project> -f <files> up -d --no-deps <service>.compose upfails, the file is put back andcompose upruns again.docker inspect: name, restart policy, ports, volumes and binds, environment (only what was set beyond the image's), GPUs, devices, runtime, network with aliases, extra hosts, labels, and any changed command.brew upgrade ollama), which lcode doesn't run itself.lcode updatein the usage guide.Tests
tests/test_update.py(12 tests) covers:latest, ROCm, paging);docker runarguments;--checkand no terminal changing nothing;uv tool upgrade;--checkon a Compose-managed Ollama 0.32.15 onollama/ollama:latest: the newest on Docker Hub is 0.35.1, and the plan names the compose file, service and image.lcode update ollama -yon a throwaway Compose project: pulledollama/ollama:0.35.1and changed the compose file's image line, keeping its comment.docker compose uprecreated the container on 0.35.1 with its environment and restart policy, anddocker psshowsollama/ollama:0.35.1.docker runcontainer: recreated with the same name, restart policy, port, volume and environment; the backup was removed.🤖 Generated with Claude Code